Re: [BLACKBOX] SYSTEM.VAL, WITH, IS, and type casting

From: [at]} <CFB>
Date: Tue, 23 Aug 2011 21:29:20 +0930

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

>From: BlackBox [mailto:BLACKBOX{([at]})nowhere.xy
>Behalf Of Douglas G. Danforth
> Sent: Monday, 22 August 2011 4:53 PM
> To: BLACKBOX{([at]})nowhere.xy
> Subject: [BLACKBOX] SYSTEM.VAL, WITH, IS, and type casting
>
> In Stores I find
>
> PROCEDURE (VAR rd: Reader) ReadSChar* (OUT x: SHORTCHAR), NEW;
> BEGIN
> rd.rider.ReadByte(SYSTEM.VAL(BYTE, x))
> END ReadSChar;
>
> That is a strange strategy!
>

I agree - it does look weird! Effectively it is equivalent to:

  PROCEDURE (VAR rd: Reader) ReadSChar* (OUT x: SHORTCHAR), NEW;
  VAR
    b: BYTE;
  BEGIN
    rd.rider.ReadByte(b);
    SYSTEM.VAL(BYTE, x) := b;
  END ReadSChar;

which I would not expect to work (and does not work).

Regards,
Chris

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


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1778927100_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwID5Gcm9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URSwgeCkgOj0gYjtccGFyDQogIEVORCBSZWFkU0No
YXI7XHBhcg0KXHBhcg0Kd2hpY2ggSSB3b3VsZCBub3QgZXhwZWN0IHRvIHdvcmsgKGFuZCBkb2Vz
IG5vdCB3b3JrKS5ccGFyDQpccGFyDQpSZWdhcmRzLFxwYXINCkNocmlzIFxwYXINClxwYXINCkNo
cmlzIEJ1cnJvd3NccGFyDQpDRkIgU29mdHdhcmVccGFyDQpodHRwOi8vd3d3LmFzdHJvYmUuY29t
XHBhcg0KXHBhcg0KXHBhcg0KLS0tLVxwYXINClRvIHVuc3Vic2NyaWJlLCBzZW5kIGEgbWVzc2Fn
ZSB3aXRoIGJvZHkgIlNJR05PRkYgQkxBQ0tCT1giIHRvIExJU1RTRVJWQExJU1RTLk9CRVJPTi5D
SFxwYXINCn0=
----boundary-LibPST-iamunique-1778927100_-_---
Received on Tue Aug 23 2011 - 13:59:20 UTC

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