...
Code Block | ||||
---|---|---|---|---|
| ||||
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.
NOTE:
The size of xpxINSTANCE, and xpxAGGR is currently either 4 (32 bits systems) or 8 (64 bits systems). This may change in future versions of EDM. Hence this function should not be used to decide if the actual Windows system is 32 bits or 64 bits.
Arguments
...
Type | Name | Comment |
INTEGER | dataType | comments |
Return Value
...
Type | Name | Comment |
INTEGER | dataTypeSize | comments |
Options
...
Example
...
Code Block | ||
---|---|---|
| ||
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 (Content by label) | ||||||
---|---|---|---|---|---|---|
|