RE: Forward Declaration Syntax

From: [at]} <support{>
Date: Mon, 25 Mar 2002 12:50:52 +0100

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

Dear Sir

There used to be a few editorial errors in the Appendix B of the language
description. The description in the text used to be the correct reference.

We have decided to make a corrected document available to the BlackBox user
community through Patch.14.020321, which you can now retrieve from our Web
server via our patch distribution service.

All the best,
        The BlackBox Supporters

> -----Original Message-----
> From: mcintosh{([at]})nowhere.xy
> Sent: Thursday, March 21, 2002 1:34 PM
> To: blackbox{([at]})nowhere.xy
> Subject: Forward Declaration Syntax
>
>
> I ran the syntax from Appendix B: Syntax of Component Pascal through
> Coco. I think that there is a discrepancy between the Forward
> procedure declaration in the explanitory text and the syntax diagram.
> The compiler seems to require the version in the explanitory text.
>
> I wish that I had a current syntax to feed Coco.
>
> MODULE PrivAlm01TestForward;
> (* Test the compiler behavior on forward declarations. *)
> TYPE ReceiveRecord = POINTER TO RECORD END;
> PROCEDURE ^ (this:ReceiveRecord) Forward ( ):INTEGER, NEW;
> (*The NEW is the discrepancy *)
> PROCEDURE (this:ReceiveRecord) Forward ( ):INTEGER, NEW;
> BEGIN
> RETURN 42
> END Forward;
> END PrivAlm01TestForward.
>
>
> From the explanitory text.

>
> ProcedureHeading = PROCEDURE [Receiver] IdentDef
> [FormalParameters] MethAttributes.
> Receiver = "(" [VAR | IN] ident ":" ident ")".
> MethAttributes = ["," NEW] ["," (ABSTRACT | EMPTY | EXTENSIBLE)].
>
> ProcedureDeclaration = ProcedureHeading ";" [ ProcedureBody ident ].
> ProcedureHeading = PROCEDURE [Receiver] IdentDef
> [FormalParameters] MethAttributes.
> ProcedureBody = DeclarationSequence
> [BEGIN StatementSequence] END.
> DeclarationSequence = {CONST {ConstantDeclaration ";"} |
> TYPE {TypeDeclaration ";"} |
> VAR {VariableDeclaration ";"} }
> {ProcedureDeclaration ";" | ForwardDeclaration ";"}.
> ForwardDeclaration = PROCEDURE " ^ " [Receiver] IdentDef
> [FormalParameters] MethAttributes.
>
>
> From the syntax diagrams.

>
> ForwardDecl = PROCEDURE "^" [Receiver] IdentDef [FormalPars].
> ProcDecl = PROCEDURE [Receiver] IdentDef [FormalPars]
> ["," NEW] ["," (ABSTRACT | EMPTY | EXTENSIBLE)]
> [";" DeclSeq [BEGIN StatementSeq] END ident].

--------------------------------------------

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 mode
ration will often cause some delay, in particular over weekends or holydays.


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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIERlYXIgU2lyXHBhcg0KXHBhcg0KVGhlcmUgdXNl
ZCB0byBiZSBhIGZldyBlZGl0b3JpYWwgZXJyb3JzIGluIHRoZSBBcHBlbmRpeCBCIG9mIHRoZSBs
YW5ndWFnZVxwYXINCmRlc2NyaXB0aW9uLiBUaGUgZGVzY3JpcHRpb24ga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jaFxwYXINClxwYXINCkN1
cnJlbnQgcG9zdGluZyBwb2xpY3k6XHBhcg0KXHBhcg0KYSkgVG8gcG9zdCB5b3Ugc2hvdWxkIHVz
ZSB0aGUgc2FtZSBhZGRyZXNzIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCB0byB0aGUgbWFp
bGluZyBsaXN0LiBUaGF0IHdheSwgdGhlIGxpc3Qgc2VydmVyIHdpbGwgcmVjb2duaXplIHlvdSBh
cyBzdWJzY3JpYmVyIGFuZCBmb3J3YXJkIHlvdXIgcG9zdGluZyBpbW1lZGlhdGVseSwgd2l0aG91
dCBjcmVhdGluZyBhbnkgb3ZlcmhlYWQuXHBhcg0KXHBhcg0KYikgSWYsIGZvciBzb21lIHJlYXNv
biwgeW91IGNhbm5vdCBwb3N0IGZyb20gdGhlIGFkZHJlc3MsIGJ5IHdoaWNoIHlvdSBhcmUgc3Vi
c2NyaWJlZCwgeW91ciBtZXNzYWdlIHdpbGwgYmUgbW9kZXJhdGVkIHRvIGF2b2lkIHNwYW0uIFBs
ZWFzZSB1bmRlcnN0YW5kIHRoYXQgbW9kZVxwYXINCnJhdGlvbiB3aWxsIG9mdGVuIGNhdXNlIHNv
bWUgZGVsYXksIGluIHBhcnRpY3VsYXIgb3ZlciB3ZWVrZW5kcyBvciBob2x5ZGF5fX0Acm9uLmNo
DQo+IFN1


----boundary-LibPST-iamunique-559110509_-_---
Received on Mon Mar 25 2002 - 12:50:52 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:46 UTC