Real (%REAL) Macro
The Real macro is used to insert real numbers into the strings generated by a data source using the Custom String data generator.
The macro is an analog of the Real data generator.
Syntax
The macro has the following syntax:
%REAL(MinValue, MaxValue, GenerationMode, Increment, DecimalDigits)
Parameters
Examples
The following example demonstrates how to use the Real macro:
%REAL(-102.5, 102.5, true, 5.125, 3)
Generates a sequence of values starting from
-102.5
with the increment value of5.125
. The maximum number of the generated values’ decimal digits is 3.%REAL(-102.55, 102.55, true, 2, -5.05)
Generates a sequence of values starting from
102.55
with the increment value of-5.125
. The maximum number of the generated values’ decimal digits is 2.%REAL(-100.5, 100.5,, 5.125, 2)
Generates a random collection of values from
-100.5
to100.5
. The maximum number of the generated values’ decimal digits is 2. In this case, the value of theIncrement
parameter (5.125) is omitted.%REAL(-10.5, 10.5, false, 1) <- Invalid value
The
Increment
parameter is missing, so ReadyAPI will not parse the custom string.
Remarks
For more information on adding macros to custom strings, see About Custom String Generator.
For more information on general rules used for specifying macro parameters, see Custom String Generator Rules.