----boundary-LibPST-iamunique-1378346021_-_-
Content-type: text/plain
Gérard Meunier wrote:
> Douglas G. Danforth a écrit :
>> Folks,
>> I just discovered that the length of a string varies depending
>> upon whether it is used directly or passed as an argument to
>> a procedure for example
>>
>> VAR x: ARRAY 32 OF CHAR;
>> x := "HI";
>>
>> will have length
>> LEN(x$) = 2
>> but will have length
>> LEN(y) = 3
>> when it is passed to a procedure with argument y.
...
> It's because you pass x$, and not x itself. x$ is the string inside
> the array of char, so its length is the length of the string plus 1
> (terminal 0X).
>
> Gérard
Ah, but if x$ is a "string" which you seem to imply includes the
terminal 0X then when I call
LEN(x$) in the outer procedure I should also get the value 3 and not 2.
There seems to be
an inconsistency.
-Doug
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-1378346021_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBccGFyDQpccGFyDQpHXCdlOXJh
cmQgTWV1bmllciB3cm90ZTpccGFyDQo+IERvdWdsYXMgRy4gRGFuZm9ydGggYSBcJ2U5Y3JpdCA6
XHBhcg0KPj4gRm9sa3MsXHBhcg0KPj4gSSBqdXN0IGRpc2NvdmVyZWQgdGhhdCB0aGUgbGVuZ3Ro
IG9mIGEgc3RyaW5nIHZh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