Jump to content
Excelsior Forums
Sign in to follow this  

Bug in Oberon compiler?

Recommended Posts


I may have found a bug in your Oberon compiler (perhaps it is already known). Namely if you take the following program:

<*+ MAIN *>


(* Testing whether FALSE, TRUE, and NIL can be redefined. It turns out

  YES. With regard to FALSE, and TRUE that seems logical as they are

  only PREDEFINED. However, this does not hold for NIL which is listed

  among symbols that cannot be used in the role of identifiers (see

  Programming in OBERON, A3)





FALSE:=1; TRUE:=2; NIL:=2.3*TRUE

END Test.

you will find that it compiles without errors, which is not right; in my view one should not be able to use NIL as a variable (see Oberon-2 Report included in XDS x-86 Native, Vocabulary and Representation, par. 5).



Share this post

Link to post
Share on other sites

This is a known misfeature of the Oberon language family. Other compilers are known to expose the same behaviour, including the original Oberon System.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this