Assignment command (LangX COBOL)
The Assignment command assigns the value of an expression to a specified reference. It is the equivalent of the COBOL COMPUTE statement.
>>-'--receiver--'--=--'--sourceexpr--'--;----------------------><
- receiver
- A valid Debug Tool LangX COBOL reference enclosed in apostrophes (').
- sourceexpr
- A valid Debug Tool LangX COBOL expression enclosed in apostrophes (').
Usage notes
- When receiver is an arithmetic variable, then sourceexpr can be a hexadecimal string of the same length as receiver. Debug Tool assumes that the correct internal representation is used and the hexadecimal value is moved directly into receiver.
- When receiver is a non-numeric string, then sourceexpr can be a hexadecimal string of any length. If the length of sourceexpr is less than the length of receiver, then receiver is padded on the right with binary zeros.
- When receiver is a COBOL INDEX variable, then Debug Tool assumes that sourceexpr is a subscript value and converts it to the proper offset before storing the value into receiver.
- The Assignment command cannot be used while you replay recorded statements by using the PLAYBACK commands.
Examples
- Assign the value 6 to variable x.
'x' = '6' ;
- Increment the value of X by 5.
'X' = 'X + 5' ;
Refer to the following topics for more information related to the material discussed in this topic.
- Related references
- references
- PLAYBACK commands