Lchar. DORIC 9.65, INFO-Text software
広告
広告
LCHAR
LCHA
R character
changes or displays the current value of the leading character setting.
argument
character specifies a new leading character. Valid leading characters are any non-digit alphabetic character, except a blank or the current delimiter.
notes discussion
example n
An unqualified LCHAR command displays the current leading character. The default leading character is the integer '0'. To change the default, see Appendix G
Controlling Default Assignments.
The LCHAR command fills unused positions to the left of the most significant digit in L-type data file items or
$NUMn system variables formatted as L-type. Commonly assigned LCHARs are ‘
*’
or '$', used for making printed values on checks tamper proof; and '0', used for fields such as ZIP-CODE, where all positions must contain a valid numeric character.
The following program section changes the LCHAR setting to an asterisk (*), clears the screen and requests an amount.
10000 PROGRAM SECTION ONE
10001 FORMAT $NUM1,15,15,L,2
10002 LCHAR *
10004 DISPLAY AT 10,10 'PLEASE ENTER AMOUNT:'
10005 ACCEPT AT 10,44,$NUM1
10006 DISPLAY AT 15,10 'YOUR CHECK = $',$NUM1
When the above program executes, it displays:
PLEASE ENTER AMOUNT:157.93
INFO responds with:
YOUR CHECK = $*********157.93
which is the amount padded to the left with the leading fill character.
INFO Reference Manual Commands 325
ダウンロード
広告