Search found 151 matches
- Tue Dec 18, 2007 7:57 am
- Forum: QBASIC and QB64 Questions & Answers
- Topic: A good problem for you experts
- Replies: 13
- Views: 19044
Re: I dunno Mac
your example is not the best either, but neither was mine looking back. True. Let's clarify further These two always give the same result: ?????IF (INP(889) AND 128) THEN ?????IF INP(889) AND 128 THEN so you retract the statement that the outer parentheses are useful in that case and agree that the...
- Mon Dec 17, 2007 9:11 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: A good problem for you experts
- Replies: 13
- Views: 19044
Re: parentheses
Suggestion: take something which you wonder works on the same.coma8coma1 wrote:does this apply to QuickBASIC, or to GW BASIC only
1) Try in on QuickBASIC
2) Try it on GW BASIC
I use neither. I use QBasic. My guess is they are the same.
Mac
- Mon Dec 17, 2007 9:07 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Scrolling
- Replies: 13
- Views: 17679
Explain?????????????
Can you please explain the code? ??? What's there to explain ??? I'll do my best: Stuff$ = (Whatever you are searching for) You define some variable, I suggested Stuff$ but you could use any name. You put "$" to mean it is a text variable. You set it to whatever you are searching for. You...
- Mon Dec 17, 2007 3:46 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Scrolling
- Replies: 13
- Views: 17679
- Mon Dec 17, 2007 3:28 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: A good problem for you experts
- Replies: 13
- Views: 19044
- Sun Dec 16, 2007 8:42 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: IF instruction doesn't work?
- Replies: 9
- Views: 10517
extra print
Did you put in the extra PRINT I suggested? If so, please post the results of your run By the way 150 DIM Q(N), Q1(N), Q2(N), Q9(N), D(N), V(N), CJ(N), CL(N), D0(N), CLO(N) AS DOUBLE will only dimension CLO(N) AS DOUBLE The rest get the default SINGLE. If you really need DOUBLE, you need separate DI...
- Sat Dec 15, 2007 5:00 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: IF instruction doesn't work?
- Replies: 9
- Views: 10517
Re: IF instruction doesn't work?
I removed the line 1280 and the application doesn't make the calculations If you remove 1280 then you have to also remove 1282 and 1284. Are you trying to run that program in GWBASIC? If so, you cannot terminate a statement with THEN. You have to code like Nodtveidt said: Get rid of 1282 and 1284 a...
- Sat Dec 15, 2007 4:15 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: IF instruction doesn't work?
- Replies: 9
- Views: 10517
It will help make the code look a hell of a lot cleaner, easier to debug, and not so 1975. :P Yep. If the OP is interested, here is a program that will remove all line numbers except lables, which it converts say 1020 to L1020. http://www.network54.com/Forum/178387/message/1197752905 Mac P.S. Utili...
- Sat Dec 15, 2007 1:08 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Scrolling
- Replies: 13
- Views: 17679
Re: Scrolling
Ok, when i use the command prompt to print stuff in qbasic, how would i beable to scroll through it? use VIEW? I dunno. I cant even guess on how to put the results in an array :? I am unable to determine what you want. Could you please explain further. What is the problem? I'll make a problem up fo...
- Sat Dec 15, 2007 12:59 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: IF instruction doesn't work?
- Replies: 9
- Views: 10517
Get rid of the line numbers Eliminating the line numbers will not help solve this problem. Running the program below, I got these results: 1 : Q(l/s),L(m),h(M) ? 1, 5.6, 5.5 2 : Q(l/s),L(m),h(M) ? 1, 5.6, 5.6 3 : Q(l/s),L(m),h(M) ? 1, 5.6, 5.7 3 : Q(l/s),L(m),h(M) ? 1, 1.0, 1.0 I am calculating. Wa...
- Sat Dec 15, 2007 9:36 am
- Forum: QBASIC and QB64 Questions & Answers
- Topic: IF instruction doesn't work?
- Replies: 9
- Views: 10517
Debugging Suggestion
Insert line after 1270 and run again. Report what you see.
Mac
Mac
Code: Select all
1260 FOR I = 1 TO NTR
1270 PRINT "Tube "; I; ": Q(l/s),L(m),h(M) "; : INPUT Q2(I), CL(I), CLO(I)
print "Debug: ";CL(I),CLO(I)
1280 IF (CLO(I) > CL(I)) THEN
- Thu Dec 13, 2007 12:25 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Command prompt problem (SHELL)
- Replies: 9
- Views: 15098
Hmm, could you tryLee wrote:This is messed up
Code: Select all
cmd /c start
Mac
- Wed Dec 12, 2007 8:34 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Command prompt problem (SHELL)
- Replies: 9
- Views: 15098
More info please
Ok, heres my code now... Im stuck with the command prompt part where is opens a file. Fix your code so it looks like this: ======================================================= INPUT "Search for Part of/ file:", sactname$ cmd$ = "FIND /I " + CHR$(34) + sactname$ + CHR$(34) + &...
- Thu Dec 06, 2007 5:39 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Trying to get a Battleship Program ASAP
- Replies: 29
- Views: 39003
I sure would like to see the solution
From what I can determine, it is a two-player game. How is it played. My guess: Get Player 1 password. Get Player 2 password. do Demand Player 1 password Allow Player 1 to play Clear the screen Demand Player 2 password Allow Player 2 to play Clear the screen loop This appears to be a tough assignmen...
- Wed Dec 05, 2007 12:28 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Trying to get a Battleship Program ASAP
- Replies: 29
- Views: 39003
Graphics
We seem to be stuck on advanced graphics. What are the specs of this game? My thought would be to use no SCREEN command but simply use PRINT "sss" to be an ordinary ship and "BBB" to be a battle ship. And use LOCATE to place them, and an Array to keep track of where they are. Are...
- Tue Dec 04, 2007 9:08 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Cut binary file
- Replies: 5
- Views: 13090
Shortening a file
Yes, as I already said "If the whole file fits in memory, you could read it in, close, open for output, close, and the write it out again." But if the file won't fit, you have to create a new file. If your one file is so big that there is no room for two on your disk, you are doomed. So I ...
- Tue Dec 04, 2007 4:29 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Cut binary file
- Replies: 5
- Views: 13090
Re: Cut binary file
If I want to shorten a binary file, how can I do that? Good question. You would think this would be easy, but I don't know any way. If the whole file fits in memory, you could read it in, close, open for output, close, and the write it out again. Why bother, though, to shorten a file? What is your ...
- Sun Dec 02, 2007 9:30 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: What's the largest possible double number?
- Replies: 8
- Views: 14651
Re: What's the largest possible double number?
"d+308" means "times 10 raised to the 308th power." Right. The letter "d" is used to designate you need double precision to hold this number. It otherwise the same as "e", meaning "exponent". To directly answer your question: 17976931348623150000000...
- Sun Dec 02, 2007 8:33 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: What's the largest possible double number?
- Replies: 8
- Views: 14651
Re: What's the largest possible double number?
How about "d"?Mentat wrote:Please don't use e.
K# DOUBLE
double-precision 64-bit floating-point
Sixteen place accuracy, Max = 1.797693134862315D+308
- Tue Nov 27, 2007 8:39 pm
- Forum: QBASIC and QB64 Questions & Answers
- Topic: Lists in QBASIC
- Replies: 3
- Views: 5818
Re: Lists in QBASIC
Or would I have to hard code the damn thing. You have to hard code it. There are no objects in QBasic as there are in VB. Even MSGBOX must be hard coded. We are using "hard code" to mean "code it the hard way", I guess. "Hard code" usually refers to using internal cons...