Sprintf Wprintf

StrToDatatype


The DatatypeToStr function returns the data type number corresponding to the data type name. For example passing "float" returns 5.

Syntax

number = StrToDatatype( string )

Example

The example below converts data type "float" to to its number:

 

s = "float"

-- data type "float"

t = StrToDatatype( s )

-- get the corresponding number

Printf("name=%s, stype=%d", s, t )

-- result: name="float"type=5

Related Topics

DatatypeToStr, CImage:SetDatatype, Data Types