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


TypeNameComment
INTEGERdataTypecomments

Return Value


 

TypeNameComment
INTEGERdataTypeSizecomments

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.