Document hex literals

This commit is contained in:
Joshua Bell 2013-08-16 19:58:09 -07:00
parent e2891cfcef
commit 90e42a5773
2 changed files with 9 additions and 7 deletions

View File

@ -287,7 +287,7 @@ var basic = (function() {
dimensions = dims.map(function(n) { return (Number(n) >> 0) + 1; });
var i, len = dimensions.reduce(function(a, b) { return a * b; }),
defval = (type === 'string') ? '' : 0;
defval = (type === 'string') ? '' : 0;
array = [];
for (i = 0; i < len; i += 1) {
@ -392,12 +392,12 @@ var basic = (function() {
//----------------------------------------------------------------------
var env, // Environment - passed in to program, contains tty, graphics, etc.
state, // Program state - initialized at runtime
lib, // Statement Library (closure over state and env)
funlib, // Function Library (closure over state and env)
peek_table, // Native memory access shims (PEEK, POKE, CALL)
poke_table,
call_table;
state, // Program state - initialized at runtime
lib, // Statement Library (closure over state and env)
funlib, // Function Library (closure over state and env)
peek_table, // Native memory access shims (PEEK, POKE, CALL)
poke_table,
call_table;
//
// NOTE: tempting to make these part of env but some access/modify program state,

View File

@ -583,6 +583,8 @@ function which implements the logic for walking over the array.<p>
<code>HSCRN(<var>x</var>,<var>y</var>)</code> is added to allow reading the
hires screen. On a real Apple II this required a machine-language routine (or a shape table and <code>XDRAW</code>) and
extensive knowledge of the Apple II's color generation scheme.
<li id="hex">
Hexadecimal number literals are permitted, with <code>$</code> as a prefix, e.g. <code>POKE $C010, 0</code>
</ol>
</section>