8.4.1 Expressions as Values

RDMLX supports the use of expressions in many parameters and properties.

EXECUTE Command

You can now use expressions as the value of the With_Parms parameter in the Execute command, thus eliminating the need for additional commands to prepare the required value. For example:

Execute Subroutine(Routine2) With_Parms(#STD_DESC ('B' + #Phbn_2.Caption + 'B') 'AaBbCcDd')

MSGTXT Parameter of Various Commands

The MSGTXT parameter can have as a value an expression which contains more than a single item or the expression is enclosed in parentheses. For example:

Message Msgtxt('Message: name is ' + #fullname)

Mthroutine Name(Trace)
Define_Map For(*INPUT) Class(#STD_TEXT) Name(#InTextOne)
Define_Map For(*INPUT) Class(#STD_TEXT) Name(#InTextTwo)
Message Msgtxt(#InTextOne.Value + " " + #InTextTwo.Value)
Endroutine

SET Command

The values assigned to properties selected on a SET command support an expression:

SET #COM_OWNER Left(#COM_OWNER.Left + 2) Top(#COM_OWNER.Top + 2)

INVOKE Command

The values assigned to method parameters selected on an INVOKE command support an expression:

INVOKE #COM_OWNER.MethodOne ParmOne(#COM_OWNER.Left + 2) ParmTwo(#COM_OWNER.Top + 2)

SIGNAL Command

The values assigned to event parameters selected on a SIGNAL command support an expression:

SIGNAL EventOne ParmOne(#COM_OWNER.Left + 2) ParmTwo(#COM_OWNER.Top + 2)

SET_REF Command

You can use expressions in SET_REF commands:

Set_Ref #CurrentDepartment   (*dynamic  #COM_OWNER.dosomething(#STD_NUM))
Set_Ref #CurrentDepartment   (*dynamic  #COM_OWNER.dosomething(iNumber := 10))

MTHROUTINE NAME(dosomething )
DEFINE_MAP FOR( *INPUT ) CLASS( #STD_NUM) name(#iNumber)
DEFINE_MAP FOR(*RESULT) CLASS(#DEPTMENT) NAME(#oDepartment) PASS(*BY_REFERENCE)

Set_Ref #oDepartment (*create_As #DEPTMENT)

ENDROUTINE