[Info-vax] /NAME

Craig A. Berry craigberry at nospam.mac.com
Wed Feb 8 21:10:37 EST 2023


On 2/8/23 7:42 PM, Arne Vajhøj wrote:
> On 2/8/2023 8:19 PM, John Reagan wrote:
>> On Wednesday, February 8, 2023 at 8:01:20 PM UTC-5, Arne Vajhøj wrote:
>>> 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.
> 
>>> Does other languages (Cobol, Basic) have similar capability
>>> so that my enhanced /NAME is totally useless?
> 
>> I'll have to look.  Other than C/C++, most of the frontends uppercase 
>> all tokens almost
>> immediately in processing.  So if the source file as "Foo", "fOO", 
>> "FoO", the internals of the
>> frontend see it as "FOO".  Asking each frontend to parse tokens 
>> differently might be a
>> challenge.
> 
> Which is why I think the ability to have the wrapper C code
> expose an all uppercase API and consume a mixed case API could
> be handy.

I think the ability exists, but you have to put code into a shareable
image and alias the symbols in a linker options file.




More information about the Info-vax mailing list