Microsoft KB Archive/95242

{| = PRB: Character String Over 254 Characters Uses SET MEMOWIDTH =
 * width="100%"|

ID: Q95242

1.02 2.00 2.50 2.50a | 2.50 2.50a 3.00

MS-DOS              | WINDOWS kbprb The information in this article applies to:
 * Microsoft Visual FoxPro for Windows, version 3.0
 * Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, and 2.5a
 * Microsoft FoxPro for Windows, versions 2.5 and 2.5a

SYMPTOMS
When you print a character expression longer than 254 characters on the screen using the ?/?? command, the SET MEMOWIDTH setting will be used to control word wrapping. If you use the @ ... SAY command, error 1903, &quot;String too long to fit,&quot; occurs.

CAUSE
The maximum size for character fields is 254 characters. If a character expression is less than or equal to 254 characters, the _WRAP variable setting will control how the variable is wrapped when it is displayed on the screen. If _WRAP = .F., the variable will wrap at the width of the current output window. If _WRAP = .T., the variable will be wrapped according to the _LMARGIN and _RMARGIN settings.

RESOLUTION
To work around this situation, you can use the SUBSTR function to print the character expression in 254-character pieces. For example:

?SUBSTR(var,1,254) ??SUBSTR(var,255,254) If the character expression is the result of concatenating variables, use the ?? command to continue the printing of each variable. For example: ?var1 ??var2 ??var3 Alternatively, you can use the SET MEMOWIDTH setting to increase the length of each line. For example: SET MEMOWIDTH TO 75 ? var1+var2+var3

STATUS
This behavior is by design.