- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SUBROUTINE
TESTDATA () !dec$ attributes alias : "TESTDATA" :: TESTDATA !dec$ attributes dllexport :: TESTDATA !dec$ attributes stdcall :: TESTDATA CHARACTER TESTSTRING*2000 CHARACTER TESTRWYKEY*15,TESTICAO*4,TESTIATA*3TESTSTRING = "KPIT10R KPITPIT"
READ(UNIT=TESTSTRING,FMT=4000)TESTRWYKEY,TESTICAO,TESTIATA 4000 FORMAT(A15,A4,A3)END SUBROUTINE
TESTDATAWhen I use this same code in an executable, it works without a problem. Also, if i write the data to a file, and then read the file, there is not a problem. Has anyone encountered this before?
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
- 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
- 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
- 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
I use a simple form and button to call the dll
Private Declare Sub TESTDATA Lib "C:TEMPDll1.DLL" ()
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Call TESTDATA
MsgBox "PROGRAM DONE"
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
The error seems to occur when the breakpoint is hit.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I set my breakpoint on the following line
TESTSTRING = "KPIT10R KPITPIT"
and the when i continue to the next line is where the error occurs.
- 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 placed the IOSTAT line in my code, and the program still crashed at the read statement.
Bob
- 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
Pardon the interjection but in the posted Fortran
CHARACTER TESTSTRING*2000
CHARACTER TESTRWYKEY*15,TESTICAO*4,TESTIATA*3
TESTSTRING = "KPIT10R KPITPIT"
READ(UNIT=TESTSTRING,FMT=4000)TESTRWYKEY,TESTICAO,TESTIATA 4000 FORMAT(A15,A4,A3)can UNIT in a READ be a character string? I've long believed that it had to be an integer, eg, 5.
Maybe the storm has gottento me, :-).
Ciao
Gerry T.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page