- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK, so it's not a bug, it's a feature.
So every time I write a fortran subroutine I should write a set of interface statements? I then have to worry about using them all the time, maintaining them as things change? Give me a break, that's a step backwards as far as I'm concerned. How hard can it be for the compiler to count arguments as it makes the first pass? That's like saying the CALL and SUBROUTINE stastements are obolete and we should requirereplacing them with multiple statements. Compliers are supposed to make things easier, not harder than needed.
It's not a big issue with me, it's just that I didn't look for that kind of problem the first time it hit me, since I "knew" from past experience the compiler would have caught it. Instead one gets wierd and wonderful activity leading usually to advising us to report the studio.net crashes to MS.
I know interface statements can be needed when for some reason you need to tell a routine what kind of stuff to expect, variable arguments, etc. although I don't think it should be necessary;the compiler should take that burden off us us. But if it can find an inappropriate number of argumentswhen a set of interface statements exists, it's hard to see why parsing a subroutine call for # args is so much harder...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's been discussed before, but I don't see Tim and Steve mentined it here explicitly.
CVF used stdcall convention, which has @n appended at the end, while IVF uses cdecl, which does not have that decoration, allowing number of arguments mismatch. The change was introducedpartly because many people wanted to compile old (illegal) codes that abused mismatchin number of arguments or CHARACTER/BYTE type mismatch. (Personally, I prefer it the CVF way but...). With cdecl, the mismatch is usually harmless (providing missing arguments are not accessed) due to the method of stack handling.
So, if you want the old way, use "CVF" calling convention in Project Settings. This is not a panacea, of course, because e.g. real/double precision mismatches willpass unnoticed.

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