Pinnacle Speakers FXDEKO Portable Generator User Manual


 
166 Working with Macros
FXDeko User’s Guide
To convert a number value to a string:
Do one of the following:
Use the command: num2str
$a = 123.45
$b = num2str $a
$b equals "123.45"
Concatenate a null string to the number
$a = 123.45
$b = $a%%""
$b equals "123.45"
To convert a string to its numeric equivalent:
Use the command: str2num
$a = "123"
$b = str2num $a
$b equals 123
To convert a string (up to 4 characters) to ASCII
code (integer):
Use the command: str2ascii
$a = "a"
$b = str2ascii $a
$b equals 97
To convert ASCII code (integer) to a string:
Use the command: ascii2str
$a = 97
$b = ascii2str $a
$b equals "a"
To convert an object to a string:
Use the command: obj2str
$a = @black
$b = obj2str $a
$b equals "yuv 16 0 0"