Pi

From C64-Wiki
(Redirected from PI)
Jump to: navigation, search
BASIC keyword
Keyword: π
Abbreviation:
Type: Constant
Token code: 255/$FF
Handling routine
in BASIC ROM:
48332–48360
$BCCC–BCE8
List of all BASIC keywords


Remark: This article describes the BASIC-Command π in BASIC V2 at the Commodore 64.

Type: Constant
General Programming-Syntax: π

Pi or π is a special numerical BASIC V2 constant with the value of 3.14159265.

This constant is attributed with the fastest possible evaluation of an expression consisting of a single value (even faster as "." as a degenerated writing for a zero). This can be useful for functions with a dummy parameter which have to be evaluated anyway (e.g. the POS display function).


Examples[edit]

PRINT π

Output: 3.14159265

Links[edit]

WP-W11.png Wikipedia: Pi


BASIC V2.0 (second release) Commands

ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | π  |POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT