1. How to get error code from Interpreter ?
- Posted by vmars May 15, 2009
- 889 views
- Last edited May 16, 2009
I am running pgm #52 from 'A-Beginners-Guide-To-Euphoria-OffLine.htm' And all I get back is a Black screen flash, then back to Windows.
Please, tell me what is wrong with the pgm, and how can I get the Interpreter to tell me what's wrong; Error code or something?
Thanks!
\\ with trace trace(1) include file.e include get.e include wildcard.e include graphics.e include machine.e -- -- demo program 52 integer foreground_colour sequence list_of_colours, already_used clear_screen() list_of_colours = {"blue","green","cyan","red","magenta","brown", "white","gray","bright blue","bright green", "bright cyan","bright red","bright magenta", "yellow","bright white"} already_used = {} for ix = 1 to 10 do foreground_colour = rand(15) while find(foreground_colour,already_used) do foreground_colour = rand(15) end while already_used = already_used & foreground_colour text_color(foreground_colour) printf(1, "Text in %s\n",{list_of_colours[foreground_colour]}) end for -- keystroke = wait_key() \\
2. Re: How to get error code from Interpreter ?
- Posted by DerekParnell (admin) May 16, 2009
- 862 views
what's wrong; Error code or something?
I assume you are using 'exw.exe' to run this program. If you run exwc.exe' instead, you will see that a new console window (the black flash) is not created and you should see the error message.
The error is that you have not declared a variable called 'keystroke'.
Add
integer keystroke
just before the 'waitkey' line.
3. Re: How to get error code from Interpreter ?
- Posted by vmars May 16, 2009
- 870 views
what's wrong; Error code or something?
I assume you are using 'exw.exe' to run this program. If you run exwc.exe' instead, you will see that a new console window (the black flash) is not created and you should see the error message.
The error is that you have not declared a variable called 'keystroke'.
Add
integer keystroke
just before the 'waitkey' line.
Ah, actually, yes, I was just doubleClicking on 'DemoProgram52.ex'.
So I created a shortCut in my SendTo folder (winXP), with this "C:\Euphoria\BIN\exwc.exe ". And instead of DoubleClicking, I do rightMouseClick on 'DemoProgram52.ex' and select SendTo. So, now I am running with 'exwc.exe'.
Much Better, Thanks!