lotus



previous page: C14.3) New features in version 5.1 of the Compiler
  
page up: BETA Programming Language FAQ
  
next page: B01) How do you compare text strings in BETA?

C14.4) New features in version 5.0 of the Compiler




Description

This article is from the FAQ, by with numerous contributions by others.

C14.4) New features in version 5.0 of the Compiler

The following new features have been implemented in version 5.0 of the
compiler, compared to version 4.4.2.

Xor Primitive
An xor primitive is now supported as a basic operation on booleans.
That is

           b1, b2, b3: @boolean
        do (b1 xor b2)->b3

is now possible.

Simple If
Often, the following if-construct is used

           b: @boolean;
        do (if b//TRUE then
             ...
           else
             ...
           if);

The BETA compiler now supports an extension to the BETA language called
simple-if. This extension means that the case selector may be omitted
if the evaluation on the left hand side exits a boolean; it will
default to //TRUE. That is, the above may be written:

           b: @boolean;
        do (if b then
             ...
           else
             ...
           if);

Labelled imperatives
Labelled imperatives were previously defined in two forms:

L: Imp;

and

(L: Imp1; ...; :L)

The second form has now been removed from the language. Instead, the
compiler offers the form

L: (# do Imp1; ... #)

Note that this form is implemented very efficiently in the case where
there are no declarations in the object descriptor.



 

Continue to:















TOP
previous page: C14.3) New features in version 5.1 of the Compiler
  
page up: BETA Programming Language FAQ
  
next page: B01) How do you compare text strings in BETA?