company logo

SystemClass :: RandomNumbers - Provide random numbers

The function fills the array passed to the function in int_array with random numbers based on the range from 0 to the value passed in base_num.

The number of values returned depends on the number of array elements passed in int_array.

EXPRESSION VOID ListNumbers() {

VARIABLES

  int         numbers[5];

  int         i = 0;

PROCESS

  RandomNumbers(numbers,1000); // get 5 from 1000

  while ( i < 5 ) {

    Message(numbers[i]);

  ++i;

  }

}

Return value:  Success ( logical  )

Implementation details

logical SystemClass  :: RandomNumbers ( PropertyHandle *int_array, int32 base_num )
  • int_array - Integer array
  • base_num - Random number base