xpfGetDataTypeSize
FUNCTION xpfGetDataTypeSize (dataType : INTEGER) dataTypeSize : INTEGER;
The xpfGetDataTypeSize function returns the size in bytes of the given datatype. The "dataType" argument should be xpxINTEGER, xpxAGGR, xpxINSTANCE, xpxBOOLEAN, ..etc.
Â
Arguments
Type | Name | Comment |
INTEGER | dataType | comments |
Return Value
Â
Type | Name | Comment |
INTEGER | dataTypeSize | comments |
Options
Â
Example
FUNCTION getDataTypeSize : BOOLEAN; LOCAL dtsize : INTEGER; END_LOCAL; ON_ERROR_DO; xpxPrintf('\nError.'); xpxThrow; END_ON_ERROR_DO; dtsize := xpfGetDataTypeSize(xpxINTEGER); xpxPrintf('\nData type size for INTEGER : %d',dtsize); dtsize := xpfGetDataTypeSize(xpxREAL); xpxPrintf('\nData type size for REAL : %d',dtsize); dtsize := xpfGetDataTypeSize(xpxINSTANCE); xpxPrintf('\nData type size for INSTANCE : %d',dtsize); RETURN(TRUE); END_FUNCTION;
Â
See also
Filter by label
There are no items with the selected labels at this time.
Â