- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the following code:
character(10) text
real(4) num
...
read(text,*) num
It works fine when I assign a value to 'text' manually.
However, when Iassign a value to 'text' using GetDlgItemText and then try to read it into 'num',I get a this run-time error:
forrtl: severe(59): list-directed I/O syntax error, unit -5, file Internal List-Directed Read
What could the problem be?
nandita
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two things. Using list-directed formatting for this purpose is dangerous, as it will accept things you may not, such as "Twinkie". Try it. Consider using G format instead.
Second, Win32 routines return null-terminated strings. Use INDEX to find the NULL and get the substring of the actiual text.
Message Edited by sblionel on 08-16-2004 03:15 PM

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