- Length of string varies!

From: [at]} <Alexander>
Date: Sat, 30 Sep 2006 01:14:51 +0700

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

Hello, Douglas!

DGD> Ah, but if x$ is a "string" which you seem to imply includes the
DGD> terminal 0X then when I call
DGD> LEN(x$) in the outer procedure I should also get the value 3 and not 2.
DGD> There seems to be
DGD> an inconsistency.

  That's because you measure LEN(x$) on the outside, but LEN(y) on the
  inside. You should measure LEN(y$) to get consistent results.

  From Docu/CP-Lang:

LEN(v, x)
  parameters: v: array; x: integer constant
    result: INTEGER length of v in dimension x (first dimension = 0)
    
LEN(v)
  parameter: array type
    result: INTEGER equivalent to LEN(v, 0)
    
LEN(v)
  parameter: String
    result: INTEGER length of string (not counting 0X) (!)

---=====---
 Alexander

--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy


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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEhlbGxvLCBEb3VnbGFzIVxwYXINClxwYXINCkRH
RD4gQWgsIGJ1dCBpZiB4JCBpcyBhICJzdHJpbmciIHdoaWNoIHlvdSBzZWVtIHRvIGltcGx5IGlu
Y2x1ZGVzIHRoZVxwYXINCkRHRD4gdGVybWluYWwgMFggdGhlbiB3aGVu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NofX0A
bThvcXZkVzAwMA==


----boundary-LibPST-iamunique-582519247_-_---
Received on Fri Sep 29 2006 - 20:14:51 UTC

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