Go to: Synopsis. Return value. Related. MEL examples.

Synopsis

delrandstr string

delrandstr is undoable, NOT queryable, and NOT editable.

The command deletes the random number stream(s) specified by the string argument. The string accepts a wildcard asterisk (currently only a single "*" character is supported) which allows like-named streams to be deleted together. The command returns the number of random number streams which have been deleted, and thus a value of 0 signifies that the string did not match any existing stream names. Note that the default stream cannot be deleted, and attempts to delete it are silently ignored. For more details about creating and using multiple random number streams with MEL, please refer to the documentation for the rand command.

Return value

intNumber of deleted random streams

Related

gauss, rand, randstate, seed, sphrand

MEL examples

rand "tom" 1;
// Result: 0.113879 //
rand "dick" 1;
// Result: 0.113879 //
rand "harry" 1;
// Result: 0.113879 //
delrandstr "*";
// Result: 3 //

rand "particleShape0.18" 1;
// Result: 0.113879 //
rand "particleShape1.18" 1;
// Result: 0.113879 //
rand "particleShape1.32" 1;
// Result: 0.113879 //
delrandstr "particleShape1.*";
// Result: 2 //