acause you're using BASIC. Do the job in C and you'll get more syntax errors at first, but once you have them straightened out your program will run faster (and be much more cool).
--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?
Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com
Also it won't be shouting blather at the top of its little lungs. When I read this sort of code, I always think of Robbie the Robot.
10 WHILE 1
20 PRINT "DANGER WILL ROBINSON!!!!!"
30 WEND
;)
Cheers
Phil Hobbs
--
Dr Philip C D Hobbs
Principal Consultant
ElectroOptical Innovations LLC
Optics, Electro-optics, Photonics, Analog Electronics
160 North State Road #203
Briarcliff Manor NY 10510
hobbs at electrooptical dot net
http://electrooptical.net
Now, now... for 'we bears of very little brain'* basic is a fine language. I've got several little programs that help me on my way.
GOSUB nitpick
All in good fun :^) Hey there's this white fluffy stuff falling outside my window. What's that? And here's wishing all the SEBers a wonderful Holiday season! I'm cutting out early to go decorate Xmas cookies at granma's with the kids.
George H.
SUB nitpick basic doesn't need line numbers anymore the commands are still in caps, but I use lower case for variables which makes it easier to read. Robbie the Robot (a nice Asimov story.) was not on the screen with Will Robinson. (Undoubtedly the worst Sci-fi series ever!) RETURN
Yeah, I went off and installed XP mode and then dragged my entire Microsoft development environment (VBDOS, QB45, QBASIC, QC2, ML/MASM, and a bunch of other "old tools") over from an old machine and set up something I could test with. Needed to do that, anyway. And yes, I did a quick test with and without the comments and it worked without and didn't work with.
This goes back to the 1970's, by the way. I used the original Microsoft papertape BASIC (which I may still have in papertape form if you can believe it) and had been "shocked" that comments on DATA statements caused it to have parsing problems. I was used to (1) languages that didn't support comments, such as HP 2000F BASIC, and (2) languages which had no problem with dealing with comments on DATA statements -- I believe it was on a PDP-10, but memory is vague now. But I'd never experienced one that couldn't handle something it permitted.
I just figured that Microsoft's BASIC treated a DATA statement almost like a REM statement -- it didn't parse it or anything. It just accepted ANYTHING you typed there. It was "your problem" and not theirs, what you did. Only at run-time did it check and parse things. And since it was nothing more than a keyword followed by unchecked text, they took the easy way out and didn't bother supporting comment recognition.
Damned AGW... I had to turn on the heat two days ago... got down to
65°F in the house.
Managed to go 2-1/2 months with neither A/C or heat! ...Jim Thompson
--
| James E.Thompson, CTO | mens |
| Analog Innovations, Inc. | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| Phoenix, Arizona 85048 Skype: Contacts Only | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
I love to cook with wine. Sometimes I even put it in the food.
I forget to mention the code works ok with Borland Turbo Basic. I did find that adding an extra '2' to the data list fixes the problem so it runs right in QBasic. I'm just wondering why I need an extra data character in one case and not the other?
I've got QB45 installed. I run half a dozen programs. It runs in this little minimalist screen resolution, which is kinda quaint, reminds me of grad school.
QB45 will run with 50 lines, if you want. If you set the DOS box properties so that it starts with 50 lines, then QB will use it. If not, QB45 will still be able to use 50 lines, but you have to write a few lines of code then to force the line change.
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.