- 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
I also welcome that pickiness, but it came a bit too late; sometimes deliberately, sometimes not, I used that INTEGER/LOGICAL feature frequently, and CVF didn't even bother to issue a warning.
Jugoslav
- 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
- Find in Files
- C:Program FilesIntelCompilerFortran9.0IA32Include*.f90
and take a look into definition (parameter value/type declaration/interface block).
Jugoslav
- 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
INTERFACE FUNCTION MoveWindow( & hWnd, & X, & Y, & nWidth, & nHeight, & bRepaint) use ifwinty integer(BOOL) :: MoveWindow ! BOOL !DEC$ ATTRIBUTES DEFAULT, STDCALL, DECORATE, ALIAS:'MoveWindow' :: MoveWindow integer(HANDLE) hWnd ! HWND hWnd integer(SINT) X ! int X integer(SINT) Y ! int Y integer(SINT) nWidth ! int nWidth integer(SINT) nHeight ! int nHeight integer(BOOL) bRepaint ! BOOL bRepaint END FUNCTION END INTERFACE
Here is a piece of my code showing the variable being declared and the statement in which it is being used:
logical :: redraw = .TRUE. iret = MoveWindow(ihWndStatus ,0,cyClient-iSBheight,& cxClient,cyClient,redraw)
When I compile the code, I get the following warning:
Warning: The data type of the actual argument does not match the definition. [REDRAW]
If the definition of the MoveWindow function (?) states that the last variable needs to be boolean/logical, and I've declared it this way in my code. Why is the compiler telling me that the data type does not match? Am I missing something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you want is your redraw variable to be declared integer(BOOL) and assign the value TRUE (not .TRUE.) to it. TRUE is a constant defined in ifwinty (which you get indirectly with user32.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve. The warning is gone, but I guess that wasn't the cause for the statusbar not to appear. Something else must have happened during the conversion.
By the way, where can I find more information on integer(BOOL) or integer(SINT)? I have looked in the FORTRAN library and language reference, but there are no hits when I do a search. Now that I have a way of checking on what the function is actually defined as, I want to make sure the variables are set correctly... example... is integer(SINT) the same as integer(2)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/98E68944C1FF703B8AC50091329B92AF/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page