Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


...

Code Block
languagecpp
themeConfluence
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

...

TypeNameComment
INTEGERdataTypecomments

Return Value

...

 

TypeNameComment
INTEGERdataTypeSizecomments

Options

...

 

Example

...

Code Block
languagecpp
  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)
showLabelsfalse
showSpacefalse
cqllabel = "extension_schema" and parent = "5636522"