Search found 148 matches

by Ralph
Wed Mar 25, 2009 9:30 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Recovering old QBasic files
Replies: 8
Views: 15324

Ted, Thank you for your reply to my question. As to being an MS product, well, if you do your comparison with the assumption that MS never existed, I really don't know where we would be today. It's alway easy to see the "defects" and the things we would like to have and don't, but, it's no...
by Ralph
Tue Mar 24, 2009 10:46 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Breaking QBasic on new laptop? (Or: Qbasic equivalent?)
Replies: 19
Views: 29628

On my "stadard" keyboard, I was able to stop an endless loop by pressing Ctrl+Scroll, and also Ctrl+NumLock. Perhaps your laptop will also stop your program. If not, try Ctrl+some other key. It just might work!
by Ralph
Tue Mar 24, 2009 10:33 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Recovering old QBasic files
Replies: 8
Views: 15324

Ted, is there a way to make "Save as text, readable etc." the default? It seems one should be able to, but, how?
by Ralph
Sun Feb 15, 2009 3:40 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: How do I capture <STDIN>?
Replies: 1
Views: 4956

Right! To read from a file, one must tell QB to first open it. Assuming your file, STDIN, has no extension and is in the same directory as qb.exe, here's how: OPEN "STDIN" FOR INPUR AS #1 WHILE NOT EOF(1) 'allows reading all the lines in the opened file LINE INPUT #1, A$ 'assigns the first...
by Ralph
Thu Dec 25, 2008 5:39 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

Ted, your MOD solution is good for integers; so is AND; so are others. I've said it befor, and I will now repeat it. Ted, your knowledge in electronics and in qb is very much appreciated by me and, I'm sure, by many others. Why do you have to ruin it by picking on people? I know that it amuses you, ...
by Ralph
Thu Dec 25, 2008 11:38 am
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

Hi, Moneo: The reason I used AND in my code was to show that the result obtained by using AND, as well as a number we know has a small remainder in QuickBASIC (in ALL qBASICs?). For the case of testing integers, AND works fine, giving the correct mathematical result. However, it does not give the co...
by Ralph
Wed Dec 24, 2008 6:18 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

Hello,, Moneo! Here is another quirk I find in QuickBASIC 4.5. I ran the code in G-W BASIC, and got Odd. 0, ODD, odd, 0, A is odd. I ran the code in QuickBASIC and got Odd, -1.734723E-18, EVEN, even, -1.734723E-18, A is odd. So, the value that qb returns for 5 ^ 2 is not truly the integer 25, since ...
by Ralph
Fri Dec 19, 2008 10:14 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

O.K/., I'll stop here, based on Roy's "back to reality" explanation, and on Ted's pieces of eight.
by Ralph
Thu Dec 18, 2008 5:39 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

Roy and Ted's explanations make some sense to me, but, why don't the following three FOR/NEXT loops give the identical exaxt values for ALL three cases? Notice that the first one gives exact values for 1 through 2.7, the second one for 1.5 through 2.5, and the last one for 2.3 through 2.7 CLS PRINT ...
by Ralph
Wed Dec 17, 2008 12:23 am
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

O.K. Then why does this give a small difference for ALL values of i for the first difference, and, except for i = 1.4 and 1.8, gives 0 for all other values of i for the second difference. ALL the values of i are single precision. FOR I = 1 TO 2 STEP 0.1 A = I^2 PRINT I, A-I*I, I^2 -I*I NEXT I
by Ralph
Tue Dec 16, 2008 11:00 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

Ted, we're still not there. In the code, "FOR I = 1 TO 20", doesen't the vaiable I qualify for single precision assignment? If so, why does the example code in my previous post not give A 0 for "PRINT I ^ 2 - I* I" for all valuies of I? It does, but only for values of I of 1, 2, ...
by Ralph
Mon Dec 15, 2008 9:45 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

In the following code, I didn't actually use the ! to assign the single values, just the second line, "A = I ^ 2", and QB acts the same as in your example, but "I ^ 2" doesen't. Why? Is it that the default for any variable is single prexision, so that "A = number" will ...
by Ralph
Mon Dec 15, 2008 11:15 am
Forum: QBASIC and QB64 Questions & Answers
Topic: #
Replies: 6
Views: 14626

For Ted

Ted, did you read my post, just two posts befor yours?
by Ralph
Mon Dec 15, 2008 11:04 am
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

That was good, Tec. I didn't understand your last part, the one about variable = 10 ^ 2 ' undefined single variable Then substitute that value to get rid of the small accuracy problems with Double values. I entered" PRINT 10 ^ 2 - 100 and I got the remainder, -6.928894E-18 indicating that 10 ^ ...
by Ralph
Sun Dec 14, 2008 6:48 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: divisible by 2
Replies: 26
Views: 57322

Try: IF number/2 = INT(number/2) THEN While a number may APPEAR to be difisible by two, it may have a very small error, and not be truly an even number. For example, it we test the result of 10 ^2 against 100, we get a remainder, thus, the second line below returns, "NOT AN EVEN NUMBER", s...
by Ralph
Sun Dec 14, 2008 5:40 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: #
Replies: 6
Views: 14626

Many of us who visit here like an interesting challenge. Your problem is to know what is interesting to us, and what is a challenge to us. Both interesting and a challenge must exist at the same time for me to look at something. Often, a simple appeal, such as the following will bring more than one ...
by Ralph
Wed Dec 10, 2008 9:13 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Using FON or TTF
Replies: 18
Views: 25513

Getting back to FUENTES (FONTS). Unzipping the original file, fuentes.zip, gives two folders, IMAGENES (IMAGES, all .GGP files), and TIPOS (TYPES, or FONTS, all .fnt files), and eight more files. Of these, FUENTES.TXT pretty much explains how to use these files. As I said previously, all is in Spani...
by Ralph
Tue Dec 09, 2008 10:24 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Using FON or TTF
Replies: 18
Views: 25513

FUENTE ACTIVADA" menas "FONT ACTIVATED" (of course, now that you know, you?ll exclaim, ?It?s obvious!?, right? Even though Opresion recommended using this program, it is ALL in Spanish, so it would be too difficult to use for a person who does not know Spanish. It is well presented, b...
by Ralph
Tue Dec 09, 2008 7:39 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Using FON or TTF
Replies: 18
Views: 25513

Ted: As to the "Why do you need /AH?", well, I don't. It's just that I had a round with trying to find out what the largest possible array sizes were, and that reauired the /AH switch; I have now taken it out. Now, I'm sure that copying all the program files for qb into the folder where fi...
by Ralph
Tue Dec 09, 2008 6:23 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Using FON or TTF
Replies: 18
Views: 25513

Sorry for the delay in my response, Ted. After struggleing with my problem, I finally decided that, unless I changed a number of things, I was not going to be able to run the program successfully, I copped out! I just made a new folder, in C:, called Fuentes, with all the fuentes files there. Then, ...