PRB: Character String Over 254 Characters Uses SET MEMOWIDTHLast reviewed: April 29, 1996Article ID: Q95242 |
The information in this article applies to:
SYMPTOMSWhen 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, "String too long to fit," occurs.
CAUSEThe 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.
RESOLUTIONTo 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 ??var3Alternatively, you can use the SET MEMOWIDTH setting to increase the length of each line. For example:
SET MEMOWIDTH TO 75 ? var1+var2+var3 STATUSThis behavior is by design.
REFERENCES"Quick Reference," version 2.0, page 70 "Commands & Functions," version 2.0, page 775
|
Additional reference words: VFoxWin 3.00 FoxDos FoxWin 2.00 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |