Pi
BASIC keyword | |
Keyword: | π |
Abbreviation: | – |
Type: | Constant |
Token code: | 255/$FF |
Handling routine in BASIC ROM: |
44712 $AEA8 |
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 | edit source]
PRINT π
Output: 3.14159265
Links[edit | edit source]
![]() |
Wikipedia: Pi |
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