D - Newbie question
- npaim yahoo.com (8/8) Jan 24 2004 Hi all,
- J C Calvarese (65/77) Jan 24 2004 I don't know. Did the compiler or linker give any errors? If so, just
- Matthias Becker (3/23) Jan 26 2004 Tested it on Win98 (Athlon 1.4GHz) And I got the same: Compiles and link...
- J C Calvarese (11/42) Jan 26 2004 That's odd. Perhaps something is wrong with std.file.
Hi all, The samples "wc.d" and "wc2.d" causes "Invalid handle" on execution. What am I missing? Windows95, AMD K6 550. TIA. Nilo R Paim Porto Alegre - RS Brasil
Jan 24 2004
npaim yahoo.com wrote:Hi all, The samples "wc.d" and "wc2.d" causes "Invalid handle" on execution. What am I missing? Windows95, AMD K6 550. TIA. Nilo R Paim Porto Alegre - RS BrasilI don't know. Did the compiler or linker give any errors? If so, just copy the console messages and post them to the newsgroup. It ran fine on WinXP Home using go.bat, and this is what it looked like... \dmd\bin\dmd wc D:\dmd\bin\..\..\dm\bin\link.exe wc,,,user32+kernel32/noi; wc wc.d lines words bytes file 45 80 810 wc.d wc foo lines words bytes file Error: foo: file not found \dmd\bin\dmd wc2 D:\dmd\bin\..\..\dm\bin\link.exe wc2,,,user32+kernel32/noi; wc2 wc2.d lines words bytes file 72 171 1384 wc2.d -------------------------------------- 1 A 1 Z 1 a 3 arg 4 args 1 bytes 17 c 1 cast 9 char 12 cnt 1 d 5 dictionary 2 else 3 file 1 for 2 foreach 7 if 2 import 7 input 9 int 6 inword 6 j 1 keys 7 l 4 length 1 lines 6 lu 1 main 6 n 5 printf 1 read 1 return 2 s 1 sort 3 std 1 stdio 10 total 9 w 2 word 3 word1 1 words 4 wstart 1 z Good luck. -- Justin http://jcc_7.tripod.com/d/
Jan 24 2004
Tested it on Win98 (Athlon 1.4GHz) And I got the same: Compiles and linkes fine, but at runtime I get "Invalid handle". And it's caused by the line input = cast(char[])std.file.read(arg);Hi all, The samples "wc.d" and "wc2.d" causes "Invalid handle" on execution. What am I missing? Windows95, AMD K6 550. TIA. Nilo R Paim Porto Alegre - RS BrasilI don't know. Did the compiler or linker give any errors? If so, just copy the console messages and post them to the newsgroup. It ran fine on WinXP Home using go.bat, and this is what it looked like... \dmd\bin\dmd wc D:\dmd\bin\..\..\dm\bin\link.exe wc,,,user32+kernel32/noi; wc wc.d lines words bytes file 45 80 810 wc.d
Jan 26 2004
Matthias Becker wrote:That's odd. Perhaps something is wrong with std.file. I remember seeing some discussion recently about changing the SomeFunctionA API function calls into SomeFunctionW function calls in std.file. It's happened recently, so I included the version that I compiled with DMD 0.76. (The change should have occurred *after* 0.76.) If this version does work for you, the change in std.file might need some re-examining to work on Win98. -- Justin http://jcc_7.tripod.com/d/Tested it on Win98 (Athlon 1.4GHz) And I got the same: Compiles and linkes fine, but at runtime I get "Invalid handle". And it's caused by the line input = cast(char[])std.file.read(arg);Hi all, The samples "wc.d" and "wc2.d" causes "Invalid handle" on execution. What am I missing? Windows95, AMD K6 550. TIA. Nilo R Paim Porto Alegre - RS BrasilI don't know. Did the compiler or linker give any errors? If so, just copy the console messages and post them to the newsgroup. It ran fine on WinXP Home using go.bat, and this is what it looked like... \dmd\bin\dmd wc D:\dmd\bin\..\..\dm\bin\link.exe wc,,,user32+kernel32/noi; wc wc.d lines words bytes file 45 80 810 wc.d
Jan 26 2004