[Info-vax] /NAME

John Reagan xyzzy1959 at gmail.com
Wed Feb 8 20:19:04 EST 2023


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. 
> > 
> > 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
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.



More information about the Info-vax mailing list