Re: [BLACKBOX] Exporting records / record fields question

From: [at]} <Chris>
Date: Sat, 31 Jul 2010 10:48:57 +0930

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

> -----Original Message-----
> From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
> Marc Martin
> Sent: Friday, 30 July 2010 11:17 PM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: Re: [BLACKBOX] Exporting records / record fields question
>
> > In Section 8.3.1 it states: "Note that when fields in a record r are
> > exported, r should be exported too".

>
> That makes it sound like "good programming practice", not a "compiler
> requirement".
>

I have found one module written by Wirth that appears to support this view.
In the Project Oberon book, there is a module 'Core' which has a private
type 'Queue' with a public field 'n':

  Queue = RECORD n*: INTEGER;
    first, last: Task
  END ;

The following variables are exported:

  VAR
    PrintQueue*, MailQueue*, LineQueue*: Queue;

and 'n' is then accessed in the module PrintServer e.g.

  IF (Core.PrintQueue.n > 0) ...

Regards,
Chris

Chris Burrows
CFB Software
http://www.cfbsoftware.com
  


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1566787097_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS1c
cGFyD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sbG93
aW5nIHZhcmlhYmxlcyBhcmUgZXhwb3J0ZWQ6XHBhcg0KXHBhcg0KICBWQVJccGFyDQogICAgUHJp
bnRRdWV1ZSosIE1haWxRdWV1ZSosIExpbmVRdWV1ZSo6IFF1ZXVlO1xwYXINClxwYXINCmFuZCAn
bicgaXMgdGhlbiBhY2Nlc3NlZCBpbiB0aGUgbW9kdWxlIFByaW50U2VydmVyIGUuZy5ccGFyDQpc
cGFyDQogIElGIChDb3JlLlByaW50UXVldWUubiA+IDApIC4uLlxwYXINClxwYXINClJlZ2FyZHMs
XHBhcg0KQ2hyaXNccGFyDQpccGFyDQpDaHJpcyBCdXJyb3dzXHBhcg0KQ0ZCIFNvZnR3YXJlXHBh
cg0KaHR0cDovL3d3dy5jZmJzb2Z0d2FyZS5jb21ccGFyDQogIFxwYXINClxwYXINClxwYXINCi0t
LS1ccGFyDQpUbyB1bnN1YnNjcmliZSwgc2VuZCBhIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZG
IEJMQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5PQkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-1566787097_-_---
Received on Sat Jul 31 2010 - 03:18:57 UTC

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