Category:ALGOL 68: Difference between revisions

m
soft=blue, meek=green, weak=yellow, firm=orange, STRONG=red
m (soft=blue, meek=green, weak=yellow, firm=orange, STRONG=red)
Line 175:
!rowspan=2| Coercion examples
|-
|bgcolor=eeeeee0000ff|Soft
|bgcolor=dddddd00ee00|Meek
|bgcolor=ccccccdddd00|Weak
|bgcolor=bbbbbbcc8800|Firm
|bgcolor=aaaaaabb0000|Strong
|-
!S<br>
Line 197:
* All parts (but one) of a balanced clause
* One side of an identity relation, as "~" in: <lang algol68> ~ IS ~</lang>
|bgcolor=EEEEEE0000ff rowspan=4 width="50px"| deproc- eduring
|bgcolor=DDDDDD00ee00 rowspan=3 width="50px"| all '''soft''' then weak deref- erencing
|bgcolor=CCCCCCdddd00 rowspan=2 width="50px"| all '''weak''' then deref- erencing
|bgcolor=BBBBBBcc8800 rowspan=1 width="50px"| all '''meek''' then uniting
|bgcolor=AAAAAAbb0000 width="50px"| all '''firm''' then widening, rowing and voiding
|colspan=1 bgcolor=AAAAAAbb0000|
Widening occurs if there is no loss of precision. For example: An INT will be coerced to a REAL, and a REAL will be coerced to a LONG REAL. But not vice-versa. Examples:
<lang algol68>INT to LONG INT
Line 222:
*Operands of formulas as "~" in:<lang algol68>OP: ~ * ~</lang>
*Parameters of transput calls
|colspan=3 bgcolor=BBBBBBcc8800| Example:
<lang algol68>UNION(INT,REAL) var := 1</lang>
|-
Line 235:
<lang algol68>FROM ~ BY ~ TO ~ WHILE ~ DO ... OD etc</lang>
* Primaries of calls (e.g. sin in sin(x))
|colspan=4 bgcolor=CCCCCCdddd00|Examples:
<lang algol68>REF REF BOOL to BOOL
REF REF REF INT to INT</lang>
Line 246:
* Primaries of slices, as in "~" in: <lang algol68>~[1:99]</lang>
* Secondaries of selections, as "~" in: <lang algol68>value OF ~</lang>
|colspan=5 bgcolor=DDDDDD00ee00|Examples:
<lang algol68>REF BOOL to REF BOOL
REF REF INT to REF INT
Line 257:
t
|| The LHS of assignments, as "~" in: <lang algol68>~ := ...</lang>
|colspan=6 bgcolor=EEEEEE0000ff| Example:
* deproceduring of: <lang algol68>PROC REAL random: e.g. random</lang>
|}