- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
We create a library of subroutines compiled using all of the defaults for names, underscores etc
We have a customer who wishes to link to this library but his in-house
conventions mean that he needs to compile using
/assume:underscore
/iface:nomixed_str_len_arg
/iface:cref
/names:lowercase
He has got around most of the problems by creating some wrappers
like this
SUBROUTINE dienam_(IDENUM,INAME,IUNT,IEXIT)
DIMENSION INAME(*)
CALL DIENAM(IDENUM,INAME,IUNT,IEXIT)
RETURN
END
which he compiles with /names:as_is
The problem is with character arguments. We cannot work out how
to compile his code with /iface:nomixed_str_len_arg
an access our code with 'string length after argument'
Any suggestions would be most welcome
TIA
Geoff
We create a library of subroutines compiled using all of the defaults for names, underscores etc
We have a customer who wishes to link to this library but his in-house
conventions mean that he needs to compile using
/assume:underscore
/iface:nomixed_str_len_arg
/iface:cref
/names:lowercase
He has got around most of the problems by creating some wrappers
like this
SUBROUTINE dienam_(IDENUM,INAME,IUNT,IEXIT)
DIMENSION INAME(*)
CALL DIENAM(IDENUM,INAME,IUNT,IEXIT)
RETURN
END
which he compiles with /names:as_is
The problem is with character arguments. We cannot work out how
to compile his code with /iface:nomixed_str_len_arg
an access our code with 'string length after argument'
Any suggestions would be most welcome
TIA
Geoff
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
One way would be for you to provide a MODULE with INTERFACEs to your routines - and for each routine, add:
!DEC$ ATTRIBUTES DEFAULT
to its interface block. This was new in 6.1A, so you need to be at that version or higher.
The customer would then have to USE your module to get the declarations, instead of the wrappers.
Another way is to write the wrapper something like this:
If the %REF doesn't work, use %VAL(LOC(CHARARG))
Steve
!DEC$ ATTRIBUTES DEFAULT
to its interface block. This was new in 6.1A, so you need to be at that version or higher.
The customer would then have to USE your module to get the declarations, instead of the wrappers.
Another way is to write the wrapper something like this:
SUBROUTINE somesub_ (CHARARG,INTARG) CHARACTER*(*) CHARARG INTEGER INTARG CALL SOMESUB (%REF(CHARARG),%VAL(LEN(CHARARG)),INTARG) END
If the %REF doesn't work, use %VAL(LOC(CHARARG))
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve
Thanks for the ideas, I will give them a go.
Geoff
Thanks for the ideas, I will give them a go.
Geoff
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page