Difference between revisions of "STR()"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Function to perform numeric to string conversion | Function to perform numeric to string conversion | ||
Line 15: | Line 8: | ||
==See Also== | ==See Also== | ||
− | [[AT()]], [[ATNEXT()]], [[INLIST()]], [[INT()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[ | + | [[AT()]], [[ATNEXT()]], [[CAST()]], [[INLIST()]], [[INT()]], [[LEFT()]], [[OCCURS()]], [[RAT()]], [[RIGHT()]], [[SET STRESCAPE]], [[SET STRINGBUF]], [[SET STRINGLEN]], [[STREXTRACT()]], [[STRTRAN()]], [[STRZERO()]], [[STUFF()]], [[SUBSTR()]], [[TRANSFORM()]], [[VAL()]] |
Line 32: | Line 25: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital, Recital Server |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
+ | [[Category:String Data]] | ||
+ | [[Category:String Data Functions]] | ||
+ | [[Category:Expressions and Type Conversion]] | ||
+ | [[Category:Expressions and Type Conversion Functions]] |
Latest revision as of 11:48, 21 July 2010
Purpose
Function to perform numeric to string conversion
Syntax
STR(<expN1> [,<expN2> [,<expN3> [,<expN4>]]])
See Also
AT(), ATNEXT(), CAST(), INLIST(), INT(), LEFT(), OCCURS(), RAT(), RIGHT(), SET STRESCAPE, SET STRINGBUF, SET STRINGLEN, STREXTRACT(), STRTRAN(), STRZERO(), STUFF(), SUBSTR(), TRANSFORM(), VAL()
Description
The STR() function converts the numeric expression <expN1> to a right justified character string of width <expN2>, rounded to <expN3> decimal places. If <expN2> is not specified, the string width defaults to 10. If <expN1> is wider than 10 or <expN2>, the STR() function returns a string of asterisks. If <expN3> is not specified, then <expN1> is treated as an integer.
The string conversion can be returned in octal, decimal or hexadecimal when the optional expression <expN4> is specified as 8, 10 or 16, respectively. If <expN4> is not specified, the string is returned in decimal. If hexadecimal is specified then all alpha characters returned are in lower case. This function can be used in index expressions to add numeric and character field types together.
Example
? str(1999.019,8,2) 1999.02
Products
Recital, Recital Server