Menu

StepType_0rand

Dave Amies

0rand

select a random number within a range, then save as both an integer and a 0 padded string. The number chosen can be accessed by future Steps as {c0RandNum} for the 0 padded string and {iRandNum} for the integer.

The 0 padded string returned will always be the same number of characters (length) as the maximum value.

Maximum value must always be greater than or the same as the minimum value, if the same then the minimum value is returned.

How each column is used:

Column Name Value
iID The ID used to uniquely identify the current Step Sequence
iSeq Optional/Purely cosmetic, only used to help you structure you step sequences
cStepType 0rand
cField The minimum possible number to be selected by the random number generator
cValue The maximum possible number to be selected by the random number generator
cTiming Not Used
cExpect Not Used
cOnError Not Used

Example usage:

iID iSeq cStepType cField cValue cTiming cExpect cOnError
Seq001 1 0rand 6 4098

The following table demonstrates the values contained in c0RandNum and iRandNum for various numbers that might be randomly selected in the above example

Number Selected c0RandNum iRandNum
8 "0008" "8"
13 "0013" "13"
99 "0099" "99"
137 "0137" "137"
989 "0989" "989"
1024 "1024" "1024"
4090 "4090" "4090"

Related

Wiki: Step Types

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.