(unknown charset) Re: [BLACKBOX] ARRAY as CONSTANT

From: (unknown charset) Oleg N. Cher <"Oleg>
Date: Wed, 13 Feb 2008 12:38:13 +0200

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

Dear igor,

>You can put your data into strings.

Yes, you're RIGHT.
But BB compiler does not allow to put binary data
(concretely symbol 0X) into a string. Please check:

MODULE Show;
IMPORT StdLog;

PROCEDURE InitString (a: ARRAY OF SHORTCHAR);
BEGIN
        StdLog.Int(LEN(a))
END InitString;

PROCEDURE Do*;
BEGIN
        InitString(0X + 0X + 0X + "a" + 0X + 0X)
    (* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Length of this string is 2
               We checks LEN(a), not LEN(a$) ! *)
END Do;

BEGIN
END Show.

>
  Symbol 0X simply ignored by compiler.
And I did a conclusion that all strings in BlackBox
are null-terminated, and cannot contain superfluous nulls.
It means we never can save binary information into strings.


Oleg N. Cher,
Colossoft Research.
allot{([at]})nowhere.xy
2008-02-13


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1752777026_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTFcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIERlYXIgaWdvcixccGFyDQpccGFyDQo+WW91IGNh
biBwdXQgeW91ciBkY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ZSBiaW5hcnkgaW5mb3JtYXRpb24gaW50byBzdHJpbmdzLlxwYXINClxwYXINClxw
YXINCk9sZWcgTi4gQ2hlcixccGFyDQpDb2xvc3NvZnQgUmVzZWFyY2guXHBhcg0KYWxsb3RAdWty
Lm5ldFxwYXINCjIwMDgtMDItMTNccGFyDQpccGFyDQpccGFyDQotLS0tXHBhcg0KVG8gdW5zdWJz
Y3JpYmUsIHNlbmQgYSBtZXNzYWdlIHdpdGggYm9keSAiU0lHTk9GRiBCTEFDS0JPWCIgdG8gTElT
VFNFUlZATElTVFMuT0JFUk9OLkNIXHBhcg0KfQ==
----boundary-LibPST-iamunique-1752777026_-_---
Received on Wed Feb 13 2008 - 11:38:13 UTC

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