Passing Hollerith or Quite-Delimited Text Args

Passing Hollerith or Quite-Delimited Text Args

I have legacy code that I am porting from VAX to PC (Win NT 4.0). I have several subroutine calls similar to the following:

call axis('axis label',10)
or
call axis(10Haxis label,10)

The subroutine axis is in a library that emulates VERSATEK
plotting calls and produces Postscript or HPGL plot files.

The subroutine looks like this:

subroutine axis(label,n)

dimension label(1)

return
end

The linker gives me the LNK2001 error on axis. To be compatible with many different legacy codes, I need to be able to call this routine with either form of the text argument. Is there any way to do this?

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Compile with the options /iface:cref/iface:nomixed_str_len_arg (Project..Settings..Fortran..External Procedures: Argument Passing: C, By Ref, String length argument passing: After all args.)

In CVF (as in most UNIX and Windows compilers), character arguments are passed as two arguments, address and length, and in CVF, the length is passed immediately after the address (MS did it this way). The above options cause the lengths to be at the end (where your code doesn't see them) and causes the linker not to care about the mismatch in the number of arguments.

Steve

Steve - Intel Developer Support

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen