Revision [17686]

This is an old revision of KeyPgStr made by FxMwikki on 2015-06-12 06:06:38.

 

STR


Returns a string representation of a number or Unicode character string

Syntax:
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgByte byte ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgUbyte ubyte ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgShort short ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgUshort ushort ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgLong long ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgUlong ulong ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgLongint longint ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgUlongint ulongint ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgSingle single ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval n KeyPgAs as KeyPgDouble double ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByref byref str KeyPgAs as KeyPgConstQualifier const KeyPgString string ) KeyPgAs as KeyPgString string
KeyPgDeclare declare KeyPgFunction function Str ( KeyPgByval byval str KeyPgAs as KeyPgConstQualifier const KeyPgWstring wstring ) KeyPgAs as KeyPgString string

Usage:
result = Str[$]( number )
or
result = Str( string )

Parameters:
number
Numeric expression to convert to a string.
string
String expression to convert to a string.

Description:
Str converts numeric variables to their string representation. Used this way it is the KeyPgString String equivalent to KeyPgWstr Wstr applied to numeric variables, and the opposite of the KeyPgVal Val function, which converts a string into a number.
Str also converts Unicode character strings to ASCII character strings. Used this way it does the opposite of KeyPgWstr Wstr. If an ASCII character string is given, that string is returned unmodified.

Examples:
Dim a As Integer
Dim b As String
a = 8421
b = Str(a)
Print a, b


Dialect Differences:
Platform Differences:
Differences from QB:
See also:
Back to Converting Data Types
Back to String Functions
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode