MetroCad USA

Converting Data Types


(ITOA <int>)

Converts integers to a string. (itoa 45) "45"


(RTOS <real> [mode] [precision])

Converts a real number to a string. [mode] specifies the units of the distance. 1 = Scientific 2 = Decimal 3 = Engineering feet and decimal inches. 4 = Architectural feet and inches. 5 = Fractional [precision] specifies the number of decimal places or fractional places (5 = 32. 4 = 16, etc) (rtos 3.456) "3.456" (rtos 3.14159 4 4) "0'-3 1/8" (rtos 3.14159 4 5) "0'-3 5/32"


(ANGTOS <angle>)

Converts an angle (in radians) to a string. (antos (/ pi 2)) "90"


(ATOI <string>)

Converts an ASCII string to an integer value. (atoi "345") 345


(ATOF <string>)

Converts an ASCII string to a real value. (atof "45.098") 45.098


(READ <string>)

Converts an ASCII string to a symbol or list. (read "A12") A12


(DISTOF <str> [mode])

Converts a real number represented as a string into a floating-point value. <str> the string argument that represents the distance. [mode] specifies the units of the distance. 1 = Scientific 2 = Decimal 3 = Engineering feet and decimal inches. 4 = Architectural feet and inches. 5 = Fractional (distof "12" 2) 12.00 (distof "15 5/8" 5) 15.625




Example functions page
Back Home