This is Our Archive Section
Click Here to Read or Make a New Post.



QBasic Forum

QBasic Help / QuickBasic Help / QBasic Programming
[QBasic FAQ] [QB Links and Downloads] [Subforums and Chat Room] [Search]


exporting text file?

by (no login)

is is possible to export/read a text file (or any other type of file) so that you can (for ex.) save a game i was hopeing to do something like this


num1 = 10
num2 = 22
num3 = 52
name$ = YOUR

'some magical line(s) of code that would save a file (name$).txt
'to a specified location on the hard Drive
'starting here:

PRINT "Hello, " name$;" 's numbers are:"

PRINT " "

PRINT num1, num2, num3

' END of file, and saved code here...


and end up with a YOUR.txt file on the HDD that when opens sais:


Hello, YOUR's numbers are:

102252



p.s. I know the code i given won't really work, i just forget at the top of my head the proper way to PRINT variables....


any thoughts/suggestions?
thxs!

Posted on Aug 6, 2009, 11:45 AM

Respond to this message   

Goto Forum Home


* use 'OPEN "foo.txt" for OUTPUT AS #1' and PRINT #1, "foo"

by Anon (no login)

Posted on Aug 6, 2009, 1:02 PM

Respond to this message   

Goto Forum Home


You can create a WRITE # file.

by (Login burger2227)
R

First OPEN a file name to use that does not exist.

OPEN "MyData.TXT" FOR APPEND AS #1   ' FOR OUTPUT erases the file each time

Then you can WRITE a list of string or numerical data to the file:

WRITE #1,  num1, num2, num3, name$

Result in file:  10, 22, 52, "Nick"

CLOSE #1   'always close a file when done or changing to other modes

To read the file OPEN "MyData.TXT" FOR INPUT AS #1  'make sure file is not empty!

INPUT #1, num1, num2, num3, user$

You can then read the data in a loop for more than one line of data.

Also look up the LOF and  EOF functions.

Posted on Aug 6, 2009, 3:31 PM

Respond to this message   

Goto Forum Home


Simple logic

by (Login mike1939)

Dear folks

Although I have reasonable experience I have been unable to solve this "simple" problem, must be my age?

I thought perhaps you would help me solving a "simple" logic problem in Basic.
It is.....

1. A switch is open
2. The switch closes
3. Log the event
4. Go back to start
5. Is the switch open?
6. If so watch it until it closes again
7. Log the event...etc etc

Problem I can't solve is to disregard switch closed after first time until it has opened and closed again.

I want to monitor the number of times the switch has closed, opened and closed again.

At the moment as I cycle round it logs the switch closure every time, even though it has only been closed once.

Hope you can help with a bit of code

Rgds

Mike Denton

Posted on Aug 6, 2009, 1:51 AM

Respond to this message   

Goto Forum Home


*I never got past line 4...

by Galleon (no login)

Posted on Aug 6, 2009, 6:20 AM

Respond to this message   

Goto Forum Home


* You need FreeBasic for that.

by Pete (no login)

Posted on Aug 6, 2009, 10:03 AM

Respond to this message   

Goto Forum Home


* Wait, what?

by Anon (no login)

Posted on Aug 6, 2009, 6:38 PM

Respond to this message   

Goto Forum Home


At which point is the Start located?

by Solitaire (Login Solitaire1)
R

See if something like this will work:

CONST FALSE = 0
DIM swch AS INTEGER, chng AS INTEGER, lg AS INTEGER
swch = FALSE
chng = swch
CLS
DO
   swch = NOT swch
   IF chng <> swch THEN lg = lg + 1
LOOP UNTIL swch = chng
PRINT lg
END


However, if you place DO above the swch = FALSE line, you will get an overflow error.



    
This message has been edited by Solitaire1 on Aug 6, 2009 10:05 AM
This message has been edited by Solitaire1 on Aug 6, 2009 10:04 AM

Posted on Aug 6, 2009, 10:03 AM

Respond to this message   

Goto Forum Home


Use a capacitor with a large bleeder resistor

by (Login burger2227)
R

You will get a pulse only when the switch closes. Once the voltage evens out across the capacitor, there is no change. When the switch is open, the resistor will pull the capacitor voltage to ground and it is ready for the next pulse.

I hope the voltage is pretty low. You could try using an opto-coupler if it is low enough to light an led.

Posted on Aug 6, 2009, 11:08 AM

Respond to this message   

Goto Forum Home


The BOB zip files are back...

by Pete (Login The-Universe)
Admin

And it was problematic, as I thought it might be. Bob's files downloaded as zero-length files, and yet they are perfectly fine on the server. I figured this to be similar to not being able to post links to some sites here, for no good reason other than N54 security changes that are not fully without their own problems. Again as I suspected, deleting the old files, renaming the backup files, and reuploading them did the trick. I also updated the downloads page to include a requested link to Clippy's zip file.

Pete



    
This message has been edited by The-Universe on Sep 10, 2009 10:05 AM
This message has been edited by The-Universe on Sep 10, 2009 9:53 AM

Posted on Aug 5, 2009, 7:36 PM

Respond to this message   

Goto Forum Home


*Thanks, Pete -- I appreciate it.

by (Login qb432l)
R

*

Posted on Aug 5, 2009, 8:20 PM

Respond to this message   

Goto Forum Home


Thanks Pete!

by (Login burger2227)
R

I am not suprised by your answer to QB being dead.

But you included poor ole' Clippy! I knew that you might because you never liked him.

You sound happier now. Let's keep it that way buddy!

Posted on Aug 5, 2009, 9:38 PM

Respond to this message   

Goto Forum Home


Moving QBasic.com from one host to another.

by (no login)

Don't be alarmed if it disappears for a few hours, or even a day. Additionally, does anyone have a clean, working backup of QBasic.com Classic? Because the one I have it riddled with hidden lines of code in every single HTML file (I didn't put them there, something or someone else did).

Posted on Aug 3, 2009, 10:01 PM

Respond to this message   

Goto Forum Home


*Done moving it, except for the Classic part, like I mentioned above.

by Mark Wilhelm (no login)

Posted on Aug 4, 2009, 12:13 PM

Respond to this message   

Goto Forum Home


So what? Pete has declared Qbasic dead anyhow!

by (Login burger2227)
R

Please change your link to here from "Forum" to "Archive".



    
This message has been edited by burger2227 on Aug 4, 2009 5:18 PM

Posted on Aug 4, 2009, 5:15 PM

Respond to this message   

Goto Forum Home


*Hey now! Please don't.

by (Login PhyloGenesis)
R

*

Posted on Aug 4, 2009, 10:44 PM

Respond to this message   

Goto Forum Home


* So? Micro$oft declared Clippy was dead years ago.. and yet he still posts.

by (Login The-Universe)
Admin

Posted on Aug 5, 2009, 7:23 PM

Respond to this message   

Goto Forum Home


Technically he was only really dead in Office 2007

by Anon (no login)

In Office XP, they said he was dead, but he was just disabled by default.

In Office 2003, he wasn't installed by default.

Posted on Aug 5, 2009, 7:32 PM

Respond to this message   

Goto Forum Home


* BUT you could still USE Clippy! USE ME BABY, I love it!

by (Login burger2227)
R

Posted on Aug 5, 2009, 10:35 PM

Respond to this message   

Goto Forum Home


Hello

by Ja (no login)

Hello good day all, i posted a post here in 2006, that was when i was in high school and i wanted help with some homework i did. is there any way to delete this post? or atleast edit it to delete my full name.

Posted on Aug 3, 2009, 4:45 AM

Respond to this message   

Goto Forum Home


* Why? Are you STILL in highschool?

by (Login burger2227)
R



    
This message has been edited by burger2227 on Aug 5, 2009 12:24 PM

Posted on Aug 3, 2009, 10:23 AM

Respond to this message   

Goto Forum Home


..

by Ja (no login)

nah its not because of that i just dont want it on the internet anymore.

Posted on Aug 5, 2009, 5:06 AM

Respond to this message   

Goto Forum Home


* Yep you must be!

by (Login burger2227)
R

Posted on Aug 5, 2009, 12:28 PM

Respond to this message   

Goto Forum Home


my program

by (no login)

here is my program that I have been asking for help on. I need it to run in qbasic and I need the output of the program to be modified in order to produce a notepad that can be entered directly into lilypond in order to transpose guitar tablature to saxophone sheet music. If anyone would be nice enough to help me it would be greatly appreciated because I only self taught myself enough to get the program as far as it is but I need the additional modifications in order for it to be efficient and usable.

print ""
print ""
print ""


print " Welcome to Tab Converter for Eb Alto Saxophone"
print " Created by Mickey Branscum"
print ""
print ""
print " This program assumes standard tuning of E A D G B e"
print ""
print ""
print " In order to find out what a note on a guitar is for your Eb Alto Saxophone:"
print " First type in the number of the string that the note is played on and hit ENTER."
print " E=1 A=2 D=3 G=4 B=5 e=6"
print " Next type in the fret # that the note is played on and hit ENTER. (Open = 0) "
print " To enter a rest type the letter R instead of the String # and hit ENTER twice."
print " To enter the length of a note or rest:"
print " 1=Whole Note, 2=Half Note, 4=Quarter Note, 8=Eighth Note, 16= Sixteenth Note "
print " (To skip the note length just hit enter.)"
print ""
print " For example, if I wanted to know what note the second fret of the E string is"
print " on my saxophone I would type: 1, ENTER 2, ENTER, ENTER."
print " And if I wanted to specify that it was an Eighth Note I would type:"
print " 1, ENTER, 2, ENTER, 8, ENTER."
print ""
print ""
print " START"
[start]
input " String #? "; amount1
input "Fret #? "; amount2
input "Length? "; amount3
if amount1 = 1 and amount2 = 0 then print " Low C#"
if amount1 = 1 and amount2 = 1 then print " Low D"
if amount1 = 1 and amount2 = 2 then print " Low D#"
if amount1 = 1 and amount2 = 3 then print " Low E"
if amount1 = 1 and amount2 = 4 then print " Low F"
if amount1 = 1 and amount2 = 5 then print " Low F#"
if amount1 = 1 and amount2 = 6 then print " Low G"
if amount1 = 1 and amount2 = 7 then print " Low G#"
if amount1 = 1 and amount2 = 8 then print " Middle A"
if amount1 = 1 and amount2 = 9 then print " Middle Bb"
if amount1 = 1 and amount2 = 10 then print " Middle B"
if amount1 = 1 and amount2 = 11 then print " Middle C"
if amount1 = 1 and amount2 = 12 then print " Middle C#"
if amount1 = 1 and amount2 = 13 then print " Middle D"
if amount1 = 1 and amount2 = 14 then print " Middle D#"
if amount1 = 1 and amount2 = 15 then print " Middle E"
if amount1 = 1 and amount2 = 16 then print " Middle F"
if amount1 = 1 and amount2 = 17 then print " Middle F#"
if amount1 = 1 and amount2 = 18 then print " High G"
if amount1 = 1 and amount2 = 19 then print " High G#"
if amount1 = 2 and amount2 = 0 then print " Low F#"
if amount1 = 2 and amount2 = 1 then print " Low G"
if amount1 = 2 and amount2 = 2 then print " Low G#"
if amount1 = 2 and amount2 = 3 then print " Middle A"
if amount1 = 2 and amount2 = 4 then print " Middle Bb"
if amount1 = 2 and amount2 = 5 then print " Middle B"
if amount1 = 2 and amount2 = 6 then print " Middle C"
if amount1 = 2 and amount2 = 7 then print " Middle C#"
if amount1 = 2 and amount2 = 8 then print " Middle D"
if amount1 = 2 and amount2 = 9 then print " Middle D#"
if amount1 = 2 and amount2 = 10 then print " Middle E"
if amount1 = 2 and amount2 = 11 then print " Middle F"
if amount1 = 2 and amount2 = 12 then print " Middle F#"
if amount1 = 2 and amount2 = 13 then print " High G"
if amount1 = 2 and amount2 = 14 then print " High G#"
if amount1 = 2 and amount2 = 15 then print " High A"
if amount1 = 2 and amount2 = 16 then print " High Bb"
if amount1 = 2 and amount2 = 17 then print " High B"
if amount1 = 2 and amount2 = 18 then print " High C"
if amount1 = 2 and amount2 = 19 then print " High C#"
if amount1 = 3 and amount2 = 0 then print " Middle B"
if amount1 = 3 and amount2 = 1 then print " Middle C"
if amount1 = 3 and amount2 = 2 then print " Middle C#"
if amount1 = 3 and amount2 = 3 then print " Middle D"
if amount1 = 3 and amount2 = 4 then print " Middle D#"
if amount1 = 3 and amount2 = 5 then print " Middle E"
if amount1 = 3 and amount2 = 6 then print " Middle F"
if amount1 = 3 and amount2 = 7 then print " Middle F#"
if amount1 = 3 and amount2 = 8 then print " High G"
if amount1 = 3 and amount2 = 9 then print " High G#"
if amount1 = 3 and amount2 = 10 then print " High A"
if amount1 = 3 and amount2 = 11 then print " High Bb"
if amount1 = 3 and amount2 = 12 then print " High B"
if amount1 = 3 and amount2 = 13 then print " High C"
if amount1 = 3 and amount2 = 14 then print " High C#"
if amount1 = 3 and amount2 = 15 then print " High D"
if amount1 = 3 and amount2 = 16 then print " High D#"
if amount1 = 3 and amount2 = 17 then print " High E"
if amount1 = 3 and amount2 = 18 then print " High F"
if amount1 = 3 and amount2 = 19 then print " High F#"
if amount1 = 4 and amount2 = 0 then print " Middle E"
if amount1 = 4 and amount2 = 1 then print " Middle F"
if amount1 = 4 and amount2 = 2 then print " Middle F#"
if amount1 = 4 and amount2 = 3 then print " High G#"
if amount1 = 4 and amount2 = 5 then print " High A"
if amount1 = 4 and amount2 = 6 then print " High Bb"
if amount1 = 4 and amount2 = 7 then print " High B"
if amount1 = 4 and amount2 = 8 then print " High C"
if amount1 = 4 and amount2 = 9 then print " High C#"
if amount1 = 4 and amount2 = 10 then print " High D"
if amount1 = 4 and amount2 = 11 then print " High D#"
if amount1 = 4 and amount2 = 12 then print " High E"
if amount1 = 4 and amount2 = 13 then print " High F"
if amount1 = 4 and amount2 = 14 then print " High F#"
if amount1 = 4 and amount2 = 15 then print " Too High G"
if amount1 = 4 and amount2 = 16 then print " Too High G#"
if amount1 = 4 and amount2 = 17 then print " Too High A"
if amount1 = 4 and amount2 = 18 then print " Too High Bb"
if amount1 = 4 and amount2 = 19 then print " Too High B"
if amount1 = 5 and amount2 = 0 then print " High G#"
if amount1 = 5 and amount2 = 1 then print " High A"
if amount1 = 5 and amount2 = 2 then print " High Bb"
if amount1 = 5 and amount2 = 3 then print " High B"
if amount1 = 5 and amount2 = 4 then print " High C"
if amount1 = 5 and amount2 = 5 then print " High C#"
if amount1 = 5 and amount2 = 6 then print " High D"
if amount1 = 5 and amount2 = 7 then print " High D#"
if amount1 = 5 and amount2 = 8 then print " High E"
if amount1 = 5 and amount2 = 9 then print " High F"
if amount1 = 5 and amount2 = 10 then print " High F#"
if amount1 = 5 and amount2 = 11 then print " Too High G"
if amount1 = 5 and amount2 = 12 then print " Too High G#"
if amount1 = 5 and amount2 = 13 then print " Too High A"
if amount1 = 5 and amount2 = 14 then print " Too High Bb"
if amount1 = 5 and amount2 = 15 then print " Too High B"
if amount1 = 5 and amount2 = 16 then print " Too High C"
if amount1 = 5 and amount2 = 17 then print " Too High C#"
if amount1 = 5 and amount2 = 18 then print " Too High D"
if amount1 = 5 and amount2 = 19 then print " Too High D#"
if amount1 = 6 and amount2 = 0 then print " High C#"
if amount1 = 6 and amount2 = 1 then print " High D"
if amount1 = 6 and amount2 = 2 then print " High D#"
if amount1 = 6 and amount2 = 3 then print " High E"
if amount1 = 6 and amount2 = 4 then print " High F"
if amount1 = 6 and amount2 = 5 then print " High F#"
if amount1 = 6 and amount2 = 6 then print " Too High G"
if amount1 = 6 and amount2 = 7 then print " Too High G#"
if amount1 = 6 and amount2 = 8 then print " Too High A"
if amount1 = 6 and amount2 = 9 then print " Too High Bb"
if amount1 = 6 and amount2 = 10 then print " Too High B"
if amount1 = 6 and amount2 = 11 then print " Too High C"
if amount1 = 6 and amount2 = 12 then print " Too High C#"
if amount1 = 6 and amount2 = 13 then print " Too High D"
if amount1 = 6 and amount2 = 14 then print " Too High D#"
if amount1 = 6 and amount2 = 15 then print " Too High E"
if amount1 = 6 and amount2 = 16 then print " Too High F"
if amount1 = 6 and amount2 = 17 then print " Too High F#"
if amount1 = 6 and amount2 = 18 then print " Double Too High G"
if amount1 = 6 and amount2 = 19 then print " Double Too High G#"
if amount3 = 1 then print " Whole Note"
if amount3 = 2 then print " Half Note"
if amount3 = 4 then print " Quarter Note"
if amount3 = 8 then print " Eighth Note"
if amount3 = 16 then print " Sixteenth Note"
if amount1 = r then print " Rest"
goto [start]






Posted on Aug 2, 2009, 2:07 PM

Respond to this message   

Goto Forum Home


* Sorry I don't know anything about LilyPond.......

by (Login burger2227)
R

Posted on Aug 2, 2009, 3:44 PM

Respond to this message   

Goto Forum Home


Info

by aoeu (no login)

note names are in lower case, rests are represented by r. 1, 2, 4, 8 after the letter for a whole, half, quarter, etc note. From your program, it looks like the easiest thing to use would be absolute pitches for every note, which is done by adding quotes or commas after the pitch name:

c' up to b' for middle c up to the b above middle c,
c'' for high up to high b which is b''
c for low c up to the b below middle c which is b
etc.

http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Absolute-note-names#Absolute-note-names

A sharp is formed by adding -is to the end of a pitch name and a flat is formed by adding -es. The input d e f is interpreted as “print a D-natural, E-natural, and an F-natural,” regardless of the key signature.

Instead of using print to stdout for the values, OPEN "foobar" for output AS #1 and use PRINT #1, "whatever"
Also, don't put brackets around the line labels in QuickBASIC, instead put a colon after it like this:

foo: PRINT "hello"
GOTO foo

Tutorial:
http://lilypond.org/doc/v2.10/Documentation/user/lilypond/Tutorial#Tutorial

Posted on Aug 2, 2009, 4:24 PM

Respond to this message   

Goto Forum Home


* Good catch on the line label! I missed that....

by (Login burger2227)
R

Posted on Aug 2, 2009, 4:32 PM

Respond to this message   

Goto Forum Home


To save some typing...

by (Login Mikrondel)
R

The following program attempts to further automate the conversion process. The advantage of doing things this way is that you don't have to edit a hundred lines to convert it from printing note names to producing Lilypond output. Of course you will need to modify this program to suit your needs.

The program works by converting the note to a simple number (based on a semitone scale), then converting back into octave/note notation. If you would like anything explained please say so.

DIM NoteNames$(0 TO 11)

NoteNames$(0) = "A"
NoteNames$(1) = "Bb"
NoteNames$(2) = "B"
NoteNames$(3) = "C"
NoteNames$(4) = "C#"
NoteNames$(5) = "D"
NoteNames$(6) = "D#"
NoteNames$(7) = "E"
NoteNames$(8) = "F"
NoteNames$(9) = "F#"
NoteNames$(10) = "G"
NoteNames$(11) = "G#"

DIM StringPitch(1 TO 6)

'E A D G B e
StringPitch(1) = 7
StringPitch(2) = 0 + 12
StringPitch(3) = 5 + 12
StringPitch(4) = 10 + 12
StringPitch(5) = 2 + 12 * 2
StringPitch(6) = 7 + 12 * 2

INPUT "String # "; stri
INPUT "Fret # "; fret

'Deduce the pitch number
pitch = StringPitch(stri) + fret

'Calculate octave and note
octave = pitch \ 12
note = pitch MOD 12

PRINT "Guitar note: Octave"; octave; "note "; NoteNames$(note)

'tranpose to E flat
saxpitch = pitch + 9

'Calculate octave and note
saxoctave = saxpitch \ 12
saxnote = saxpitch MOD 12

PRINT "Sax note: Octave"; saxoctave; "note "; NoteNames$(saxnote)

Posted on Aug 3, 2009, 1:12 AM

Respond to this message   

Goto Forum Home


another novice question

by (no login)

I have a question. Help would be greatly appreciated. I wrote a program that transposes guitar tablature to saxophone notes using an editor I downloaded from download.com and have since formatted my computer and no longer have the editor but I still have the program and I can view it in notepad but it won't open in qbasic. I was wondering if anyone would be so kind as to look at it and tell me what I need to change in order to get it to run in qbasic and what alteration I need to make in order to make the output produced by my program into lilypond- compatible input so that I can run my program and end up with a notepad file that can be opened in lilypond. That way I would be able to take any guitar tablature and turn it into sheet music for my alto saxophone and be able to play any song in the world on my sax. Maybe I could even alter it to transpose to different instruments so that other people could use it too.

Posted on Aug 1, 2009, 7:31 PM

Respond to this message   

Goto Forum Home


Did you try to find the program again?

by (Login burger2227)
R

What is the name of it? What file type are you trying to open?

Lesson learned: Save your old stuff before formatting!

Try a search for it.

Posted on Aug 1, 2009, 8:30 PM

Respond to this message   

Goto Forum Home


Re: Did you try to find the program again?

by (no login)

The program I used was supposed to be similar to qbasic and I did search for it, but I would rather format my program to fit with qbasic since it is more well known and accessable. The file extension is .bas the same as qbasic. I still have the program saved as a notepad. I could probably find a way to make it work in qbasic myself but I need help configuring the program's output to be compatible with lilypond language.

Posted on Aug 1, 2009, 11:03 PM

Respond to this message   

Goto Forum Home


EDIT

by Barbaros (no login)

I remember a program named 'EDIT', very close to QBASIC,yet alone the editor screen with no debugging features. Try to find EDIT.com.

Posted on Aug 2, 2009, 8:12 AM

Respond to this message   

Goto Forum Home


* Isn't it included with Windows?

by aoeu (no login)

Posted on Aug 2, 2009, 8:49 AM

Respond to this message   

Goto Forum Home


Go ahead and post the program at this URL:

by aeeu (no login)

http://www.network54.com/Forum/190883/

Posted on Aug 2, 2009, 8:51 AM

Respond to this message   

Goto Forum Home


Re: Go ahead and post the program at this URL:

by (no login)

It won't allow me to post

Posted on Aug 2, 2009, 1:14 PM

Respond to this message   

Goto Forum Home


* Post it here for now! That forum is locked to non-members.

by (Login burger2227)
R

Posted on Aug 2, 2009, 1:25 PM

Respond to this message   

Goto Forum Home


Just Curious - QB site..

by (no login)

I know that this is the official Qbasic forums (this one right here at network54), but, I wanted to you to know that recently I have adapted it to my forums (thousands of members btw) and wondered if anyone wanted to join me there. I am a good programmer and would love to help in any way I can! Also we have hundreds of other people there who use QB. we just got our qb forums, so don't expect much posts in it now.

http://s1.zetaboards.com/GameMakerStation/index/

maybe in the future...

there are many many new members to meet there, and you can find great support there as well happy.gif

AND GUESS WHAT?
If you guys are willing to merge with us (it means moving from this place to my place) I will give your owner here an ADMIN account, and he can choose a few of you to be MODERATORS. It's a nice place over at GMS. Please come and chat a while, or just come to hang out with friends!

(We are also merging with one other QB site.. so soon to be 13,000 members in a few more days).

Posted on Aug 1, 2009, 1:28 PM

Respond to this message   

Goto Forum Home


I don't see that happening

by (Login burger2227)
R

1) There are no posts in your Qbasic Forum or BAS file areas

2) Where do you come up with 13 K members? Not all qbasic users?

3) You would have to move a lot of archives there.

4) We currently are ranked #2 on Google and we have links pointing to this site on other sites.

Come back when you catch up to us! Thanks

Posted on Aug 1, 2009, 1:44 PM

Respond to this message   

Goto Forum Home


Re: I don't see that happening

by (no login)

1) Read my original post. Ever since year 2007 I've been wanting to add on a QB forums. So I did like 2 minutes ago! There will be posts there soon.. with or without you guys.

2) Please read the topic in our announcement boards for that

3) I have the money to do so.

4) O_O Ok

lol We'll pass you guys. It's just a matter of time! It would just be great if you guys would join us. But, it's up to you! ;)

Posted on Aug 1, 2009, 1:50 PM

Respond to this message   

Goto Forum Home


Well, you should have had those forums already.

by (Login burger2227)
R

Then we would have something to go by. I don't think any other QB forum is going to jump at destroying itself either. We might be able to help programmers there.

To be honest, our traffic has been down significantly in the last few years. Schools don't introduce kids to Qbasic anymore. We now get people who found out about it on the web or something. Plus we have old timers who hang here to help. Some of the best!

Good luck with your site!

 

Posted on Aug 1, 2009, 2:02 PM

Respond to this message   

Goto Forum Home


Re: Well, you should have had those forums already.

by (no login)

Coming to mine to help would be great. Btw, most of the people on my forums don't know what QB is. Lots of them do, but the rest I am just introducing them to.

Thanks ;)

Posted on Aug 1, 2009, 2:06 PM

Respond to this message   

Goto Forum Home


You might want to explore QB64 for newer PC's

by (Login burger2227)
R

64 bit machines do not like Qbasic. QB64 converts QB code to a C progam EXE file.

It's not quite done, but it also adds NEW functions for fonts, screens, colors, sound, etc.

www.QB64.net

Ted

Posted on Aug 1, 2009, 6:00 PM

Respond to this message   

Goto Forum Home


Variable trouble

by (no login)

ok, I'll try not to make this too long...

I'm working on a CAD ish program and so far so good cept this

right now I'm just useing lines and have this (shortend for simplification purposes):

screen 7,0,1,0

vr = 1
DO

'user draws a line:

LINE (x1,y1)-(x2,y2), 14

'data of the line gets stored

lin1(vr) = x1
lin2(vr) = y1
lin3(vr) = x2
lin4(vr) = y2

and then to show the line drawn (and other lines drawn afterwards)
cls
lp = vr
DO WHILE lp > 0
LINE (lin1(lp), lin2(lp)) - (lin3(lp), lin4(lp)), 14
lp = lp - 1
LOOP

PCOPY 1,0
LOOP

****************************************************************---


every thing works, it draws multiples lines and shows them all.. that is, untill i reach 10 lines
to which i get the message "subscript out of range"
and highlights the "LINE (lin1(lp), lin2(lp)) - (lin3(lp), lin4(lp)), 14"

I'm %90 shure it's the lp varialbe that seems to have a problem going into the double digits.
but i also know for a fact the vr variable has no problem going over that #

anybody know why that might be and how I could fix it?

if you need more info feel free to ask

cheers!

Posted on Jul 31, 2009, 11:21 PM

Respond to this message   

Goto Forum Home


*Ya gotta DIM those arrays after 10. Those aren't just variables.

by (Login burger2227)
R

Posted on Jul 31, 2009, 11:57 PM

Respond to this message   

Goto Forum Home


Like this...

by (no login)

DIM lin1(1000)
DIM lin2(1000)
DIM lin3(1000)
DIM lin4(1000)

Posted on Aug 1, 2009, 2:17 AM

Respond to this message   

Goto Forum Home


Ahh ok

by Nick (no login)

Ahhh ok.

thanks!

Posted on Aug 2, 2009, 9:04 PM

Respond to this message   

Goto Forum Home


Mouse Routines in QBasic

by Ben (no login)

I wanted to see some source code of the mouse driver that uses a standard mouse that would be used with a DOS computer. I'm interested about the mouse clock but most importantly the drawing of the mouse on screen and how it works for many screen modes and doesn't flicker and is fast and stuff. But I don't want to see the works of the mouse clock because I must find a way to convert the frequency of the little spinning sticks to on-screen coordinates myself because of my troubles with the parallel port. Where can I find example of mouse driver that is clear also.

Posted on Jul 31, 2009, 11:01 PM

Respond to this message   

Goto Forum Home


Re: Mouse Routines in QBasic

by Nick (no login)

i THINK i know where your getting at, and funnyly enough i just worked on that verry problem today, and solved it too :) (if i understood your question)

http://www.petesqbsite.com/sections/tutorials/tuts/vicstuts/tutor4.txt

^ that page should have everything you need... i think. at least it was for me, and i used my allready existing graphic knowledge to make a drawing program

and as for flicker

check out
http://www.petesqbsite.com/sections/tutorials/tutorials/graphics.txt

it's a bit simplistic, and doesn't really go into depth at all, but the main thing is, if you use pages and just load up the page needed (all the other pages are hidden) you can get rig of/or severly reduce flicker (instead of cls'ing every loop cycle)

Posted on Jul 31, 2009, 11:28 PM

Respond to this message   

Goto Forum Home


* Mouse clock? Spinning sticks? Parallel port?

by (Login burger2227)
R

Posted on Aug 1, 2009, 12:22 AM

Respond to this message   

Goto Forum Home


I've written a simple mouse driver

by (Login Mikrondel)
R

Unfortunately I can't remember the finer details.

I know I used
http://www.computer-engineering.org/ps2mouse/

Actually,
http://www.computer-engineering.org/ps2keyboard/
is also quite important because the PS/2 mouse is controlled by the keyboard controller. When that page refers to the "auxiliary device" it's really talking about the mouse.

>>but most importantly the drawing of the mouse on screen

It would just use the usual VGA tricks, very similar to GET/PUT, but hand-optimised for the very small graphic that the mouse cursor is. As you know, VGA breaks each row into groups of 8 pixels. I wouldn't be surprised if the mouse driver stores 8 versions of the mouse cursor graphic in memory, for each possible pixel-alignment, though maybe it doesn't need to.

I think there's no flicker simply because the image is so small.

Posted on Aug 1, 2009, 5:06 AM

Respond to this message   

Goto Forum Home


Ok

by Ben (no login)

Thanks for the information. I think in screen 12 the mouse is 8 pixels wide so you can probably store it in the 16bit and shift it without carrying.

Do you have explaination for the fact that even if program is busy inside a loop or something, the mouse cursor is still movable? How exactly does that work?

Posted on Aug 1, 2009, 7:28 PM

Respond to this message   

Goto Forum Home


Which mouse are you talking about?

by (Login burger2227)
R

If QB is in a window (0) then that is the Windows mouse which is independant of the program. To use a mouse in fullscreen QB, you need to include a mouse read (AX = 3)  to allow movements in every loop.

 

Posted on Aug 1, 2009, 9:01 PM

Respond to this message   

Goto Forum Home


Interrutps!

by (Login Mikrondel)
R

The operating system (be it Windows or DOS) sets up some code to be run when the keyboard/mouse/hard disk/network device etc. signals that something has happened that needs to be dealt with.

The processor stops executing the current program, and runs this "interrupt handler". The interrupt handler will resume the program that was interrupted when it has finished doing whatever needs doing.

Apart from the time it takes to execute the interrupt handler, the interrupted program isn't affected in any way.

The "multikey" ASM things in the FAQ replace the ordinary keyboard handler with a custom one.

Posted on Aug 2, 2009, 4:49 PM

Respond to this message   

Goto Forum Home


Weird !

by (Login Liszt1)
R

Test,

why i should creat an account ? why my pseudo "Liszt" is in use ? Anyway... it's a hell to post in Faqs and Samples. Is this an improvement ....? not sure this forum is easyer to use now.

L

Posted on Jul 31, 2009, 2:57 AM

Respond to this message   

Goto Forum Home


You have been added to the "R" Group...

by Pete (no login)

You should be able to post to any sub forum now. Let me know if you have any difficulty.

Make sure you when you log in at Network54.com to select select QUARTER. It takes the "pain" out of logging in every day.

Pete



Posted on Jul 31, 2009, 9:33 AM

Respond to this message   

Goto Forum Home


* He meant log in QUARTERLY in the N54 member options.

by (Login burger2227)
R

Posted on Jul 31, 2009, 11:00 AM

Respond to this message   

Goto Forum Home


* I thought your handle was "Lisztfr" ?

by (Login burger2227)
R

Posted on Aug 1, 2009, 2:11 PM

Respond to this message   

Goto Forum Home


Some archiving started...

by Pete (Login The-Universe)
Admin

Nothing major, but the non-moderated subforums have been made read-only except to "R" Group members. Be sure you are signed in to N54 if you need to add or edit any posts in those forums.

Special note to TheBOB. I will look into the download files, but it may take up to two weekends to fix it. There is the possibility with N54 servers that I may have to re-write the download page and change the names of the files to get them working again.

Pete

Posted on Jul 30, 2009, 7:00 PM

Respond to this message   

Goto Forum Home


Don't fret about it...

by (Login qb432l)
R

The tens of thousands of sobbing kids that have been lined up to download my programs since last year won't mind waiting a little longer. Can you see "Joey"? He's about the fourth one in line. He's got his little toy DOSBox with him and his puppy "Marley". Sure his nose is running and he hasn't even learned to write a "Hello world" program yet, but does that make him any less of a programmer?

I'm starting to tear up now, so I'd better stop.

Long story short, there's no line up and no pressure from me. I shouldn't even have posted, given that you retired already. If I could have deleted the "Universe" post, I would have done so the same day.

-Bob

Posted on Jul 31, 2009, 9:46 AM

Respond to this message   

Goto Forum Home


*Oh, yeah, I could have pulled a Clippy and changed it to "Never mind".

by (Login qb432l)
R

*

Posted on Jul 31, 2009, 9:49 AM

Respond to this message   

Goto Forum Home


* Never mind.......................:-)

by (Login burger2227)
R

Posted on Jul 31, 2009, 10:13 PM

Respond to this message   

Goto Forum Home


* Not to mention the poor blokes that got corruped files..........nevermind.

by (Login burger2227)
R

Posted on Jul 31, 2009, 10:16 PM

Respond to this message   

Goto Forum Home


Archiving?

by (Login burger2227)
R

I guess you aren't going to let others even help run the forums then. I thought that this was debatable. Apparently it is not.

What exactly is non-moderated? The stuff you used to do? From the looks of the main forum, nothing is moderated there either.

The ONLY advantage our forums have over other ones is that Membership is NOT REQUIRED to post. In fact, I think that there should be a place in the header stating that!

I am disappointed in your decision. Artelius and I were willing to help.

PS: Do you still plan on putting my download link in there too?



    
This message has been edited by burger2227 on Jul 31, 2009 11:16 AM

Posted on Jul 31, 2009, 11:12 AM

Respond to this message   

Goto Forum Home


* Nevermind

by (Login burger2227)
R

 



    
This message has been edited by burger2227 on Aug 2, 2009 4:51 PM
This message has been edited by burger2227 on Jul 29, 2009 11:06 PM
This message has been edited by burger2227 on Jul 29, 2009 11:05 PM

Posted on Jul 29, 2009, 11:04 PM

Respond to this message   

Goto Forum Home


novice question

by (no login)

I am looking for help on a very simple program that I am writing. It consists of many if then statements, the result of which end in a letter representing a musical note (A, B, Bb, C, C#, D, D#, etc.) It is a program that transposes guitat tablature to alto saxophone music. I need a way to take the result of my if then statements and turn them from a letter representing a musical note into an actual musical note printed onto a blank music paper program. If anyone could help me, it would be greatly appreciated.

Posted on Jul 29, 2009, 6:51 PM

Respond to this message   

Goto Forum Home


Lillypond

by qbguy (no login)

http://lilypond.org/web/

There is an example at Wikipedia:
http://en.wikipedia.org/wiki/Lilypond

Posted on Jul 29, 2009, 7:06 PM

Respond to this message   

Goto Forum Home


* You can output Lillypond markup and have it produce music notation.

by qbguy (no login)

Posted on Jul 29, 2009, 7:15 PM

Respond to this message   

Goto Forum Home


thank you

by (no login)

Thank you so much. that is exactly what I needed. I have another question. your help would be greatly appreciated. I wrote my program using an editor I downloaded from download.com and have since formatted my computer and no longer have the editor but I still have the program and I can view it in notepad but it won't open in qbasic. I was wondering if you would be so kind to look at it and tell me what I need to change in order to get it to run in qbasic and what alteration I need to make in order to make the output produced by my program into lilypond- compatible input so that I can run my program and end up with a notepad file that can be opened in lilypond. That way I would be able to take any guitar tablature and turn it into sheet music for my alto saxophone and then I would be able to play any song in the world. Maybe I could even alter it to transpose to different instruments so that other people could do the same thing.

Posted on Aug 1, 2009, 7:26 PM

Respond to this message   

Goto Forum Home


Clock ain` working

by (no login)

I made a program that shows time but it doesn`t work.What`s the problem?

10 CLS
20 PRINT "This is a clock.In order to work you need to set the time.The Program will ask you first about hour,then minute,and then second."
30 INPUT "What hour is it"; s$
31 IF s$ > 23 THEN
32 PRINT "Error.Try again"
33 GOTO 30
34 ELSE GOTO 40
40 INPUT "What minute is it"; m$
41 IF m$ > 59 THEN
42 PRINT "Error.Try again"
43 goto40
44 ELSE GOTO 50
50 INPUT "What second is it"; sec$
51 IF sec$ > 59 THEN
52 PRINT "Error.Try again"
53 GOTO 50
54 ELSE GOTO 60
60 DO
70 sec$ = sec$ + 1
80 SLEEP 1
90 IF sec$ = 60 THEN
100 sec$ = 0
110 m$ = m$ + 1
120 ELSE GOTO 130
130 IF m$ = 60 THEN
140 m$ = 0
150 s$ = s$ + 1
151 BEEP
160 ELSE GOTO 170
170 IF s$ = 24 THEN
180 s$ = 0
190 ELSE GOTO 200
200 LOOP
210 END



Posted on Jul 29, 2009, 5:15 PM

Respond to this message   

Goto Forum Home


A few things need correcting...

by (Login qb432l)
R

To begin with, your INPUT statements call for strings ($), but then your code treats them as numerical values. To correct this, simply eliminate all $'s, which will input numerical values and you won't have any type mismatch errors.

Secondly, your IF statements don't have END IF's. To correct this, you will also have to change your ELSE lines to two lines of code:

## ELSE
## GOTO ##
## END IF

A third problem results from the fact that there is no code to PRINT the clock. Should be a statement such as:

74 LOCATE 12, 12
75 PRINT hours; minutes; seconds

NOTE: Unless you use a LOCATE statement, the output will just scroll down the screen. Also, it's a good idea to give your variables names that describe them.

Finally, immediately following the DO statement, place:
## k$ = INKEY$

... and then add this to the LOOP statement:
## LOOP WHILE k$ = ""

That way, you can end the program by pressing a key.

Make the corrections and then post again if there are any other problems.

-Bob



    
This message has been edited by qb432l on Jul 29, 2009 6:33 PM

Posted on Jul 29, 2009, 6:29 PM

Respond to this message   

Goto Forum Home


*What happened to line 43?

by Ben (no login)

Posted on Jul 29, 2009, 7:09 PM

Respond to this message   

Goto Forum Home


TIME$ is given automatically .......

by (no login)

clock$ = TIME$ 'returns military time as a string EX: "12:05:22"
hour$ = LEFT$(TIME$, 2) ' "12" in example
min$ = MID$(TIME$, 4, 2) ' "05" in example
sec$ = RIGHT$(TIME$, 2) ' "22" in example

To use the TIME$ as a second counter you just wait for a change in sec$:

DO: sec$ = RIGHT$(TIME$, 2)

IF RIGHT$(TIME$, 2) < sec$ THEN count = count + 1 <br>
LOOP UNTIL count = 10

The only problem with using TIME$ is that it will lag when Windows puts the program in the task bar.



Posted on Jul 29, 2009, 10:10 PM

Respond to this message   

Goto Forum Home