[Info-vax] /NAME
Arne Vajhøj
arne at vajhoej.dk
Wed Feb 8 20:01:13 EST 2023
On 2/8/2023 7:01 PM, John Reagan wrote:
> On Wednesday, February 8, 2023 at 6:46:03 PM UTC-5, Arne Vajhøj wrote:
>> Am I the only that wish to be able to distinguish between
>> names the code expose and names that the code call?
>>
>> Like:
>>
>> /NAME=(EXPOSE:UPPERCASE,CALL:AS_IS)
>>
>> Use case:
>>
>> some Fortran (probably also Cobol or Basic) code -> C wrapper -> some C
>> library that has to be build with /NAME=AS_IS
>>
>> /NAME=AS_IS works fine for pure C code, but I find it a hassle
>> in Fortran.
>>
>> (it is not a problem in Pascal because the external name
>> can be specified in the external attribute)
> CDEC$ ALIAS internal-name, external-name
>
> The internal-name is the name of the subprogram as used in the current
> program unit.
>
> The external-name is either a quoted character constant (delimited by single
> quotation marks) or a symbolic name.
>
> If external-name is a character constant, the value of that constant is used
> as the external name for the specified internal name. The character constant
> is used as it appears, with no modifications for case. The default for the HP
> Fortran compiler is to force the name into uppercase.
>
> If external-name is a symbolic name, the symbolic name (in uppercase) is used
> as the external name for the specified internal name. Any other declaration of
> the specified symbolic name is ignored for the purposes of the ALIAS directive.
That solves the problem for Fortran similar to for Pascal.
Does other languages (Cobol, Basic) have similar capability
so that my enhanced /NAME is totally useless?
Arne
More information about the Info-vax
mailing list