10
10
Decimal point added.
1
SI
Leading $ sign
A dollar sign (5) symbol shows that a dollar sign will be printed in the
number. If you want the dollar sign to float (always be placed before the
number), you must specify at least one # before the dollar sign. If you
specify a dollar sign without a leading #. the dollar sign is printed in the
position shown In the format field.
If you specify commas and/or a plus or minus sign in a format field with
a dollar sign, your program prints a comma or sign before the dollar
sign.
The four up arrows or carets (i lit) symbol is used to specify that the
number is to be printed in E + format. You must use # ;n addition to
the tilt to specify the field width. The tilt must appear after the 0 in
the format field.
PUDEF lets you redefine up to 4 symbols in the PRINT USING
statement. You can change blanks. commas decimals points, and
dollar signs into some other character by placing the new character in
the correct position in the PUDEF control string.
Position 1 is the filler character. The default is a blank. Place a new
character here when you want another character to appear in place of
blanks.
Position 2 is the comma character. Default is a comma.
Position 3 is the decimal point.
Position 4 is the dollar sign.
EXAMPLES
You must specify tour carets t ft) when you want to print a number in
E -format (scientific notation). If you specify more than one but fewer
than four carets. you get a syntax error. If you specify more than four
carets only the first four are used. The fifth caret (and subsequent
carets) are interpreted literally as no text symbols
An equal sign (a) is used to centre a string in the field. You specify the
field width by the number of characters (0 and =) in the format field. If
the string contains fewer characters than the field width, the string is
centreed in the field. If the string contains more characters than can be
fit into the field. The right-most characters are truncated and the string
fills the entire field.
A greater than sign (>) is used to right justify a string in a field. You
specify the field width by the number of characters (# and =) In the
format field. If the string contains fewer characters than the field width.
the string is right justified in the field. If the string contains more
characters than can be fit into the field. the right-most characters are
truncated and the string fills the entire field
PUDEF
PUDEF "1 through 4 characters"
10 PUDEF
pace
20 PUDEF " &"
30 PUDEF " .7
space
40 PUDEF
PRINTs * in the place of blanks.
PRINTs & in place of commas.
PRINTs decimal points in place of
commas, and commas in place of
decimal points.
PRINTs English patine sign in place of $.
decimal points in place of commas and
commas in place of decimal points.
READ
READ variable list
This statement is used to get information from DATA statements into
variables. where the data can be used. The READ statement variable
list may contain both strings and numbers. Care must be taken to avoid
reading strings where me READ statement expects a number, which
produces an ERROR message
EXAMPLE.
READ A$, GS, Y
134
135
Need help?
Do you have a question about the Commodore 16 and is the answer not in the manual?
Questions and answers