Versions Compared

Key

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


...

Code Block
languagecpp
themeConfluence
FUNCTION xpxGetRandomInteger(VAR aRandomInteger :

...

 INTEGER)
                             status             : INTEGER;

The xpxGetRandomInteger returns a random integer value in the aRandomInteger argument. This function is implemented by using the ANSI C function rand().

Arguments

...

TypeNameComment
INTEGERaRandomIntegera random integer value

Return Value

...

Insert excerpt
US:_r_XPX_Return_Value
US:_r_XPX_Return_Value
nopaneltrue

Options

...

 

Example

...

Code Block
languagecpp
  FUNCTION getRandomInteger : SET OF INTEGER;
     LOCAL
       randInt    : INTEGER;
       randIntSet : SET OF INTEGER;
     END_LOCAL;
     ON_ERROR_DO;
       xpxPrintf('\nError.');
       xpxThrow;
    END_ON_ERROR_DO;
    
    REPEAT i := 1 TO 10;
      xpxGetRandomInteger(randInt);
      randIntSet ++ randInt;
      xpxPrintf('\nrrandIntSet[%d] : %lu',i,randInt);
    END_REPEAT;
    
    RETURN(randIntSet);
  END_FUNCTION;

 

See also

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