$

From C64-Wiki
Jump to: navigation, search

This article is about the Simon's BASIC keyword $.


Type: modifier
Syntax: A = $C000 (for example)

The $ prefix allows the programmer to express a numeric constant in the hexadecimal numeral system. When the interpreter encounters the $ prefix, it will recognize the number that follows as a hexadecimal number. The accepted digits are 0-9 and A-F, and the value must be between 0 and 65535, inclusive. The number of digits must be 4. If the interpreter can't parse the given number, the

?NOT BINARY CHAR

error is displayed.

Example[edit]

PRINT "THE NUMBER $C000 IS DECIMAL" $C000

will output:

THE NUMBER $C000 IS DECIMAL 49152


Simon's BASIC Commands

% | $ | ANGL | ARC | AT | AUTO | BCKGNDS  | BFLASH  | BFLASH 0  | BLOCK  | CALL  | CENTRE  | CGOTO  | CHAR  | CHECK  | CIRCLE  | CMOB  | COLD  | COLOUR  | COPY  | CSET  | DELAY  | DESIGN  | DETECT  | DIR  | DISAPA  | DISK  | DISABLE  | DISPLAY  | DIV  | DOWN (B/W)  | DRAW  | DUMP  | DUP  | ELSE  | END LOOP  | END PROC  | ENVELOPE  | ERRLN  | ERRN  | EXEC  | EXIT  | EXOR  | FCHR  | FCOL  | FETCH  | FILL  | FIND  | FLASH  | FRAC  | GLOBAL  | GRAPHICS  | HI COL  | HIRES  | HRDCPY  | INKEY  | INSERT  | INST  | INV  | JOY  | KEY  | LEFT (B/W)  | LIN  | LINE  | LOCAL  | LOOP  | LOW COL  | MEM  | MERGE  | MMOB  | MOB OFF  | MOB SET  | MOD  | MOVE  | MULTI  | MUSIC  | NO ERROR  | NRM  | OFF  | OLD  | ON ERROR  | ON KEY  | OPTION  | OUT  | PAGE  | PAINT  | PAUSE  | PENX  | PENY  | PLACE  | PLAY  | PLOT  | POT  | PROC  | RCOMP  | REC  | RENUMBER  | REPEAT  | RESET  | RESUME  | RETRACE  | RIGHT (B/W)  | RLOCMOB  | ROT  | SCRLD  | SCRSV  | SECURE  | SOUND  | TEST  | TEXT  | TRACE  | UP (B/W)  | UNTIL  | USE  | VOL  | WAVE  | @