Anonymous user
User talk:Mbishop: Difference between revisions
m
→Algol language file: use html entities for algol characters
(→Algol language file: new section) |
m (→Algol language file: use html entities for algol characters) |
||
Line 12:
Actually it isn't to bad. There are several types of identifiers.
* BOLD - IF/THEN/ELSE/FI, CASE/IN/OUT/ESAC, FOR/
* OPerators - can be special characters, see below.
* names - alphanumeric starting with alphabetic, spaces in the middle are ignored. Normally <i>italiced</i>.
Line 20:
There are 4 different main contexts.
* Code - BEGIN ~ END or ( ~ )
* A COmment - either CO ~ CO or COMMENT ~ COMMENT or
* A PRagmat - either PR ~ PR or PRAGMAT ~ PRAGMAT.
* STRINGs - "double quotes", where """" is a strings containing 1 double quote.
Line 34:
You will have fun with these:
The
Note that Unicode character "DECIMAL EXPONENT SYMBOL 23e8" is also permitted. eg In Algol "1 million" can be 1 000 000 or 1e6 or even 1⏨6.
Line 49:
'''channel''', '''file''', '''format''', '''struct''', '''union''',
Misc Syntax†:
'''of''', '''at''' "@", '''is''' ":=:", '''isnt''' ":
Builtin "constants"†:
'''true''', '''false''', '''empty''', '''nil''' "
Comments and Pragmats†:
'''co''' "
Flow control†:
'''case''' '''in''' '''ouse''' '''''in''''' '''out''' '''esac''' "( ~ | ~ |: ~ | ~ | ~ )",
Line 75:
|ALIGN=CENTER| 10 || '''not''', '''up''', '''down''', '''lwb''', '''upb''',
-, '''abs''', '''arg''', '''bin''', '''entier''', '''leng''', '''level''', '''odd''', '''repr''', '''round''', '''shorten'''
|
| ~
| ╰, ╭
Line 88:
!bgcolor=#cccccc|+Algol68<sup>Rev0</sup>
|-
|ALIGN=CENTER|9||+*, '''i'''||+×,
|-
|ALIGN=CENTER|8|| '''shl''', '''shr''', **, '''up''', '''down''', '''lwb''', '''upb''' ||
|-
|ALIGN=CENTER|7|| *, /, %, '''over''', %*, '''mod''', '''elem'''|| ×,
|-
|ALIGN=CENTER|6||-, + || || ||
|-
|ALIGN=CENTER|5||<, '''lt''', <=, '''le''', >=, '''ge''', >, '''gt'''||
|-
|ALIGN=CENTER|4||=, '''eq''', /=, '''ne''' ||
|-
|ALIGN=CENTER|3||&, '''and'''||
|-
|ALIGN=CENTER|2||'''or'''||
|-
|ALIGN=CENTER|1||'''minusab''', '''plusab''', '''timesab''', '''divab''', '''overab''', '''modab''', '''plusto''',
-:=, +:=, *:=, /:=, %:=, %*:=, +=:
|| ×:=,
|}
Line 118:
!bgcolor=#cccccc|+Algol68<sup>Rev0</sup>
|-
|ALIGN=CENTER| effectively 0 || :=, =:, = , :=:, :/=:, '''is''', '''isnt''', '''of''', '''at'''|| :
|}
In conclusion: in 1969 ASCII was mandated in the US, hence many of the
characters above are unfamiliar to PC users. Including - surprisingly -
the character for 1 US cent, eg 1
note: I pulled most of the above from http://en.wikipedia.org/wiki/ALGOL_68
|