[BLACKBOX] Parameters in module Files

From: [at]} <Rainer>
Date: Thu, 27 May 2010 16:27:33 +0200

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

Hi all,
just a question of interest:

In module Files there are procedures to read / write byte arrays
from / to files:
(r: Reader) ReadBytes (VAR x: ARRAY OF BYTE; beg, len: INTEGER),
NEW, ABSTRACT
(w: Writer) WriteBytes (IN x: ARRAY OF BYTE; beg, len: INTEGER),
NEW, ABSTRACT

Does anybody have an idea what the beg and len parameters are good for ?
Why not just
(r: Reader) ReadBytes (VAR x: ARRAY OF BYTE), NEW, ABSTRACT
(w: Writer) WriteBytes (IN x: ARRAY OF BYTE), NEW, ABSTRACT

In these cases the lenghts of the arrays would determine the count of
bytes to read / write.
Why the offset within the arrays specified by the parameters beg ?

Is this for additional flexibility ?

Best regards,
Rainer


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-2073516981_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhpIGFsbCxccGFyDQpqdXN0IGEgcXVlc3Rpb24g
b2YgaW50ZXJlc3Q6XHBhcg0KXHBhcg0KSW4gbW9kdWxlIEZpbGVzIHRoZXJlIGFyZSBwcm9jZWR1
cmVzIHRvIHJlYW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hIG1lc3NhZ2Ugd2l0aCBib2R5ICJTSUdOT0ZGIEJMQUNLQk9YIiB0byBMSVNUU0VS
VkBMSVNUUy5PQkVST04uQ0h9fQAwS1Bp
----boundary-LibPST-iamunique-2073516981_-_---
Received on Thu May 27 2010 - 16:27:33 UTC

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