Skip to content

Commit

Permalink
Cleaned up some of the wording a bit and uncommented some hidden exam…
Browse files Browse the repository at this point in the history
…ples.

No reason to hide these.  I think they are good info.  Will probably
uncomment more in the future... :)

Kent
  • Loading branch information
Kent Mein committed Sep 24, 2012
1 parent 726793f commit 2570e91
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions LPC.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h3> 3.1.2. Comments </h3>
starts with // and terminated by a new line. All characters in between are
part of the comment. Comments count as whitespace separating tokens, and
may not be nested. The sequence <tt>/*</tt> does not start a comment if it
is part of a string. <b>Note: hydra does not support // style comments currently.</b>
is part of a string. <b>Note: hydra does not support // style comments.</b>
</p>
<p>
Examples:
Expand All @@ -93,15 +93,16 @@ <h3> 3.1.2. Comments </h3>

<h3> <a name="identifiers"> 3.1.3. Identifiers </a> </h3>
<p>
An identifier is an arbitrary long sequence of letters, digits and
underscores. The first character must be a letter or underscore. Upper- and
lower-case letters are different. Only the first 1023 characters of
identifiers are significant.
An identifier is an arbitrarily long sequence of letters, digits and
underscores. To be a valid identifier in LPC, the first character
must be a letter or underscore. Only the first 1023 characters of an
identifier are significant. Note letters are case sensitive, <i>N5</i> is not
the same as <i>n5"</i>.
</p>

<h3> <a name="keywords"> 3.1.4. Keywords </a> </h3>
<p>
The following identifiers are reserved for use as keywords:
The following identifiers are reserved for use as keywords in the language:
</p>
<table border=1 cellpadding=8>
<tr>
Expand Down Expand Up @@ -142,7 +143,7 @@ <h3> <a name="keywords"> 3.1.4. Keywords </a> </h3>
<p>
<b>
Note: dgd does not support goto currently.<br>
Note: function is only available if compiled with -DCLOSURES
Note: function is only available if compiled with the -DCLOSURES option.
</b>
</p>

Expand All @@ -164,10 +165,11 @@ <h3> <a name="integer constants"> 3.1.5.1. Integer Constants </a> </h3>
A sequence of digits is taken to be a <i>decimal constant</i> (base ten)
unless it begins with <tt>0</tt>. A sequence of digits starting with <tt>0</tt>
and not including <tt>8</tt> or <tt>9</tt> is an <i>octal constant</i>
(base 8). A sequence of digits and upper- or lower-case letters in range
<tt>A</tt> through <tt>F</tt>, preceded by <tt>0x</tt> or <tt>0X</tt> is a
<i>hexadecimal constant</i> (base 16, where <tt>A</tt> through <tt>F</tt>
have the decimal values 10 through 15).
(base 8). A sequence of digits and letters in the range of <tt>A - F</tt>,
preceded by <tt>0x</tt> or <tt>0X</tt> is a
<i>hexadecimal constant</i>. (base 16, where <tt>A</tt> through <tt>F</tt>
have the decimal values 10 through 15). <b>Note: the letters can be upper or
lower case in this instance.</b>
</p>
<p>
<i>Integer constants</i> are represented by 32 bit 2's complement arithmetic,
Expand All @@ -177,15 +179,14 @@ <h3> <a name="integer constants"> 3.1.5.1. Integer Constants </a> </h3>
truncated to the lower 32 bits.
</p>
<p>

<!-- For instance, the number forty-seven can be written as 47, 057 or 0x2f.
There is a problem particular to LPCd with regard to -2147483648. Since
LPCd, unlike C, has no unsigned type, the decimal version of this number
(which is scanned as - 2147483648) is the negation of a number too large
to be represented. - and 2147483648 cannot be read as a single token,
because then 1-2147483648 would be scanned as two consecutive integers.
This number must be specified by an octal or hexadecimal constant. -->

For instance, the number forty-seven can be written as 47, 057 or 0x2f.
There is a problem particular to LPCd with regard to -2147483648. Since
LPCd, unlike C, has no unsigned type, the decimal version of this number
(which is scanned as - 2147483648) is the negation of a number too large
to be represented. - and 2147483648 cannot be read as a single token,
because then 1-2147483648 would be scanned as two consecutive integers.
This number must be specified by an octal or hexadecimal constant.
</p>

<h3> <a name="floating constants"> 3.1.5.2. Floating constants </a> </h3>
<p>
Expand Down

0 comments on commit 2570e91

Please sign in to comment.