Search found 450 matches

by moneo
Sun Oct 30, 2005 2:06 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: time in qb
Replies: 23
Views: 26449

Its psuedo code. It doesnt matter. As long as you get the idea down. Natt, let me clear this up for you. Ideas are expressed textually, not in pseudo-code. When you posted: old time - current time = time passed This was pseudo-code, not just an idea, so it must be correct. An idea would have been: ...
by moneo
Sat Oct 29, 2005 5:50 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: time in qb
Replies: 23
Views: 26449

yeah... ill answer his question using almighty psuedo code! get the time from timer do your stuff old time - current time = time passed Natt, Even if you use pseudocode, it has to make sense. old time - current time = time passed is backwards. It should be: current time - old time = time passed. **...
by moneo
Fri Oct 28, 2005 8:00 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Searching help
Replies: 4
Views: 4608

INPUT "Number to search for"; numtolookfor LET search$ = "-": WHILE numoftimes <> 999 LET num = INT(RND * 998) + 1 IF num = numtolookfor THEN timesfound = timesfound + 1 numoftimes = numoftimes + 1 '-----marker1 WEND PRINT "The number"; numtolookfor; "was found&qu...
by moneo
Fri Oct 28, 2005 7:45 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Variable grabbing
Replies: 11
Views: 14938

..... I don't want to have a huge chain of SELECT CASEs in this sub either...... Ok, let's put this problem into perspective. How many variables are you talking about, 20 or 30? If you're talking about hundreds, then maybe we need to think about a more sophisticated approach. For 20 or 30, you're g...
by moneo
Fri Oct 28, 2005 6:55 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: time in qb
Replies: 23
Views: 26449

how would i use that variable and do the conversion, can you describe that in more detail? It depends on how you like to work with time. If you use the TIMER function, then you will be working with a total number of seconds, containing a decimal value, which can go as high as 86,400 seconds minus 1...
by moneo
Thu Oct 27, 2005 8:41 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Listing of inkey$ codes
Replies: 24
Views: 32258

matt2jones wrote:.....
All I'm trying to say is it's better to know how to work out an answer then to have a load of answers written infront of you and keep copying them off.

matt
Very good point, Matt.
*****
by moneo
Thu Oct 27, 2005 8:05 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Variable grabbing
Replies: 11
Views: 14938

Re: Variable grabbing

Is there a way in QBasic that if I put a prompt in for a variable name, it will make the variable appear? Psudeo code: INPUT "Variable Name: ", Name$ Let Variable = VariableName(Name$) ' this is the psudeo code (ex a function) Print Variable [/code] This almost sounds like a debugging fun...
by moneo
Thu Oct 27, 2005 6:25 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Variable handling?
Replies: 6
Views: 7137

You can also use the common statement, but thats really messy and un-good... use it like this... i ferget how to use it though, so check qbs help.[/code] Here's the definition of the COMMON statement: COMMON - a non-executable statement that declares global variables for sharing between modules, or...
by moneo
Wed Oct 26, 2005 7:03 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Listing of inkey$ codes
Replies: 24
Views: 32258

Kylemc wrote:there should be a sleep: after the do:.
Very clever. :o
The SLEEP with no parameter waits for a key press, which in turn satisfies the successive code which needs a key press.
*****
by moneo
Wed Oct 26, 2005 6:48 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Variable handling?
Replies: 6
Views: 7137

A more common method is to use a parameter list with the sub, like so: DECLARE SUB yoursub (yourvariable) CALL yoursub (subvariable) PRINT subvariable END SUB yoursub (yourvariable) LET yourvariable = 4 END SUB The SUB doesn't use the value of "subvariable" from the CALL, which the SUB ref...
by moneo
Wed Oct 26, 2005 2:14 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Listing of inkey$ codes
Replies: 24
Views: 32258

do :A$ = right$(inkey$,1):print A$,asc(A$):loop until A$ = chr$(27) Then press whatever key you want to know the info about, and it prints it. I have a line like that in the immediate window pretty much every time I open QB since I started. It's how I know that the F1-5 keys are ; < = > @, I could ...
by moneo
Tue Oct 25, 2005 7:31 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: PRINT Strings
Replies: 5
Views: 6588

Antoni, The instruction " rset a$="" " is not needed, so I removed it. The instruction "NEXT Counter" should be "NEXT i". I tested it and now it runs "even simpler". I never used the RSET and LSET statements in QB. I thought they were only for use wi...
by moneo
Tue Oct 25, 2005 2:16 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Listing of inkey$ codes
Replies: 24
Views: 32258

..... wait, I get what you were saying... YOU THINK IM DUMB!!! well, I kinda am... but I am going through a bad self-esteem time... Nath, I don't think you're dumb. It's just that you're overly eager. You post all over the place and most of the time it has nothing whatsoever to do with the topic. Y...
by moneo
Mon Oct 24, 2005 7:29 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: PRINT Strings
Replies: 5
Views: 6588

Not as elegant as Mystik's solution, but a little simpler: DIM WorkName(1 TO 5) AS STRING WorkName(1) = "Stephane Richard" WorkName(2) = "Pete Berg" WorkName(3) = "Alice Cooper" WorkName(4) = "Terry Fox" WorkName(5) = "Kristian Virtanen" REM Assuming...
by moneo
Mon Oct 24, 2005 6:18 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Listing of inkey$ codes
Replies: 24
Views: 32258

What you should do is write a program that prints the ascii codes and characters of any key you INKEY$, then you can work out a list for yourself. ..... Matt, At first your idea of writing a program sounds ok, but after thinking about it, you still have to manually add the names of the keys to the ...
by moneo
Sun Oct 23, 2005 8:52 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Listing of inkey$ codes
Replies: 24
Views: 32258

Nathan1993 wrote:I have me own little cheat sheet...
.....
Very nice, Nath.
Sometimes you really amaze me. :wink:
*****
by moneo
Sun Oct 23, 2005 2:22 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: List of few basic questions
Replies: 24
Views: 26696

Nek, that's really funny about the runtime packages. The sad part is that it's true. Everybody wants to package you up and convert you to become part of a captive audience. I'm glad that knowledgeable guys like you are still around to resist this marketing trend.
*****
by moneo
Sat Oct 22, 2005 2:22 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: List of few basic questions
Replies: 24
Views: 26696

So far what i feel is that FB is more superior ro QB so i have another Question,Should i learn FB or VB6?which 1 u think is a better option? Another consideration is what language is going to look good on your resume. Visual Basic experience is definitely going to be more desireable, whereas Freeba...
by moneo
Thu Oct 20, 2005 7:13 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: time in qb
Replies: 23
Views: 26449

If you only need one second of accuracy, a simpler method is to used the TIME$ function. T$ = TIME$ T$ will contain HH:MM:SS where the HH is in military time, i.e., 2 PM is 14. You still have to do some arithmetic to get the elapsed time in hours, minutes or seconds from some starting point. The TIM...
by moneo
Thu Oct 20, 2005 6:32 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: ISAM
Replies: 4
Views: 7807

Re: ISAM

Is ISAM worth learning for databases What is called ISAM in Microsoft's PDS 7.x is a crude attempt at simulating IBM ISAM (Indexed Sequential Access Method), which was developed for IBM mainframes in the 1960's. The IBM ISAM was only a disk access method, and not a DBMS (Data Base Management System...