Subject: [FreeVMS] Re: Subroutine interface definitions
From: Roar Thronæs (roart@nvg.ntnu.no)
Date: Sun Dec 28 2003 - 13:03:30 CET
On Sun, Dec 28, 2003 at 02:57:59AM +0000, Edward Brocklesby wrote:
>
> On Sat, 2003-12-27 at 09:25, Roar Thron??s wrote:
> > I am not sure whether we should support null-termination.
> > People have been burnt by null-termination more than enough.
>
> I would rather see the C compiler generating automatically the
> descriptor, as it works for other languages. In PL/I for example I can
> write:
How would the compiler know the difference between when to pass
'log' as null terminated string and as a string descriptor?
> sts$value = cli$present('log');
>
> With some of the C99 literal extensions, it *may* not even be required
How do you use C99 literals for this?
Can we have a macro that does something like the Bliss %ASCID?
Would rather use cli$present(%ASCID'log') than cli$present('log'),
since it makes it clear that null termination is not used.
Is there a particular problem in C of using
$DESCRIPTOR(str,"xyz");
or
struct dsc$descriptor d;
d.dsc$a_pointer=...;
d.dsc$w_length=...;
?
> It'd also be more in the spirit of similar VMS extensions, such as
> taking the address of a numeric literal; f(&10), which makes certain
> system service calls a /lot/ easier..
That is also what actually happens with the default Bliss call f(10);
But having to use a patched compiler may be too much work at this
early stage.
Regards,
Roar Thronæs
-- Liste de diffusion FreeVMS Pour se désinscrire : mailto:freevms-request@ml.free.fr?subject=unsubscribe
This archive was generated by hypermail 2b25 : Sun Dec 28 2003 - 13:03:58 CET