21.11.2014 Views

Programming Manual for Citizen BASIC Interpreter - MaRCo

Programming Manual for Citizen BASIC Interpreter - MaRCo

Programming Manual for Citizen BASIC Interpreter - MaRCo

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.

<strong>Citizen</strong> <strong>BASIC</strong> <strong>Interpreter</strong><br />

“, ” inserts space between data<br />

“; ” does not insert space<br />

【USING phrase】<br />

The USING phrase defines the output <strong>for</strong>mat by the following <strong>for</strong>mat.<br />

The USING <strong>for</strong>mat designates the output <strong>for</strong>mat of the value by the string. The<br />

definitions of the string are as follows:<br />

! First 1 character of the string<br />

&<br />

Output string<br />

\ \ Output string of the designated digits<br />

The number of digits is determined by the number from "\" to<br />

"\"<br />

Cut off if too long, spaced if too short<br />

# Numeric value. The number of characters of "#" is the number<br />

of digits.<br />

Right aligned if too small, displayed following "%"if<br />

too large<br />

. Decimal point. There is "#" on the right of the point.<br />

"0" is added if not fulfilled<br />

+ Display positive and negative. Display "+" <strong>for</strong> positive,<br />

"-" <strong>for</strong> negative<br />

- Display positive and negative. Display space <strong>for</strong><br />

positive, "-" <strong>for</strong> negative<br />

**$ "*" and “$” are displayed in the blank of the left digit.<br />

E.g.: "**$###", result: **$123<br />

** “*” is displayed in the blank of the left digit. E.g.:<br />

"**####", result: ***123<br />

$$ Display “$”. Regarded as “#” <strong>for</strong> 1 character<br />

, Insert the separating symbol “,” every 3 digits in the integer part<br />

E.g. "###,###,###", result: 12,345,678<br />

^^^^ Display exponents. E.g.: "#.###^^^^", result: 1.234E+02<br />

【E.g.】<br />

PRINT 123;456<br />

Result<br />

123456<br />

PRINT 123,456<br />

Result<br />

123 456<br />

PRINT USING"###### ######";123;456<br />

Result<br />

123 456<br />

PRINT USING"**$####**$####";123;456<br />

Result<br />

***$123***$456<br />

PRINT USING"!!";"ABC";"XYZ"<br />

Result<br />

AX<br />

PRINT USING"&-&";"ABC";"XYZ"<br />

Result<br />

ABC-XYZ<br />

38

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

Saved successfully!

Ooh no, something went wrong!