Boolean values: Difference between revisions

Content added Content deleted
m (→‎[[Boolean values#ALGOL 68]]: Note: The STRING REPResentation of FALSE and TRUE are defined by the variables ''flop'' and ''flip'' respectively.)
Line 16: Line 16:
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny]}}
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny]}}
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - note: null char is missing, AND the C generated is won't compile, so some conversions are missing from RS}}
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - note: null char is missing, AND the C generated is won't compile, so some conversions are missing from RS}}
ALGOL 68 Enforces strong typing and so has few default coersions. The appropriate operators must be used to convert to and from BOOLean. The following code demonstrates principle conversions:
ALGOL 68 Enforces strong typing and so has few default coersions. The appropriate operators must be used to convert to and from BOOLean and the following code demonstrates principle conversions:
<lang algol68>BOOL f = FALSE, t = TRUE;
<lang algol68>BOOL f = FALSE, t = TRUE;
[]BOOL ft = (f, t);
[]BOOL ft = (f, t);
Line 49: Line 49:
Output:
Output:
<pre>
<pre>


FALSE: F or F
FALSE: F or F
void: => F
void: => F