CR: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 12: Line 12:
  01200 PRINT FIELDS "9,2,CR 19": "Enter Employee ID#:"
  01200 PRINT FIELDS "9,2,CR 19": "Enter Employee ID#:"


The letter R can also be used as a [[Attribute (Screen)#Syntax|Screen or Color Attribute]]
===See Also===
 
The letter R can also be used as a [[Attribute (Screen)#Syntax|Screen or Color Attribute]].
 
The letters CR can also be used as a [[PIC#Insertion Characters|PIC]] insertion character.


<noinclude>
<noinclude>
[[Category:Format Specifications]]
[[Category:Format Specifications]]
</noinclude>
</noinclude>

Latest revision as of 15:30, 7 August 2013

The CR (character, right justified) format specification identifies string data which is to be right justified upon output. It can be used with both types of FORM statements and with the full screen processing statements.

Input characteristics

When CR is used for input, it is treated the same as C is on input. (See the C format specification discussion for more information.)

Output characteristics

When CR is used for output, Business Rules all leading and trailing spaces, and then right justifies the string according to the value specified as the field length. If the field length is not specified, the default field length is the length of the string (including spaces); CR right justifies the value within this amount.

In the following example, lines 1100 and 1200 will print text flush against the right edge of the field so that the two colons will both appear in column 20 of the screen:

01100 PRINT FIELDS "6,2,CR 19": "Enter Date:"
01200 PRINT FIELDS "9,2,CR 19": "Enter Employee ID#:"

See Also

The letter R can also be used as a Screen or Color Attribute.

The letters CR can also be used as a PIC insertion character.