On Mon, 21 Apr 2003 16:20:53 +0000 (UTC), davidy@cogs.susx.ac.uk
wrote:
>Can anyone offer any suggestions as to how to persuade the external
>interface to pass the address of an arbitrary element of a vector to an
>external procedure?
>
(snip)
>I realise that I can always provide an intermediate external routine
>that takes an address and an offset and adds them before calling the
>real routine. However, that's a pain as it has to be done for every
>external routine I want to call, and it would be much handier to have
>something that did it in Pop-11.
Surely only one intermediate? (Or one for each type of external
pointer).
The new routine doesn't call the real routine: it merely returns
the address for you to pass to the real routine?
I.e. instead of
vars x = initintvec(100);
exacc foo(x[30], 10);
which doesn't work, you do
vars x = initintvec(100);
exacc foo(addr(x, 30), 10);
where you have to define the addr function (once) but can use it
wherever you want to do this.
Am I missing something?
Jonathan
--
(Replace netspam by jlc when appropriate)
|