- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
While the message is correct, I find it a little overaggressive in its attempt to protect us from ourselves. :-) I have literally thousands of examples summarized by the following short program:
program test_init
character(32) string
byte array(32)
call sub (%ref(string))
call sub (array)
end
This program produces the previously mentioned warning for each instance after the first call under CVF, however compiles happily under the latest OVMS compiler.
From what I can tell my solutions are to turn off warnings again or to include an interface definition in each and every caller for said routine(s). Essentially in the case above I would need to add the NO_ARG_CHECK attribute to any such argument subject to this sort of calling procedure (subroutine just wants a byte array in many of these cases, in other words the actual parameter is considered "generic"). As far as I know no type casting is available for the caller to handle it alone.
I guess my case is that, lacking an interface definition, particularly when working with older code, there is something to be said for making NO_ARG_CHECK the default.
James
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you compiled with /iface:cref, then it wouldn't care.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On OpenVMS nothing in that sample program is passed by descriptor, note that the character string is explicitly passed by reference and the byte array is passed by reference by default. My understanding is that on both operating systems using the %ref on the character string and using the default mechanism with the byte array should result in a single argument passed by reference in both cases. What am I not understanding?
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
James

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page