[Info-vax] Any Way to Pass Arrays of Strings from C to Basic?
Arne Vajhøj
arne at vajhoej.dk
Fri Nov 8 13:46:00 EST 2019
On 11/8/2019 1:27 PM, Simon Clubley wrote:
> On 2019-11-08, Bob Gezelter <gezelter at rlgsc.com> wrote:
>> On Friday, November 8, 2019 at 8:16:44 AM UTC-5, Simon Clubley wrote:
>>>
>>> BTW, I don't know DEC Basic. Can you _directly_ call into a DEC BASIC
>>> function from a C language routine and if so, are there limits on
>>> what can be passed from the C routine into the DEC BASIC routine ?
>>>
>>> If there are not, then I don't see why you can't just use one of
>>> the various C language SAX parsers and register your BASIC function
>>> as the callback handler if you didn't want to bother with one of
>>> the DOM style parsers.
>>>
>> Simon,
>>
>> Been there, done that. In a variety of language combinations, some
>> involving BASIC, some not.
>>
>
> So have I in a variety of languages, but never involving DEC Basic...
>
> The kind of thing I was thinking of was if a C routine could pass
> a null terminated string _directly_ into a DEC Basic function or
> if DEC Basic functions could only receive strings when passed in
> by descriptor.
I believe (and somewhat confirmed by these threads)
that the options are:
A) explicit construct D descriptor on C side, call with that,
use as String on Basic side
B) call with C "string" and on Basic side receive a byte array
and get it stuffed into a string
I would go for #A.
Arne
More information about the Info-vax
mailing list