DatatypeToStr
The DatatypeToStr function returns the data type name corresponding to the numeric data type code. For example passing 5 returns "float".
sValue = DatatypeToStr( number )
numberis the data type code from the Mira Data Types table.
string is the data type name from the Data Types table.
The script fragment below shows how to create a text output window with a specified placement inside the main Mira window. We want the text window to stretch horizontally from 10% to 70% of the main window width and vertically from 20% to 60% of the main window height. Below is a function that does this:
t = 5 |
-- data type number 5 |
s = DatatypeToStr( t ) |
-- get the corresponding name string |
Printf("type=%d, name=%s", t, s ) |
-- result: type=5, name="float" |