Difference between revisions of "SET STRINGLEN"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Affects the size of the return value of the STR() function | Affects the size of the return value of the STR() function | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | STR() | + | [[STR()]], [[STRZERO()]] |
==Description== | ==Description== | ||
This set command affects the behavior of the STR() function. If SET STRINGLEN is ON and the optional length parameter of the STR() function is not specified, STR() will return a string the same length as the numeric column. This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, STRINGLEN is set ON. If a value of .F. is returned STRINGLEN is set OFF. By default STRINGLEN is OFF. | This set command affects the behavior of the STR() function. If SET STRINGLEN is ON and the optional length parameter of the STR() function is not specified, STR() will return a string the same length as the numeric column. This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, STRINGLEN is set ON. If a value of .F. is returned STRINGLEN is set OFF. By default STRINGLEN is OFF. | ||
+ | |||
NOTE: this command has no effect on the STRZERO() function. | NOTE: this command has no effect on the STRZERO() function. | ||
==Example== | ==Example== | ||
− | < | + | <code lang="recital"> |
? len(total) | ? len(total) | ||
5 | 5 | ||
Line 31: | Line 25: | ||
set stringlen on | set stringlen on | ||
? len(str(total)) | ? len(str(total)) | ||
− | 5</ | + | 5 |
+ | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
− | [[Category:Set_Commands]] | + | [[Category:Set_Commands|STRINGLEN]] |
+ | [[Category:Expressions and Type Conversion]] | ||
+ | [[Category:Expressions and Type Conversion Set Commands]] | ||
+ | [[Category:String Data]] | ||
+ | [[Category:String Data Set Commands]] | ||
+ | [[Category:Environment]] | ||
+ | [[Category:Environment Set Commands]] |
Latest revision as of 15:33, 25 November 2009
Purpose
Affects the size of the return value of the STR() function
Syntax
SET STRINGLEN ON | OFF | (<expL>)
See Also
Description
This set command affects the behavior of the STR() function. If SET STRINGLEN is ON and the optional length parameter of the STR() function is not specified, STR() will return a string the same length as the numeric column. This command allows the optional logical expression <expL> to be evaluated. If a value of .T. is returned, STRINGLEN is set ON. If a value of .F. is returned STRINGLEN is set OFF. By default STRINGLEN is OFF.
NOTE: this command has no effect on the STRZERO() function.
Example
? len(total) 5 ? len(str(total)) 10 set stringlen on ? len(str(total)) 5
Products
Recital Server, Recital