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


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 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

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.


Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today