Re: [BLACKBOX] Reading of OUT parameters: problem solved

From: [at]} <Rainer>
Date: Tue, 14 Apr 2009 14:53:23 +0200

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

I agree :-)

On the other hand I have quite often procedures with an OUT parameter
(e.g an error flag), which is set and subsequently read in the same
procedure body.
The current behaviour of OUT parameters frees me from creating an
addtional local variable, working on this variable, and assigning its
value to the OUT parameter at the end of the procedure body (which
could be forgtten easily).

Very convenient !

Best regards,
Rainer


Am 09.04.2009 um 09:23 schrieb Josef Templ:


> Strange!
> It seems that there is no difference between OUT and VAR
> except that pointers are set to NIL at procedure entry.
> This is kind of strange because IN params are read-only.
> So, for symmetry, one would expect OUT params
> to be write-only. At first, it looks like a bug in the compiler.
> But the language report is also unsymmetric and does not state
> that OUT params are write-only.
>
> I guess that in the initial CP design OUT params were supposed
> to be write-only indeed, but there have been some detail problems in
> the implementation that prevented this approach.
>
> - JT
>
>
> ----- Original Message ----- From: "Rainer Neubauer"
> <rainer.neubauer{([at]})nowhere.xy
> To: <BLACKBOX{([at]})nowhere.xy
> Sent: Wednesday, April 08, 2009 7:42 PM
> Subject: [BLACKBOX] Reading of OUT parameters: problem solved
>
>
>
>> Alexander,
>> thanks for clarification of things.
>> I unfortunately had a very tricky problem which took plenty of
>> time for debugging today.
>> Right now I suceeded in tracking down the problem to its root.
>> Thanks again for your help :-) :-)
>> Best regards,
>> Rainer
>> Am 08.04.2009 um 19:12 schrieb Alexander Iljin:
>>
>>> Hello!
>>>
>>> RN> thanks a lot for your instant (!!) reply :-)
>>>
>>> RN> So I suppose, it is possible to use OUT params as local

>>> variables in
>>> RN> the procedure body. Right ?
>>>
>>> Yes, of course. By the way, the contents of the variables is not
>>> strictly undefined: pointer variables are guaranteed to = NIL on
>>> procedure entry.
>>>
>>> ---=====---
>>> Alexander
>>>
>>>
>> ----
>> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
>> LISTSERV{([at]})nowhere.xy
>>
>
>
> ----
> To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
> LISTSERV{([at]})nowhere.xy
>


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1487756794_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEkgYWdyZWUgICA6LSlccGFyDQpccGFyDQpPbiB0
aGUgb3RoZXIgaGFuZCBJIGhhdmUgcXVpdGUgb2Z0ZW4gcHJvY2VkdXJlcyB3aXRoIGFuIE9VVCBw
YXJhbWV0ZXIgIFxwYXINCihlLmcgYW4gZXJyb3IgZmxhZyksIHdoaWNoIGlzIHNldCBhbmQgc3Vi
c2VxdWVudGx5IHJlYWQgaW4gdGhlIHNhbWUgIFxwYXINCnByb2NlZHVyZSBib2R5LlxwYXINClRo
ZSBjdXJyZW50IGJlaGF2aW91ciBvZiBPVVQgcGFyYW1ldGVycyBmcmVlcyBtZSBmcm9tIGNyZWF0
aW5nIGFuICBccGFyDQphZGR0aW9uYWwgbG9jYWwgdmFyaWFibGUsIHdvcmtpbmcgb24gdGhpcyB2
YXJpYWJsZSwgYW5kIGFzc2lnbmluZyBpdHMgIFxwYXINCnZhbHVlIHRvIHRoZSBPVVQgcGFyYW1l
dGVyIGF0IHRoZSBlbmQgb2YgdGhlIHBy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AiU0lHTk9GRiBCTEFDS0JPWCIg
dG8gTElTVFNFUlZATElTVFMuT0J9fQBiR3h2SUZKaGFXNQ==
----boundary-LibPST-iamunique-1487756794_-_---
Received on Tue Apr 14 2009 - 14:53:23 UTC

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