74 of 307
ZBasic System Library 64 ZX Microcontroller Family CStr Type Function returning String Invocation CStr(arg) Parameter Method Type Description arg ByVal any type The value to convert to String. Discussion This function converts any Boolean, numeric or enumeration value to a String value. See the table below for details of the conversion. Input Type Result Boolean The string "True" or "False". Byte, Bit, Nibble A string containing decimal digits representing the value. Integer A string containing decimal digits representing the value. If the value is negative, the string will begin with a minus sign. UnsignedInteger A string containing decimal digits representing the value. Enum A string containing decimal digits representing the Enum member value. Long A string containing decimal digits representing the value. If the value is negative, the string will begin with a minus sign. UnsignedLong A string containing decimal digits representing the value. Single A string representing the value. Depending on the value, the form may be standard decimal form with a decimal point separating the whole and fractional parts or it may be in “scientific notation” form. In some cases, there will be no decimal point at all, e.g. with values having no fractional part. When converting Single values, some special cases are detected resulting in the strings shown in the table below. See the function SngClass() for more information about the special cases. Special Value Result NaN "*.*". ±Infinity "&.&" Denormalized value "#.#" Compatibility In BasicX the special Single values are not handled properly. See Also CStrHex, Fmt