Difference between revisions of "STRZERO()"
From Lianjapedia
m (Text replace - "Recital" to "Lianja") |
Helen.george (Talk | contribs) |
||
(3 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 | ||
− | |||
==Syntax== | ==Syntax== | ||
STRZERO(<expN1> [, <expN2> [, <expN3>]]) | STRZERO(<expN1> [, <expN2> [, <expN3>]]) | ||
− | |||
==See Also== | ==See Also== | ||
[[INT()]], [[LPAD()]], [[RPAD()]], [[STR()]], [[TRANSFORM()]], [[VAL()]] | [[INT()]], [[LPAD()]], [[RPAD()]], [[STR()]], [[TRANSFORM()]], [[VAL()]] | ||
− | |||
==Description== | ==Description== | ||
The STRZERO() 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, then a string of 10 characters is returned. If <expN3> is not specified, then <expN1> is treated as an integer. The STRZERO() function operates in the same way as the STR() function except that zeroes are placed at the start of the string instead of spaces. This function is very useful for storing numeric numbers in character fields so that they appear in the expected sequential order. | The STRZERO() 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, then a string of 10 characters is returned. If <expN3> is not specified, then <expN1> is treated as an integer. The STRZERO() function operates in the same way as the STR() function except that zeroes are placed at the start of the string instead of spaces. This function is very useful for storing numeric numbers in character fields so that they appear in the expected sequential order. | ||
− | |||
==Example== | ==Example== | ||
Line 20: | Line 16: | ||
00001234 | 00001234 | ||
</code> | </code> | ||
− | |||
==Products== | ==Products== | ||
Line 26: | Line 21: | ||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | |||
[[Category:String Data Functions]] | [[Category:String Data Functions]] | ||
− | [[Category: | + | [[Category:Formatting Functions]] |
− | [[Category: | + | [[Category:Lianja VFP Extensions]] |
+ | [[Category:VFP Function Extensions]] |
Latest revision as of 08:28, 4 February 2013
Purpose
Function to perform numeric to string conversion
Syntax
STRZERO(<expN1> [, <expN2> [, <expN3>]])
See Also
INT(), LPAD(), RPAD(), STR(), TRANSFORM(), VAL()
Description
The STRZERO() 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, then a string of 10 characters is returned. If <expN3> is not specified, then <expN1> is treated as an integer. The STRZERO() function operates in the same way as the STR() function except that zeroes are placed at the start of the string instead of spaces. This function is very useful for storing numeric numbers in character fields so that they appear in the expected sequential order.
Example
? strzero(1234,8) 00001234
Products
Lianja, Lianja Server