RE: [BLACKBOX] structured return types

From: CFB Software <"CFB>
Date: Fri, 3 Jul 2009 16:37:14 +0930

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

>-----Original Message-----
>From: Treutwein Bernhard
>[mailto:Bernhard.Treutwein{([at]})nowhere.xy
>Sent: Friday, 3 July 2009 4:26 PM
>To: chris{([at]})nowhere.xy
>Subject: RE: [BLACKBOX] structured return types
>
>Hi Chris,
>
>[...]
>>
>> I don't think the following suggestion will be much help to you in
>> this case but hopefully it might help to trigger some other ideas:
>>
>> If there were only a couple of functions involved a simple
>workaround
>> would be to write a wrapper in C that took the returned value and
>> passed it back via a parameter.
>> You could then call the wrapper function from Component Pascal. e.g
>> something like: (pretend the following is all coded in C)
>>
>> PROCEDURE Xyz(): SomeStructuredType;
>> BEGIN
>> ...
>> END Xyz;
>>
>

>I have no idea, what happens to the stack in this case.
>
>If the stack is pushed & popped by the calling function, we
>won't have anything left on the stack ...
>

It has to work otherwise you wouldn't be able to access structured results
in a C program either. At some point the contents of the stack have to be
copied to the variable that the function is assigned to. e.g.

c = Xyz();

The more I think about it the more I uderstand the reluctance to implement
structured results ;-)

How are you by the way? I was hoping I might be able to catch up with you at
another Oberon Day this year but time is running out ...

Cheers,
Chris



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

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRcc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YmxlIHRvIGNhdGNoIHVwIHdpdGggeW91IGF0XHBhcg0K
YW5vdGhlciBPYmVyb24gRGF5IHRoaXMgeWVhciBidXQgdGltZSBpcyBydW5uaW5nIG91dCAuLi4g
XHBhcg0KXHBhcg0KQ2hlZXJzLFxwYXINCkNocmlzXHBhcg0KXHBhcg0KfX0ArAAFAA==


----boundary-LibPST-iamunique-1692599527_-_---
Received on Fri Jul 03 2009 - 09:07:14 UTC

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