22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

| X2D('') has value '+'<br />

| X2D('91') has value '+145'<br />

| X2D('F1') has value '+241'<br />

| X2D('7FFFFFFF') has value '+2147483647'<br />

| X2D('FFFFFFF1') has value '-15'<br />

┌───────────┐<br />

│<br />

│<br />

│Character │<br />

│Expression │<br />

│<br />

│<br />

└─────┬─────┘<br />

│<br />

▼ Can be any of<br />

| ├─────────────┬─────────────┬──────────────────────┐<br />

| ▼ ▼ ▼ ▼<br />

| ┌─────┴─────┐ ┌─────┴──────┐ ┌────┴──────────────┐ ┌─────┴────────┬────────────┐<br />

| │ ││ ││ ││ │ │<br />

| │ Character │ │ CharExpr │ │ Character-Valued │ │ (Duplication │ CharExpr │<br />

| │ Value │ │ . ◄──┐ │ │ Built-In Function │ │ Factor) │ │<br />

| │ │ │ CharExpr │ │ │ │ │ │ │<br />

| └─────┬─────┘ └──────────┼─┘ └───────────────────┘ └──────────────┴────────────┘<br />

│<br />

│<br />

│<br />

└── Period (.) = Concatenation Character<br />

▼ Can be any of<br />

├─────────────┬─────────────┬─────────────┐<br />

▼ ▼ ▼ ▼<br />

┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐ ┌─────┴─────┐<br />

│ Substring │ │ Variable │ │ Self- │ │ Attribute│<br />

│ │ │ Symbol │ │ Defining │ │ <strong>Reference</strong> │<br />

│ │ │ │ │ Term │ │ │<br />

│ │ │ │ │ │ │ T' or O' │<br />

└───────────┘ └───────────┘ └───────────┘ └───────────┘<br />

Figure 107. Defining Character (SETC) Expressions<br />

Notes:<br />

1. The attribute reference term must not be preceded by a duplication factor.<br />

Evaluation of Character Expressions: The value of a character expression is<br />

the character string within the enclosing single quotation marks, after the assembler<br />

carries out any substitution for variable symbols.<br />

Character strings, including variable symbols, can be concatenated to each other<br />

within a character expression. The resultant string is the value of the expression.<br />

Notes:<br />

1. Use two single quotation marks to generate a single quotation mark as part of<br />

the value of a character expression.<br />

The following statement assigns the character value L'SYMBOL to the SETC<br />

symbol &LENGTH.<br />

&LENGTH SETC<br />

'L''SYMBOL'<br />

2. A double ampersand generates a double ampersand as part of the value of a<br />

character expression. To generate a single ampersand in a character<br />

expression, use the substring notation; for example:<br />

&AMP SETC '&&'(1,1)<br />

Note: A quoted single ampersand '&' is not a valid character string.<br />

382 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!