Re: NIL (again)

From: Fyodor Tkachov <"Fyodor>
Date: Sun, 17 Oct 2004 18:36:06 +0400

----boundary-LibPST-iamunique-506215142_-_-
Content-type: text/plain

So, the two lists ("reserved words", sec. 3.5, and "predeclared identifiers", sec. 4) are treated differently by the compiler:

MODULE PrivNil;

CONST TRUE = 0; NIL = 0;

END PrivNil.

It is allowed to redefine the predeclared identifiers, but not the reserved words.

Apparently, redefining NIL is far too dangerous -- would break the garbage collector,
whereas redefining ENTIER could be useful if the built-in routine has a bug,
and redefining INTEGER could be useful when porting ... etc.

Is it correct?

Cheers
Fyodor

> > The 1.4 compiler with service pack 1 gives an error for your code at the
> > place I have marked with [X]
> > MODULE PrivNil;
> >
> > CONST[X] NIL = 0;
> >
> > END PrivNil.
> >
> > The error message is "PROCEDURE, BEGIN, or END missing."

>
> Yes, exactly, Doug. this message proves that the next word "NIL" is not one
> of the keywords expected here, and so, that it is itself a keyword.

Powered by the E-mail PIM - Info Select - www.miclog.com
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-506215142_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ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bmcgdGhlIHdvcmQgImhlbHAi
IHRvIHRoZSBhYm92ZSBhZGRyZXNzLlxwYXINClxwYXINClNlbmQgYW55IHByb2JsZW0gcmVwb3J0
cyBvciBxdWVzdGlvbnMgcmVsYXRlZCB0byB0aGlzIGVtYWlsIGxpc3QgdG8gdGhlIGxpc3Qgb3du
ZXIgYXRccGFyDQogICBvd25lci1ibGFja2JveEBvYmVyb24uY2hccGFyDQpccGFyDQpDdXJyZW50
IHBvc3RpbmcgcG9saWN5OlxwYXINClxwYXINCmEpIFRvIHBvc3QgeW91IHNob3VsZCB1c2UgdGhl
IHNhbWUgYWRkcmVzcyBieSB3aGljaCB5b3UgYXJlIHN1YnNjcmliZWQgdG8gdGhlIG1haWxpbmcg
bGlzdC4gVGhhdCB3YXksIHRoZSBsaXN0IHNlcnZlciB3aWxsIHJlY29nbml6ZSB5b3UgYXMgc3Vi
c2NyaWJlciBhbmQgZm9yd2FyZCB5b3VyIHBvc3RpbmcgaW1tZWRpYXRlbHksIHdpdGhvdXQgY3Jl
YXRpbmcgYW55IG92ZXJoZWFkLlxwYXINClxwYXINCmIpIElmLCBmb3Igc29tZSByZWFzb24sIHlv
dSBjYW5ub3QgcG9zdCBmcm9tIHRoZSBhZGRyZXNzLCBieSB3aGljaCB5b3UgYXJlIHN1YnNjcmli
ZWQsIHlvdXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFtLiBQbGVhc2Ug
dW5kZXJzdGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21lIGRlbGF5LCBp
biBwYXJ0aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWRheX19AGdpbmFsQQ=


----boundary-LibPST-iamunique-506215142_-_---
Received on Sun Oct 17 2004 - 16:36:06 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:33 UTC