Versions Compared

Key

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

...

  SYNTAX:
 
xpfCastValue (value       : GENERIC;
              newDatatype : INTEGER)
              castedValue : GENERIC;
 
To be completed
The function xpfCastValue

Code Block
languagecpp
themeConfluence
FUNCTION xpfCastValue (value       : GENERIC;
                       newDatatype : INTEGER)
                       castedValue : GENERIC;
                

Use this function to cast a value to another type avoiding run-time conflicts in assignments. E.g. from INTEGER to xpxDateTime and back, from Instance or aggregate Id to INTEGER and back, LOGICAL to BOOLEAN, REAL to INTEGER, INTEGER to STRING, etc. See also specialized functions like xpfIntegerToInstanceId, xpfIntegerToAggregateId, xpfStringToInteger, etc.

Arguments

...

TypeNameComment
GENERICvaluecomments
INTEGERnewDatatype

 predefined constants that used to specify required result primitive datatype:

xpxDateTime, xpxInteger, xpxString, xpxBoolean, xpxLogical, xpxInstance, xpxAggregate etc.

Return Value

...

 

TypeNameComment
GENERICcastedValuecomments

Options

...

 

Example

...

Code Block
languagecpp
IF xpfCastValue(activity.start, XPXINTEGER) > xpfCastValue(activity.finish, XPXINTEGER) THEN xpxThrow; END_IF; -- where activity.start and activity.finish both are _DATETIME type and can not be compared directly

 

See also

Filter by label (Content by label)
showLabelsfalse
showSpacefalse
cqllabel = "extension_schema" and parent = "5636522"