str

Convert a value into an ASCII string in decimal format.

Syntax: str(value, string)
  str(value, string, length)
  str(value, string, length, nDec)
  str(value, string, length, nDec, padChar)

value

Required. The value to convert.
Valid variable types include: uByte, Byte, uInteger, Integer, uShort, Short, uLong, Long

string Required. The string to place the converted number into.  If this string is not 12 characters in length other variables will be written over.
length Required. The desired length of the resulting string, If the string does not fit in the given length, the leftmost characters will be put in s
If length is 0 the resulting string will not be padded.
nDec Place a decimal point "." nDec positions from the
padChar The character to pad the left side of the resulting string with in order to fill up length characters

Example:

Dim s(11) As String, v as uByte
 
v=231: Call Str(v,s)   ' s="231"
Call str(14,s)         ' s="14"
str(14,s,0,1)          ' s="1.4"
str(14,s,5,1,"0")      ' s="001.4"

Also See: strBin, strFixed, strHex, Val