Visible to Intel only — GUID: GUID-AF7CEE91-D939-41E1-8209-414193DED3F3
Visible to Intel only — GUID: GUID-AF7CEE91-D939-41E1-8209-414193DED3F3
Character Assignment Statements
For character assignment statements, the variable and expression must be of character type and have the same kind parameter.
The variable and expression can have different lengths. If the length of the expression is greater than the length of the variable, the character expression is truncated on the right. If the length of the expression is less than the length of the variable, the character expression is filled on the right with blank characters.
If you assign a value to a character substring, you do not affect character positions in any part of the character scalar variable not included in the substring. If a character position outside of the substring has a value previously assigned, it remains unchanged. If the character position is undefined, it remains undefined.
Examples
FILE = 'PROG2' |
REVOL(1) = 'MAR'//'CIA' |
LOCA(3:8) = 'PLANT5' |
TEXT(I,J+1)(2:N-1) = NAME//X |
'ABC' = CHARS |
Left element must be a character variable, array element, or substring reference. |
CHARS = 25 |
Expression does not have a character data type. |
STRING=5HBEGIN |
Expression does not have a character data type. (Hollerith constants are numeric, not character.) |