- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In CVF6.6, I have a simple code:
use dfwbase
real*8,allocatable::aa(:)
allocate(aa(1000000))
call ZeroMemory(loc(aa), 1000000*sizeof(real*8))
real*8,allocatable::aa(:)
allocate(aa(1000000))
call ZeroMemory(loc(aa), 1000000*sizeof(real*8))
END
But in IVF8.0, it can not run correctly. Who can tell me where it is wrong?
Thanks!
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That compiles? Maybe, if you don't have IMPLICIT NONE.
In CVF/IF, SIZEOF() cannot take a type-name as an argument. You must use an actualvariable instead:
call ZeroMemory(loc(aa), sizeof(aa))
Compiler interprets your actual code as a variable named REAL multiplied by 8.Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reply! I have modified just like what you have said, but it still can not work!
In fact, in IVF8.0, I have replaced the use dfwbase with use kernel32(it is wrong when I don't replace this code).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Could you elaborate on "don't work"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I use dfwbase in IVF8.0,
the compiler display the following error when linking:
unresolved external symbol ZEROMEMORY@8
When I replaced it with use kernel32 and debug it(run to the last line), it display:
Unhandled exception in test.exe: 0xC0000005: Access Violation when read 0x00000000.
the display is Chinese, I have translated it to English.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Anyone help me?
Thanks!

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