October 30, 2025, 12:18:38 PM

News:

IWBasic runs in Windows 11!


Possible bug - Don't know for sure

Started by Bill-Bo, March 20, 2013, 06:57:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bill-Bo

March 20, 2013, 06:57:41 AM Last Edit: March 20, 2013, 07:12:55 AM by Bill-Bo
Running 2.095 I just now did the old "Hello World." I compiled
it as a console exe. When I press F4 it runs and the window
stays on the screen. In the window is 'Press any key to continue ...'
I press a key and it goes away. If I run the exe outside of IWBasic, the
console window just flashes and disappears. Could you tell
me why?

Bill

P.S. I even tried OPENCONSOLE. At 1st I had not, and did not need
while still in IWBasic.

LarryMc

Both of the attached run fine for me whether in the IDE or not.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Bill-Bo

Thank you. I didn't think of UNTIL INKEY$ <> "".
Found out something the hard way. I compiled
bill-bo2.iwb as a Windows exe. Would not run,
could not delete, and had to reboot the system.
Then I was able to delete the exe. Re-compiled
as a Console exe and it worked fine.

Thanks, again,

Bill

GWS

I think there's still a slight problem here.


print "Hello World"
print "Press any key to continue .."
do:until inkey$<>""
end


In the IDE, you get two prompts (notice the different dot spacings).

The .exe works correctly outside the IDE ..  ::)

best wishes, :)

Graham
Tomorrow may be too late ..