[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The transition from FDR1 to FDR2 does require some source changes, due mainly to the new facilities offered by the updated parser. Apart from the loss of support for inline SML (which was never guaranteed to be maintained, and where comparable functionality is provided within the full language) the incompatibilities are all fairly minor.
pragma
used
to escape it in the past.
Thus, to modernise a script, one must globally replace pragma
channel
by just channel
.
pragma transparent
by just
transparent
.
>
operator, since it generally
clashed with the syntax for the end of a sequence.
FDR2 supplies the full suite of comparison operators, although it is
advised that parentheses be used to resolve any potential ambiguity.
datatype
declaration.
It is important for type-correctness that any objects which may need to be compared for equality (or placed in the same set) should be declared with the same type. The example given above:
pragma channel fruit : {banana, apple, orange} |
should be recoded as:
datatype FRUIT = banana | apple | orange channel fruit : FRUIT |
Of course, the non-defining use of FRUIT
in the channel
declaration could have been left as {banana,apple,orange}
.
It might be possible automatically to generate a single declaration of
all such constants as members of a single enumeration, but this
obviously circumvents the type safety which was the original purpose.
In most cases, therefore, manual intervention is probably to be
recommended.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated by Phil Armstrong on May 17, 2012 using texi2html 1.82.