RE: SDL-News: random number gen

Subject: RE: SDL-News: random number gen
Date: Thu Nov 26 1998 - 08:20:37 GMT

The originator of this message is responsible for its content.
-----From to sdlnews -----

Hi Oliver,

Here is a method to generate random integers with SDT using C's random
generator function rand( ):

put in a text symbol the following external procedure declaration:

procedure rand;
returns integer;

Now you can assign an integer variable a random value in the following way:

rand_value := call rand

This should work with all kernels (simulator, validator, application) as
long as the C
library supports the rand( ) function. The solution only works in SDT 3.1 or
By declaring srand in a similar way, you can also set the seed for random

Hope this helps.

Louis Verhaard
Gambro AB

-----End text from to sdlnews -----
For help, email "" with the body of your email as:
or (iff this does not answer your question) email:

This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT