Microsoft KB Archive/172685: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - "&" to "&")
 
(One intermediate revision by the same user not shown)
Line 65: Line 65:
       CLEAR
       CLEAR


s1="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
s1="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16"
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16"


** *** S2 length = 210 represents maximum length shown as result of
** *** S2 length = 210 represents maximum length shown as result of
DISPLAY STATUS
DISPLAY STATUS


s2="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
s2="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\dis"
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\dis"


** *** S3 length = 255 which is maximum string length before giving  ** ***
** *** S3 length = 255 which is maximum string length before giving  ** ***
'Syntax Error'
'Syntax Error'


s3="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
s3="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\distrib.src\sy
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\distrib.src\sy
stem\system16;c:\vfp30b\distrib.sr"
stem\system16;c:\vfp30b\distrib.sr"


** *** cannot set S4 since it gives syntax error.
** *** cannot set S4 since it gives syntax error.
** ***
** ***
s4="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
s4="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\  
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\distrib.src\sy
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\distrib.src\sy
stem\system16;c:\vfp30b\distrib.src"
stem\system16;c:\vfp30b\distrib.src"




   ?LEN(s1)
   ?LEN(s1)
   SET PATH TO &s1
   SET PATH TO &s1
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?SET("path")
   ?SET("path")
   DISP STAT
   DISP STAT


   CLEAR
   CLEAR
   ?" S2 length = "
   ?" S2 length = "
   ??LEN(s2)
   ??LEN(s2)
   ??" which is the maximum display length of DISPLAY STATUS"
   ??" which is the maximum display length of DISPLAY STATUS"
   SET PATH TO &s2
   SET PATH TO &s2
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?SET("path")
   ?SET("path")
   DISP STAT
   DISP STAT


   CLEAR
   CLEAR
   ?" S3 length = "
   ?" S3 length = "
   ??LEN(s3)
   ??LEN(s3)
   ??" which is the maximum length before giving 'Syntax Error'"
   ??" which is the maximum length before giving 'Syntax Error'"
   SET PATH TO &s3
   SET PATH TO &s3
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?SET("path")
   ?SET("path")
   DISP STAT
   DISP STAT


   CLEAR
   CLEAR
   ?" S4 cannot be set since it is one greater than s3 (which is "
   ?" S4 cannot be set since it is one greater than s3 (which is "
   ?? ALLTRIM(STR(LEN(s3)))
   ?? ALLTRIM(STR(LEN(s3)))
   ??") and would give 'Syntax Error'"
   ??") and would give 'Syntax Error'"
                 </pre>
                 </pre>



Latest revision as of 12:29, 21 July 2020

Knowledge Base


PRB: DISPLAY STATUS Shows Only 210 Characters of SET PATH TO

Article ID: 172685

Article Last Modified on 9/30/2003



APPLIES TO

  • Microsoft Visual FoxPro 3.0 Professional Edition
  • Microsoft Visual FoxPro 3.0b Professional Edition



This article was previously published under Q172685

SYMPTOMS

DISPLAY STATUS shows only 210 characters of the current setting of the SET PATH TO statement even though the character limit for SET PATH TO is 255 characters.

RESOLUTION

Since this problem is fixed in Visual FoxPro 5.0, the best way to avoid it is by upgrading to Visual FoxPro 5.0.

MORE INFORMATION

The following sample code when run in Visual FoxPro for Windows version 3.0x illustrates the problem:

   ** *** Sample Program - TESTPATH.PRG
   ** *** Illustrates DISPLAY STATUS string length limit of SET PATH

      CLEAR

s1="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\ 
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16"

** *** S2 length = 210 represents maximum length shown as result of
DISPLAY STATUS

s2="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\ 
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\dis"

** *** S3 length = 255 which is maximum string length before giving  ** ***
'Syntax Error'

s3="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\ 
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\distrib.src\sy
stem\system16;c:\vfp30b\distrib.sr"

** *** cannot set S4 since it gives syntax error.
** ***
s4="c:\vfp30b;c:\vfp30b\api;c:\vfp30b\api\samples;c:\vfp30b\distrib.src;c:\ 
vfp30b\distrib.src\setup;c:\vfp30b\distrib.src\setup\setup16;c:\vfp30b\dist
rib.src\setup\setup32;c:\vfp30b\distrib.src\system;c:\vfp30b\distrib.src\sy
stem\system16;c:\vfp30b\distrib.src"


   ?LEN(s1)
   SET PATH TO &s1
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?SET("path")
   DISP STAT

   CLEAR
   ?" S2 length = "
   ??LEN(s2)
   ??"  which is the maximum display length of DISPLAY STATUS"
   SET PATH TO &s2
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?SET("path")
   DISP STAT

   CLEAR
   ?" S3 length = "
   ??LEN(s3)
   ??"  which is the maximum length before giving 'Syntax Error'"
   SET PATH TO &s3
   ?"RETURN VALUE OF ?SET('PATH') is:"
   ?SET("path")
   DISP STAT

   CLEAR
   ?" S4 cannot be set since it is one greater than s3 (which is "
   ?? ALLTRIM(STR(LEN(s3)))
   ??") and would give 'Syntax Error'"
                

Keywords: kbfix kbprb KB172685