Add info about the label assignment operator
git-svn-id: svn://svn.cc65.org/cc65/trunk@2550 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -506,14 +506,23 @@ use symbols and labels, giving a lot of flexibility.
|
|||||||
|
|
||||||
<sect1>Numeric constants<p>
|
<sect1>Numeric constants<p>
|
||||||
|
|
||||||
Numeric constants are defined using the equal sign. After doing
|
Numeric constants are defined using the equal sign or the label assignment
|
||||||
|
operator. After doing
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
two = 2
|
two = 2
|
||||||
</verb></tscreen>
|
</verb></tscreen>
|
||||||
|
|
||||||
may use the symbol "two" in every place where a number is expected, and it is
|
may use the symbol "two" in every place where a number is expected, and it is
|
||||||
evaluated to the value 2 in this context. An example would be
|
evaluated to the value 2 in this context. The label assignment operator causes
|
||||||
|
the same, but causes the symbol to be marked as a label, which may cause a
|
||||||
|
different handling in the debugger:
|
||||||
|
|
||||||
|
<tscreen><verb>
|
||||||
|
io := $d000
|
||||||
|
</verb></tscreen>
|
||||||
|
|
||||||
|
The right side can of course be an expression:
|
||||||
|
|
||||||
<tscreen><verb>
|
<tscreen><verb>
|
||||||
four = two * two
|
four = two * two
|
||||||
|
|||||||
Reference in New Issue
Block a user