[Info-vax] Whither VMS?

Michael Kraemer M.Kraemer at gsi.de
Mon Oct 5 03:02:51 EDT 2009


glen herrmannsfeldt schrieb:

> 
> I forget know whether STRINGSIZE defaults to enabled or not.

I remember "disabled" was the default.
And we all know what to think about security measures
which have to be enabled explicitly.

> It is easy to enable if needed, either for the procedure or
> by the statement.  It is much more difficult in C to add the
> check to a program not designed for it.
>  
> < A solution superior to C would be if PL/I allowed stuff like
>  
> < DCL AA,BB,CC CHAR(*) VAR;
> < CC = AA || BB;
>  
> < with automatic (re)allocation of CC with just the right length,
> < thanks to the descriptor concept.
> < Wasn't possible at the time I had to leave PL/I.
> 
> Not automatic, but still probably easier than doing the right
> thing in C.  Deallocate if needed, allocate to length(aa)+length(bb),
> assign.

As a draft (didn't check it really):

cc = calloc( strlen(aa)+strlen(bb)+1, sizeof(*cc) );
strcat(cc,aa); strcat(cc,bb);

vs

BEGIN;
DCL CC CHAR( LENGTH(aa)+LENGTH(bb) ) VAR;
CC = AA || BB;
END;

is not that much of a difference.
I doubt it would be much different with the CONTROLLED or BASED
storage classes.

> 
> Well, arrays, strings, and structures are passed by descriptor.

which means they can be trashed / modified anytime by the callee.

> It might be that VALUE has been added now for calls to C.

But it would not be the default, because that would break
compatibility with PL/I code of 40 years.




More information about the Info-vax mailing list