QBasic and QB64 Discussion Board

[QB Forum Archives (1999-2009)/ ] [QB FAQ] [QB Links and Downloads] [Subforums and Chat Room] [Search]

QB64.Net Homepage   QB/QB64 Keywords   QB Graphics Forum   Homework Policy



Startup with whole computer dedicated to qb or Qb64

by (no login)

I am sure I am not the first with this question! Please tolerate with mercy.

In the bad old days you could (in DOS?) do a QB /AH and dedicate a HUGE amount of memory to basic
This at one stroke rid you of
Bill's crap
Isolated you (from the evil world) and let you get on with the job

So HOW do we implement on an SP2 stick
DUAL startup choice
either (a) Windows
or (b) QB


I ask this for me (XP) and for friends defiled with Windows 7

Many thanks
John

Posted on Dec 18, 2010, 2:04 AM

Respond to this message   

Return to Index


Install GNU/Linux

by (Login Mikrondel)
R

You can probably run pure DOS on your computer. Then you can use QB. The easiest way to run DOS is to boot off a floppy disk, but many computers don't possess floppy drives. Another option is to create a FAT partition on your hard disk and install some incarnation of DOS (such as FreeDOS) on it.

But QB64 requires either Windows or GNU/Linux.

GNU/Linux is a popular Free (as in "free speech") operating system. All the source code is available. It is extremely customisable and there are many different distributions, maintained by different people, catering to different needs and tastes. A decent place to start is Ubuntu. If you want to know more please post in our "Linux club" subforum.

Posted on Dec 18, 2010, 2:52 AM

Respond to this message   

Return to Index


If Qbasic cannot run fullscreen in XP try this fix.

by (Login burger2227)
R

Galleon will be upgrading QB64 in January and has stated that the Linux version should be caught up soon. The Qbasic keywords should work the same in both versions.

ON KEY should be the next keyword that will be added.

QB64 does not have the memory or speed limitations that Qbasic had. If you are having problems with Qbasic on XP, try this upgrade:

http://dl.dropbox.com/u/8440706/XPvideoFix.zip

Also try copying Autoexec.NT from C:\Windows\Repair to C:\Windows\System32

Posted on Dec 18, 2010, 6:56 AM

Respond to this message   

Return to Index


Re: Install GNU/Linux

by john (no login)

Many thanks Artelius

Posted on Dec 18, 2010, 11:25 PM

Respond to this message   

Return to Index


Re: Startup with whole computer dedicated to qb or Qb64

by (Login MCalkins)
Moderator

being a qbasic 1.1 person, not a qb 4.5 person, what exactly does /AH do? a quick search seems to indicate it makes large (>64K) dynamic arrays possible. if that's all it does, that's not quite dedicating the whole computer to qbasic. it seems you could get around that anyway by requesting extra memory with xms. does /AH not work in xp?

why would you need the whole computer dedicated to qbasic? the advantage to running qbasic inside windows is that you can copy and paste to other programs, be reading documentation at the same time, be debugging output, etc. the ideal qbasic programming environment is a windows 98se computer. it offers strong dos compatibility and the advantages of a windowed, multitasking environment.

if you're just trying to get around ntvdm's stupidity, then either do what artelius said (install freedos on a fat partition, and use a bootloader like SBM (i would think ntldr would be capable, but i'm not sure)), or use dosbox or bochs with freedos. but none of those are going to help you around qbasic's environment limits, including it's real mode nature.

regards,
michael

Posted on Jan 10, 2011, 9:46 PM

Respond to this message   

Return to Index


I thought AH was something from FreeBasic...

by (Login The-Universe)
Admin


Actually, I'm kidding. It does what your research results discovered. I needed to use it once to get a little extra memory to make a large application run.

Pete

Posted on Jan 11, 2011, 11:12 AM

Respond to this message   

Return to Index


John replied by email instead of on the forum.

by (Login MCalkins)
Moderator

Hi Michael

Thank you for your advice to my message titled "Startup with whole computer dedicated to qb or Qb64"
At: http://network54.com/Forum/message?messageid=1292666660&forumid=648955


/AH mode allows "arrays huge" and gives increased memory access "up to the whole computer"

It is not that we want to exclude Windows - it is a kluge and malware risk and we hate it, but use it - it is simply the Bill Gates in his Windows 7 does not ALLOW you to run QB (except in dreadfully slow DosBox)

We want "dual bootup" - a CHOICE between Windows or QBASIC.
But Bill has never heard of memory sticks and has deleted floppy disk startups!

For Windows XP there are ways around Bill and then you CAN run QB within Windows.
For Windows 7 he implies that by buying an external floppy drive you can boot up without windows (but you can't).
We want to run QB at FULL SPEED under Windows 7 (or else put Windows 7 in the trash where it belongs and replace it with XP).

In either case the modern way is to load from a memory stick (one for each mode of operation it you like)

I hope this has made clearer what we are trying to do.
At present my US friend cannot run the QB progs I write (planetary simulations) because he is FORCED to do so under DosBox which is hundreds of times slower.

Many thanks for any ideas and suggestions
John

Posted on Jan 11, 2011, 2:11 PM

Respond to this message   

Return to Index


Re: John replied by email instead of on the forum.

by (Login MCalkins)
Moderator

>/AH mode allows "arrays huge" and gives increased memory access "up to the whole computer"

i'm guessing here, but i don't think qb 4.5 lets you get extended memory directly. i think pds 7.1 lets you get ems. you can get xms in qbasic 1.1 or qb 4.5 by using assembly routines to interact with the xmm. all the qb versions (qb, qbasic, and pds) are real mode, meaning they operating in 16 bit segmented memory addressing mode. they are inherently limited to just over 1 mb. real mode programs can use xms or ems to indirectly access memory above 1 mb.

qb64 and freebasic use protected mode. they should allow you to use as much memory as you need.

>it is simply the Bill Gates in his Windows 7 does not ALLOW you to run QB (except in dreadfully slow DosBox)

probably x64, then. if i remember right, x64 version from xp on don't have ntvdm.

>We want "dual bootup" - a CHOICE between Windows or QBASIC.

then your best option is to resize your ntfs partition, create a fat partition, install freedos, and use a boot manager.

>For Windows 7 he implies that by buying an external floppy drive you can boot up without windows (but you can't).

the ability or inability to boot to a floppy drive is a bios issue, not a windows issue. perhaps SBM (smart boot manager) might be able to help.

it is also possible to burn a cd to boot into a mode that emulates a floppy. the windows 98se installation cd, for example, uses that mode, to boot dos.

regards,
michael

p.s. i'm not sure, but having a sata hdd might complicate an attempt to use dos on it. i don't know if freedos has sata compatibility. you might need to change you hdd sata mode in your bios.

Posted on Jan 11, 2011, 2:24 PM

Respond to this message   

Return to Index


Clippy you got email

by (no login)

Clippy you got email.
OlDosLover

Posted on Dec 17, 2010, 10:23 AM

Respond to this message   

Return to Index


LOL

by Unseen Machine (no login)

I love that you think clippy will check here before he checks his emails!!!

Posted on Dec 17, 2010, 2:01 PM

Respond to this message   

Return to Index


* He was right! I did...

by Clippy (Login burger2227)
R

Posted on Dec 17, 2010, 3:12 PM

Respond to this message   

Return to Index


Help Please

by Zack (no login)

I have a few questions.

I found out how to use the _ROUND(#) function, but is there a way to specifically round up or down rather than to the nearest whole number?

I have a program where you input data and it solves a mathmatical problem. I used IF commands for the input and also used ELSE. When they enter a number, I made it check if it is valid like:
---
BLAH:
INPUT ": ", A
IF A >= 0 AND A <= 50 THEN
PRINT "Blah"
ELSE
GOTO BLAH
END IF
---
This works well, however, if you enter like 5.738759265 it will take it. How can I get it to only accept whole numbers. Also, is there a way to the previously mentioned but only accept an input up to 2 decimals (ex/ 4.67 works, but 4.677 would not work)?

How can I get the program to wait until the song has finished playing to move to the next command?

How can I set a picture as the background rather than just a color?

And is there a way to Print a picture in Screen 0 along with text, or do you have to switch to Screen 13?

Thank you very much for any help you give me and thanks so much to the people who have already helped me before. Without you guys, i probably would have never been able to figure it out.

Posted on Dec 16, 2010, 7:19 PM

Respond to this message   

Return to Index


Some answers

by (Login Mikrondel)
R

> I found out how to use the _ROUND(#) function, but is there a way to
> specifically round up or down rather than to the nearest whole number?

For small numbers (up to 32767) you can use INT to round down and FIX to round towards zero. I'll let you figure out how to round upwards.


> How can I get it to only accept whole numbers.

INPUT is quite limited. INKEY$ lets you detect individual keypresses which can be used to build something that does exactly what you want.


> How can I get the program to wait until the song has finished playing to move to the next command?

How are you playing sound? If you use _SNDPLAY then you can do something like

DO
LOOP WHILE _SNDPLAYING


> How can I set a picture as the background rather than just a color?

Not directly (as far as I know). You basically need to "draw" the background yourself whenever you put anything on the screen. There are some techniques to help.


> And is there a way to Print a picture in Screen 0 along with text, or do you have to switch to Screen 13?

SCREEN 0 is text only. In DOS (and therefore QB) the graphics card was in a special, fast, text-only mode. In QB64 that isn't the case but for compatibility I don't think SCREEN 0 supports images.

You're not stuck with SCREEN 13, though. QB64 offers much more flexible screen modes. Refer to http://qb64.net/wiki/index.php?title=SCREEN_(statement)

Posted on Dec 17, 2010, 12:11 AM

Respond to this message   

Return to Index


Thanks

by Zack (no login)

That helped alot, thanks. But can someone elaborate on the INKEY$ usage in this situation. Also, if there isnt a way to make a picture in the background, is there a program that can be used to design the interface thats compatuble with QB64?

Posted on Dec 17, 2010, 2:13 AM

Respond to this message   

Return to Index


Rounding up

by Solitaire (Login Solitaire1)
S

CINT will only work with small numbers (up to 32767). For larger numbers, you can use CLNG. Both these functions will round to the nearest even number (Banker's Rounding) if the midpoint is 5.

INT will work with any number up to 7 digits before the decimal point. It will truncate anything to the right of the decimal point.

downnum = INT(decnum)

To get the next higher number, you can do this:

upnum = INT(decnum) + 1

In Visual Basic (and in Excel), these Math methods are called Floor and Ceiling.

In order to round up to the nearest whole number if the midpoint is 5, then add .5 to the number before INT. Example:

wholenum = INT(decnum + .5)

Posted on Dec 17, 2010, 5:32 AM

Respond to this message   

Return to Index


* I think I hear Moneo coming! :-)

by (Login burger2227)
R

Posted on Dec 17, 2010, 10:06 PM

Respond to this message   

Return to Index


*Thanks for the warning

by (Login Mikrondel)
R

Posted on Dec 18, 2010, 12:35 AM

Respond to this message   

Return to Index


I give up

by Moneo (no login)

I think I've beaten the subject of rounding to death, and even wrote an extensive tutorial. However, it seems that people still want to do rounding their own way. I guess it has to do with the "not invented here syndrome".

Regards... Moneo

Posted on Dec 18, 2010, 11:12 AM

Respond to this message   

Return to Index


Well Moneo, like I always say... If you can't beat 'em...

by (Login The-Universe)
Admin


You aren't hitting them hard enough! happy.gif

Pete

- Merry Christmas to you and your family.

Posted on Dec 18, 2010, 9:39 PM

Respond to this message   

Return to Index


Re: Well Moneo, like I always say... If you can't beat 'em...

by moneo (no login)

Thanks for the words of wisdom.

And a very Merry Christmas to you and yours.

Warm regards... Moneo

Posted on Dec 19, 2010, 11:06 AM

Respond to this message   

Return to Index


How to get numbers out of QBASIC

by (no login)

With Qbasic I can generate a stream of numbers
To what memory location do I send them to be read EXTERNALLY at one of the sockets on my XP computer in real time (less than one second delay)?

Either after D/A or before.

Everyone says "Can't be done - Bill prevents this!"

Many thanks
john

Posted on Dec 16, 2010, 2:56 AM

Respond to this message   

Return to Index


* Try a file.

by Clippy (Login burger2227)
R

Posted on Dec 16, 2010, 3:22 PM

Respond to this message   

Return to Index


*I think he wants to send it out on serial/parallel port

by (Login Mikrondel)
R

Posted on Dec 16, 2010, 4:14 PM

Respond to this message   

Return to Index


* I thought the same.

by (Login The-Universe)
Admin

Posted on Dec 16, 2010, 4:36 PM

Respond to this message   

Return to Index


yes, I want to HEAR it (for example on phones)

by (no login)

I generate a stream of modulated pulses of varying shape.
Now I want to feed them to an audio amp under test and measure the results in real time as I wary the pulses.
John

Posted on Dec 16, 2010, 11:01 PM

Respond to this message   

Return to Index


* What port and what OS? Look for LPT or COM component settings.

by Clippy (Login burger2227)
R

Posted on Dec 16, 2010, 9:50 PM

Respond to this message   

Return to Index


Re: * What port and what OS? Look for LPT or COM component settings.

by (no login)

Sorry, Clippy, I do not understand

I operate under Windows XP, and defeat Bill in order to run QB.

What is a "component setting"
If I send to the line printer then between which two wires does the number-stream appear?
Won't it be data codes (digital) for letters of the alphabet?

If I write a "file", can it be numbers?
Is there an internal D/A I can use, or must it be external?

Can it be read from a computer port to the outside world (which one?)while still being added to?
Which memory address do I send the numbers to?

Many thanks
John

Posted on Dec 16, 2010, 11:34 PM

Respond to this message   

Return to Index


What do YOU want to use?

by Clippy (Login burger2227)
R

Do you have a parallel port? What do you want to do? You are telling us nothing! Give us your idea!

I have been running QB on my 32 bit XP for 5 years without a problem. What did you have to do?

The port settings are in Control Panel - Performance and Maintenance - System - Hardware - Device Manager. The HEX addresses for LPT or COM are listed there when you click on them.

Posted on Dec 17, 2010, 12:03 AM

Respond to this message   

Return to Index


Re: What do YOU want to use?

by john (no login)

Clippy
You have hit on a central problem of computer use.

UNTIL you have experience, HOW can you tell what you want to use?

I just want to get the job done - I care not how.

The job is to send an actively real-time-computed waveform to the outside world (as volts)
So what hardware and software is the best way to do that (or even a good way)please?

As I have a thingy called "audio output socket", let's use that if we can defeat the obstacles Bill gates puts in our way?

Any suggestions you have would be greatly appreciated. Is line printer LPR a good way? Why? How? Which two wires?

Many thanks
John

Posted on Dec 18, 2010, 11:38 PM

Respond to this message   

Return to Index


What's between you and Bill Gates for crying out loud!

by (Login burger2227)
R

BILL GATES HAS NOTHING TO DO WITH THIS! A MAC would have the SAME problem!

Computers don't send out amplified VOLTAGE. They can send only on-off pulses of the same voltage that you would have a hard time regulating. AN LPT or COM port sends out data at set speeds. You may delay sending them, but you cannot get the timing accuracy to create certain notes.

What do you mean by an "audio output socket"? Where does that PLUG IN? The audio card can't connect to a port. It IS a port to the speakers! Your NOT gonna drive a speaker with the LPT or COM port.

Voltage has nothing to do with sound. Frequency does! You don't want ANY port voltage on the speaker as it would burn up the PC.

Posted on Dec 19, 2010, 1:35 AM

Respond to this message   

Return to Index


Not sure about all that...

by (Login Mikrondel)
R

> BILL GATES HAS NOTHING TO DO WITH THIS! A MAC would have the SAME problem!

Macs don't have parallel ports :) Different problem.

That said, blaming Bill Gates for every one of your computer problems (and meaning it) is a bit childish. Microsoft does some evil things and some incompetent things but changing APIs in order to facilitate multiprogramming and make crashes and hangs less likely isn't one of them.


> Computers don't send out amplified VOLTAGE.

Well, they can. Not on a parallel port of course. But an audio-out port, say.


> They can send only on-off pulses of the same voltage that you would have a hard time regulating. AN LPT or COM port sends out data at set speeds. You may delay sending them, but you cannot get the timing accuracy to create certain notes.

Maybe not under Windows, but in pure DOS you can get pretty high frequencies.


> What do you mean by an "audio output socket"? Where does that PLUG IN? The audio card can't connect to a port. It IS a port to the speakers!

I think that's the point! Playing waves using the sound card! (Actually you can use your sound card as a primitive oscilloscope by connecting something to the microphone port.)

> Voltage has nothing to do with sound. Frequency does! You don't want ANY port voltage on the speaker as it would burn up the PC.

Voltage has a lot to do with sound! Because there's a linear relationship between voltage and diaphragm displacement. Generating audio on a PC involves generating a sequence of voltages.

The frequency domain is used for compression and effects but sound must be expressed in the time domain before being turned into electrical signals.

Posted on Dec 19, 2010, 2:34 AM

Respond to this message   

Return to Index


Voltages

by (Login burger2227)
R

Sure, you need some kind of voltage, but a parallel port only can send 5 volts and a COM port sends the same voltage while it transmits ranging up to 25 volts perhaps. So if the voltages can't be altered, the only thing left is frequency modulation.

Speakers work on changes in voltage from on to off. You can put a capacitor in line with the output of a sound card to isolate the DC voltage from the speaker and still get sound. An LPT port would probably burn up trying to run the current draw of a speaker.

So you point by point me and THEN provide NO solution or code anyhow? What good does that do? I already KNEW you were smart, so don't EVEN TRY to impress ME! happy.gif

Ted

Posted on Dec 19, 2010, 8:11 AM

Respond to this message   

Return to Index


I DID provide a link to a related program...

by (Login Mikrondel)
R

> if the voltages can't be altered, the only thing left is frequency modulation.

True, but the OP never said he was restricted to use LPT or COM ports.

Posted on Dec 20, 2010, 4:07 AM

Respond to this message   

Return to Index


This reminds me of a joke

by qbguy (no login)

How do you do a fast Fourier transform on Windows Vista?

You can't -- as soon as you run Windows it stops being fast.

Posted on Dec 21, 2010, 12:47 PM

Respond to this message   

Return to Index


Not true! To the Cloud to respond with my Windows Live....

by (Login The-Universe)
Admin


S...e...e, I.... c....a..n................................................................

N54 Messenger: Sorry, stale post. Please try to redo your response.

Posted on Dec 21, 2010, 4:17 PM

Respond to this message   

Return to Index


Re: What's between you and Bill Gates for crying out loud!

by john (no login)

Thanks Clippy for trying to help.

Sound is caused by motion and IS waves in the air

Motion can be caused by a transducer.
If we send this transducer energy pulses it will make sound.
It generates a wave whose amplitude (and thus shape - the timbre of the sound) can be controlled by the pulses

If you want all pulses of fixed height, then use Pulse-width modulation.
So our basic prog could generate digital 1 pulses that deliver a wave (total energy volts squared times time)E per microsecond by altering the pulse-spacings.

My qbas prog does that, so all we need is a way to feed them to headphones.
But Bill says Not Allowed.

John

Posted on Dec 19, 2010, 4:13 AM

Respond to this message   

Return to Index


Bill retired, but M$ is still pulling in the reins...

by (Login burger2227)
R

Yes, from what I have heard Windows 7 is even more "secure". They don't want people accessing ports or the sound cards anymore. I gather that a LOT of people blamed M$ for their ignorance about how to access them correctly so they shut them down.

There MUST be a way however as they are still making programs that can read the sound frequencies and display them. Some people at QB64 were trying to create sounds too. They only got a few things to make NOISE. Not exactly what they had in mind.

QB64 has an extended PLAY function that can now control the volume and make multiple notes using a comma so that they play simultaneously. Perhaps you could try that.

Ted

Posted on Dec 19, 2010, 12:06 PM

Respond to this message   

Return to Index


Re: Bill retired, but M$ is still pulling in the reins...

by john (no login)

I am sorry that as a complete newbie to your QB64 I can only admire and ask questions.
I have not got farther than loading qb64 and running a dozen of my QB progs and finding that some run while the others (in QB64) "cannot be found".

I am no where NEAR providing solutions (yet alone code) within qb64.

All I am any good at is writing QBASIC progs to solve engineering and physics and maths problems by simulation and finding out "what happens if...."

One day I shall be able to help, but for now I am a parasite. Also as the great Hungariam maths chap said on his gravestone "At last, no longer the stupider I get"
Thanks for you help and patience
John

Posted on Dec 19, 2010, 8:42 PM

Respond to this message   

Return to Index


Are you putting the files in the QB64 folder?

by (Login burger2227)
R

You can make a BAT file to run it from anywhere, but QB64 looks for BAS files in that folder.

Here is a program to create the batch file:

http://dl.dropbox.com/u/8440706/QB64BAT.zip

If you add it to the BAS Right click menu you can compile from any folder by Right clicking and Open With...

All BAS files must be saved as TEXT readable in QB4.5.

Posted on Dec 19, 2010, 9:20 PM

Respond to this message   

Return to Index


Use QB64?

by (Login Mikrondel)
R

I made a tone generator that goes through the horrible process of generating a WAV file on the fly. But it does the job. Give the program a try to see what I mean. If you want help in modifying the program let me know.

http://www.qb64.net/forum/index.php?topic=1168.0

Posted on Dec 17, 2010, 2:31 PM

Respond to this message   

Return to Index


Re: Use QB64?

by (no login)

WOW, Artelius, I am impressed!!
You guys have been working on this for some time! Congratulations.

I am fascinated by your post, and prog, and the many replies and ideas and comments you received!

One I liked best was "Never think small!"
Knowing that oscillators revolutionised electronics, back in 1960s I built a chemical oscillator. A chap secretly behind the iron curtain beat me to it, and was ridiculed: it was (like all new things) KNOWN to be impossible.

In the days I first used computers (1961) I was fascinated by the need for progs that would SELF-improve! Evolve! Mess with themselves and breed only those that worked better.
Dead simple if only you can say what is "better" and in those days get any of your mutants to run at all.

It has ALL to do with "feedback" - how flutes, organ pipes and lasers work!

And nowadays we can SIMULATE any feedback ideas we have in real time!



OK, HOW do I download your QB64 (not obvious to me! - can't see how or where or which "version"). Is it better than QB that I do all my simulations on?

Ok "Don't think small"
I want to generate dynamically changing real-time sound
BE a Lady Ga Ga. Transcend her! Self-optimise her!

Please help me
John

Posted on Dec 18, 2010, 1:15 AM

Respond to this message   

Return to Index


You can get QB64 from here...

by (Login Mikrondel)
R

http://www.qb64.net/forum/index.php?board=2.0

Get the latest version.

> Is it better than QB that I do all my simulations on?

Yes. It has very good QB compatibility (if you have any issues let us know and we'll help you work through them). However it runs as a 32-bit program so it's faster and has access to much more memory.

One of our members, Galleon, created QB64 and is the main developer.


> It has ALL to do with "feedback" - how flutes, organ pipes and lasers work!

Yes it does. You've no idea how relevant that statement is to me right now :D

Posted on Dec 18, 2010, 1:28 AM

Respond to this message   

Return to Index


Getting QB64 - there is a typo

by (no login)

I have been telling all my friends abt qb64

They are having problems as this copied below does NOT work!

QB64 V0.91 is released (source code too!)
0
Posted in Uncategorized by Qbasicnews.com - QB/FB News
August 11, 2010

The QB64 project is moving right along with a new release! This new version includes an update feature that updates the compiler package when new files are added/changed. It comes with a "classic" Qbasic looking IDE. QB64 is now a self-compiling compiler and SOURCE CODE IS INCLUDED!

The project has a growing community of active & helful Qbasic fans and a decent wiki. Most Qbasic/QB BAS code will compile with QB64.

For details on this release and for a QB64 download just go here:
[url=ht...

TYPO HERE?

Posted on Dec 18, 2010, 11:06 PM

Respond to this message   

Return to Index


*I'm confused as to what the problem is. Did you go to the link I provided?

by (Login Mikrondel)
R

Posted on Dec 19, 2010, 12:02 AM

Respond to this message   

Return to Index


Re: *I'm confused as to what the problem is. Did you go to the link I provided?

by john (no login)

The problem is the typo I copied for you: the site many people discover you on does NOT have a working download.

Yes, for myself, thank you very much - you told me how and that one DID work!

I am just trying to warn you that the other one does NOT work, and often it is THAT one newcomers discover QB64 in and cannot download it so give up

Maybe my message giving details never arrived?
Is there not some way I can SEE what I am replying to? See if my message is missing from the list.

Posted on Dec 19, 2010, 12:30 AM

Respond to this message   

Return to Index


Re: *I'm confused as to what the problem is. Did you go to the link I provided?

by john (no login)

For details on this release and for a QB64 download just go here:
[url=ht...

TYPO HERE?
This is what doesn't work [url=ht...

Posted on Dec 19, 2010, 12:34 AM

Respond to this message   

Return to Index


*Which site is that on?

by (Login Mikrondel)
R

Posted on Dec 19, 2010, 1:00 AM

Respond to this message   

Return to Index


non wkg download

by john (no login)

http://www.qbasic.com/

Posted on Dec 19, 2010, 3:59 AM

Respond to this message   

Return to Index


So Please please say more!!!

by john (no login)

in reply to my
> It has ALL to do with "feedback" - how flutes, organ pipes and lasers work!

You said:-
Yes it does. You've no idea how relevant that statement is to me right now :D

Please expand.

If I pass ONE THING on to my grandson it will be this:-
WHATEVER the subject FEEDBACK is VITAL and central to new invention.

Posted on Dec 18, 2010, 11:17 PM

Respond to this message   

Return to Index


More

by (Login Mikrondel)
R

The importance of feedback has demonstrated itself to me many times.

But recently I've become involved with a new development in computer technology - a radically different approach with the potential to have a huge impact on the industry. I can't reveal any more, suffice to say that feedback is critical.


Also, Australia seems to have been minimally affected but the economic downturn. I don't know much about it but my belief is that we have the right feedback mechanism. At the core of it is our target inflation rate of 2 to 3%.

Posted on Dec 30, 2010, 12:43 AM

Respond to this message   

Return to Index


Let me guess, your top-secret project is...

by (Login The-Universe)
Admin


A product that hangs over your ears and allows you to see a heads up holographic image in front of you... and it will be called...

The iGlasses

Pete happy.gif

Posted on Dec 30, 2010, 7:08 PM

Respond to this message   

Return to Index


More meaning for EVERYTHING

by john (no login)

Artelius

My project is yet more secret than yours!
All I can say is it comes in TWO REVELATIONS:-
1. NOTHING is linear (all that schools stuff is crap)
2. Feedback is the KEY to the wonders of the world, understanding and simulating them and being impressed by them

I am working to simulate the UK economy - starting from "the Bank" and its "inflation policy"

I agree that Australia is the place to be!
My daughter Samantha EVENTUALLY realised that UK was doomed after trying v hard for 30 years. She now lives in Perth WA happily with GREAT people that VALUE her and have given 4 promotions in 18 months.

Australia is simply ALIVE - with "can do" people


At Samantha's ultimate UK interview she was summoned on high by the "boss of bosses" and told these very words:-

Congratulations, we are promoting you to "Pincipal Surveyor".
No salary increase but a GREAT jump in well-deserved status"

To the proffered handshake she replied
"Well, Sir, You did that LAST YEAR - don't you remember?"

My son too is going to Australia, taking my Grandson.


Posted on Dec 31, 2010, 2:01 AM

Respond to this message   

Return to Index


trying to use qb64

by john (no login)

My friend Delmer in USA (a QB vereran) is using Windows Vista and HAS downloaded your qb64 but CANNOT unzip it
This is what he says:-

Finally been able to find and download the QB64 zip file; the computer said that it would take over six hours, so I did it overnight. But now I can't UNzip it! My computer just says that it can't do it, and my PKUNZIP program will unzip only the "audio.txt" part of the program, which is just some instructions for audio. How do you unzip it? I can't find any unzip routine in Windows Vista.

Please help. Mine unzipped OK - but I am on XP
Many thanks
John

Posted on Dec 28, 2010, 1:43 AM

Respond to this message   

Return to Index


Tell your friend to try downloading 7-Zip

by (Login The-Universe)
Admin


But if he can't open the archive with 7-Zip, then something went wrong with the QB64 download, and the file is corrupt.

What I wish Galleon would do is take my advice and make a stripped down version, without that darn example folder, which is freakin' huge and would take anyone on dial up forever to download, as I suspect happened in this case.

Maybe someone could zip the essential files and put them on a file share service like Send File?

Well, don't give up hope, the project is really worth having and if Galleon, the creator, doesn't respond here shortly, you can also post or link to this post at QB64.net.

Welcome to the forum,

Pete

Posted on Dec 28, 2010, 2:02 AM

Respond to this message   

Return to Index


* Maybe he should just post the Example download separately from the QB64 one.

by (Login burger2227)
R

Posted on Dec 28, 2010, 9:26 AM

Respond to this message   

Return to Index


* Exactly

by (Login The-Universe)
Admin

Posted on Dec 28, 2010, 9:49 AM

Respond to this message   

Return to Index


*Clippy Clause? You must work in some cat grooming place :o)

by (Login qb432l)
R

*

Posted on Dec 28, 2010, 12:45 PM

Respond to this message   

Return to Index


BILL GATES STOPS HIM

by John (no login)

My friend tried your advice with 7-Zip and says:

Can't even download the 7-Zip program. Tried, but no luck. Apparently "Uncle Bill" does not think that I should download any real programs, that have a BAS or EXE extension.

My friend Delmer and I get round this by changing the .exe to idiot .eyz and often this DOES get past the Windows7 secret police.

HOW can I send him a copy of 7-zip that the thought police allow him to receive?

And someone asked WHY we hate Bill!!!!!!!

john

Posted on Dec 31, 2010, 1:42 AM

Respond to this message   

Return to Index


Re: Use QB64?

by john (no login)

I Like your prog.

So any "music prog" like 'orrid Windows MediaPlayer can put out one of your 3 waveforms on the headphones socket or "burn" it to whatever.

That is a GREAT start.
Now how about a dynamically-changing waveform generated by a .bas prog on the fly?
How about reading it WHILE new waveform is being fed in?
No temp storage please.

Would that be difficult with your prog?

John

Posted on Dec 19, 2010, 12:21 AM

Respond to this message   

Return to Index


You can use the mouse to modify the tones

by (Login Mikrondel)
R

The sound changes in almost real time. Which I think is what you wanted.

Posted on Dec 19, 2010, 1:02 AM

Respond to this message   

Return to Index


Re: You can use the mouse to modify the tones

by john (no login)

It sounds extremely promising!

So rather, than the mouse, can I feed it a digital number-stream (from Qbas) to control the wave-shape?

What problems would I face?
john

Posted on Dec 19, 2010, 4:18 AM

Respond to this message   

Return to Index


It shows the principle...

by (Login Mikrondel)
R

Nothing particularly mysterious going on. The program just updates a WAV file and then gets QB64 to play it. It would be easy to get rid of the mouse interface and generate the waves some other way.

Unfortunately there is a slight delay when you change the WAV file, so playing continuously changing sounds is a bit problematic. You could of course create a longer WAV file, this would reduce that problem, but then you can't change the sound in "real time".

I'm tempted to implement a change to QB64 that fixes this.

Posted on Dec 20, 2010, 4:21 AM

Respond to this message   

Return to Index


continuous variable .wav sound

by john (no login)

Artelius,

Yes, please do modify QB64 to eliminate the delay-per-change.
That would be GREAT! The basis for a truly exciting music prog.

But I am still not sure if we are talking at cross-purposes, for your prog, under mouse control, changes the ENTIRE sound (from one waveform to another): a kind of static change - once per mouse click.

In CONTRAST the numbers generated by my QBASIC are continuously added "at the front end" and get to be played dynamically as part of the changing sound after a small delay (say 1/4 second)

I don't know HOW the various progs that let you copy a sound CD do this - but you can play the music WHILE the copy is being made.

Many thanks for your help and ideas on this
John

Posted on Dec 29, 2010, 11:21 PM

Respond to this message   

Return to Index


Re: continuous variable .wav sound

by john (no login)

How do I get the above message to be blue - showing I'd like an answer?

Posted on Dec 31, 2010, 2:05 AM

Respond to this message   

Return to Index


*Messages you've read are purple, those you haven't are blue. That's all.

by (Login Mikrondel)
R

Posted on Dec 31, 2010, 10:26 PM

Respond to this message   

Return to Index


Some advise needed with making a search tool..

by (no login)

Hello for a project of mine i need to replace some value's in a file with other value's.

There for i need to program a replace tool which reads a given variable recalculate its value and replaces it trough out the hole file.

I made a start but i cant figure out how to do it right, maby there is some sample code for doing this...

All help is welcome,

PeterEdlin.

Posted on Dec 15, 2010, 11:01 AM

Respond to this message   

Return to Index


* Read the data, fix, then put it in a TEMP file. After closing it NAME AS old name.

by (Login burger2227)
R

Posted on Dec 15, 2010, 12:21 PM

Respond to this message   

Return to Index


Hey guys, Im back with more questions =P

by Zack (no login)

My program is going well, however I do have a few questions.

1-How do you get a song to loop? I can get it to play using _SNDPLAYFILE but on the wiki page it saya to use h& _SNDLOOP. I know h& means it wants me to set a handle, but in what syntax, it doesnt explain that very well.

2-How do you make a header and footer kind aof thing? I would like to have a bar at the bottom that always displays the version number and my name, and one at the top like a menu bar. On the menu bar, I would like it to have a few tabs that open up and depending on which you click, it will run scrilt to do different things.

Any help will be greatly appreciated.

Posted on Dec 13, 2010, 7:23 PM

Respond to this message   

Return to Index


Sound handles are created by _SNDOPEN

by Clippy (Login burger2227)
R

Posted on Dec 13, 2010, 10:31 PM

Respond to this message   

Return to Index


Ok, but

by Zack (no login)

I have looked through all of those. That wasnt really the question I was asking. I cannot figure out how to actually make it work. I tried:

---
sound_handle1 = _SNDOPEN(song.mp3)
_SNDLOOP (handle1)
---

But that didnt work. I just need an example of the syntax where it would work.

And also, for future reference, when it says h&, what does it mean. If I was to guess Id say the h means handle and the & is asking for a number, but it is confusing on the wiki page.

Posted on Dec 14, 2010, 12:14 PM

Respond to this message   

Return to Index


The & is a type identifier...

by (Login qb432l)
R

In other words, the handle is a long integer, so:

Theme& = _SNDOPEN("song.mp3", "VOL") 'capabilities list follows song name (optional)
_SNDLOOP Theme&

...and then if you want it to stop looping while the program is still running:

_SNDSTOP Theme&

BTW, if you're going to use the handle& in a sub program, be sure to DIM it as SHARED at the top of your program.

-Bob

Posted on Dec 14, 2010, 12:23 PM

Respond to this message   

Return to Index


Thanks

by Zack (no login)

Yay, it works now thank you :DDD

Posted on Dec 16, 2010, 7:02 PM

Respond to this message   

Return to Index


* Could the h& be a formatting code for hexadecimal?

by Solitaire (Login Solitaire1)
S

Posted on Dec 14, 2010, 5:49 PM

Respond to this message   

Return to Index


*No -- the "h" just stands for "handle" -- an example long-integer variable name

by (Login qb432l)
R

*

Posted on Dec 14, 2010, 6:06 PM

Respond to this message   

Return to Index


VIEW PRINT to freeze part of the screen.

by Solitaire (Login Solitaire1)
S

To freeze the screen and allow scrolling only in the rows between x and y:

VIEW PRINT x TO y

To unfreeze, use VIEW PRINT alone. Here is an example program:

==========================================================================
CLS  'Set scroll area with VIEW PRINT; freeze top and bottom lines
PRINT "The top line will stay frozen. To unfreeze, press the Tab key."
LOCATE 24: PRINT "The bottom line will stay frozen";
VIEW PRINT 3 TO 23

PRINT "The center of the screen will scroll text entries."
PRINT "The top and bottom lines will be frozen and won't scroll."
PRINT "Keep pressing any key to speed up the scrolling."
count = 0
DO
    count = count + 1
    PRINT "This is repeat # "; count
    K$ = INKEY$
    SLEEP 1
LOOP UNTIL K$ = CHR$(9)
VIEW PRINT  'This will unfreeze the screen
DO
    PRINT "Press Esc when you are ready to end program."
    K$ = INKEY$
    SLEEP 1
LOOP UNTIL K$ = CHR$(27)
END

Posted on Dec 13, 2010, 10:48 PM

Respond to this message   

Return to Index


* I take it you use SLEEP 1 to reduce CPU usage.

by (Login The-Universe)
Admin

Posted on Dec 13, 2010, 11:37 PM

Respond to this message   

Return to Index


No, it's just to slow things down so you can see each line.

by Solitaire (Login Solitaire1)
S

After all, it's only a demo intended to show how the top and bottom of the screen stay put while the content in the center changes. The actual content in the center is what the OP intends to display.

Posted on Dec 14, 2010, 12:28 AM

Respond to this message   

Return to Index


Apparently in QB 4.5, SLEEP doesn't decrease CPU usage.

by (Login The-Universe)
Admin


I didn't see the PRINT statement in the loop before. I have my resolution set to super squint vision these days. It allows me to open a lot of windows, but it is very hard on my eyes.

Just for fun, I ran it this morning to fiddle with the possibility that SLEEP might affect CPU usage. Although in QB46 delays like _DELAY, and SLEEP decrease CPU usage, in QB4.5 it doesn't seem to matter. At least it didn't in this example, running uncompiled. Maybe a compiled version with and without SLEEP would yield different results.

I use VIEW PRINT a lot to scroll screens and popups. It is a wonderful BASIC statementfor SCREEN Zero Heros.

Thanks for posting it,

Pete

Posted on Dec 14, 2010, 7:46 AM

Respond to this message   

Return to Index


NOT IN THE VISBASICS

by OPRESION (no login)

QUICKBASIC 7.1 AND QBASIC 1.1 (IN SPANISH) ALSO HAVE THAT PROBLEM
MAKING TO RUN THE PROCESSOR TO 100% WHEN YOU USE JUST 'SLEEP'.

THAT DOESN'T HAPPEN WITH BOTH VISBASICS FOR MS-DOS, IT'S FIXED.
BOTH VISBASICS CAN RUN AND COMPILE ALMOST ANY CODE FOR THE
QB4.5 AND THE 7.1; EXCEPT IF YOUR CODE IT'S MADE FOR THE
OS/2 IN THE QB7.1, THAT OPTION IT'S DISSAPPERED IN THE VISBASICS.

Posted on Dec 14, 2010, 7:07 PM

Respond to this message   

Return to Index


* WHY DON"T YOU EVER USE LOWER CASE EL STUPIDO!

by CLIPPY (Login burger2227)
R

Posted on Dec 14, 2010, 7:42 PM

Respond to this message   

Return to Index


MY PLEASURE (URL)*

by OPRESION (no login)

http://basic.phatcode.net/

Posted on Dec 14, 2010, 8:16 PM

Respond to this message   

Return to Index


* You are NOT fooling me! You copied and pasted that Link! :-P

by Clippy (Login burger2227)
R

Posted on Dec 14, 2010, 10:26 PM

Respond to this message   

Return to Index


Interesting about UC...

by (Login qb432l)
R

When I first started programming in QBasic, all my programs were in UC. Not sure why -- maybe I thought it was more "programmy" since QB commands were all UC, not sure. Anyway, I stopped after a few programs and haven't done it since. I'm sort of glad I did them in UC, though, because now when I look at them, they're distinct from my later stuff, so the memories are heightened.

-Bob

Posted on Dec 14, 2010, 11:15 PM

Respond to this message   

Return to Index


Please don't refer to other people who try to help as stupid, because relatively speaking

by (Login The-Universe)
Admin


... think where that puts you.

Clippy
Don't want to take my word for it? Well then let's check this theory out with QB, just to be sure...


IF "Clippy"

See? You can't argue with science!

Pete happy.gif

Posted on Dec 14, 2010, 10:46 PM

Respond to this message   

Return to Index


Attention all Personnel... Network54 account

by (Login The-Universe)
Admin


I renewed the forum account today, but changed the account number (not the plan, same plan, different billing number). N54 does not autorespond to the correctness of the information entered, or to the approval of processing; so I have to wait to see if it was changed and processed, correctly. I'm just posting this in case there is a glitch and ads show up this month. If so, the glitch will be fixed and the ads, removed.

That is all, except for...

Merry Christmas, Happy Holidays, etc.

Pete

Posted on Dec 12, 2010, 9:41 AM

Respond to this message   

Return to Index


*Same to you, Radar -- and Happy Holidays to your puppet master Pete, too.

by (Login qb432l)
R

*

Posted on Dec 12, 2010, 1:41 PM

Respond to this message   

Return to Index


One day I hope to be a real boy...

by (Login The-Universe)
Admin

Just like Obama hopes to be a real President. I figure if he can be President, any dummy can do anything it wants!

Ouch, hey watch where you're pulling that middle string!

Radar

Posted on Dec 12, 2010, 6:35 PM

Respond to this message   

Return to Index


How can I run VBScript files with a BAS file?

by Clippy (Login burger2227)
R

I tried running them by SHELLing to BAT files, but it seems that a BAS file cannot get the BAT files to execute the VBS code. At least not on my machine.

Or is this something ELSE that is wrong with my XP machine?

So I compiled the batch file into an EXE file to get the code to execute. That EXE file is 80K while that BAT file is less than 200 bytes. What's a poor person to do?

Any ideas are welcome. I am using VBS files to create program shortcuts. The VBS code finds the program paths to create LNK files on the Desktop and in the program folder. The code can be added to any program.

I also tried URL links, but they need BAT files to run BAS files because you cannot call QB.EXE with any parameters using them. LNK files allow parameters.

If anybody is interested in seeing how I got them working they can download my QB Demo here:

http://dl.dropbox.com/u/8440706/Q-Basics.zip


Thanks,

Ted

Posted on Dec 12, 2010, 5:01 AM

Respond to this message   

Return to Index


Try this

by lawgin (no login)

If your vbs file is c:\xyz.vbs, put this line into your batch file:

cscript c:\xyz.vbs



Posted on Dec 12, 2010, 10:24 AM

Respond to this message   

Return to Index


DAM, I just tried it again and it worked!

by Clippy (Login burger2227)
R

Yesterday, it wouldn't work at all! I didn't even tell it the path either!

Well that's 80K and an EXE file off of my mind anyhow.

My PC couldn't make URLs with icons a few days ago, but my old 98 had no problem.

STRANGE, but thanks anyhow.

Ted

Posted on Dec 12, 2010, 1:59 PM

Respond to this message   

Return to Index


*Uh-huh!

by lawgin (no login)

Posted on Dec 12, 2010, 2:20 PM

Respond to this message   

Return to Index


Setting System Environment Variables

by David P. (no login)

Hello. I am making a REALLY simple program for an old PCDOS system that takes input from the user and puts it into a system variable so a batch script can access what was typed. (PCDOS doesn't seem to have anything like this.) I have the following code so far:


PRINT "Whatever argument 1 is" 'Put text on screen from command line argument 1 (if any)
INPUT A$ 'Take input (duh!)
ENVIRON$("Whatever argument 2 is"=A$) 'Put input into system variable


The only things I am having problems with is setting system variables and taking command line arguments.

When I try to use the ENVIRON$ function, QB just says "Out of memory" before the program even runs. Why is this?

How do I retrieve the command line arguments so I can stuff them into variables?

Thanks!

Posted on Dec 10, 2010, 4:51 PM

Respond to this message   

Return to Index


SHELL to DOS commands

by Solitaire (Login Solitaire1)
S

You need to use the SHELL keyword in order to access DOS commands, which are placed inside quotes. Example:

SHELL "DIR"

You can also use SHELL to run a batch file. It will return to QB when it finishes running.

Posted on Dec 10, 2010, 6:26 PM

Respond to this message   

Return to Index


Why you wanna do that?

by (Login burger2227)
R

Please splain why you wanna do that. There is absolutely no need to add anything to the environment anyhow. EVEN IF it worked, the value will not stay there. It is removed by QB when your program closes.

So your program would have to assign the value EVERY TIME it is run! You could just as easily assign the value to a variable and be done with it.

Besides, Windows does not NEED anything that you add!

Ted

Posted on Dec 10, 2010, 9:36 PM

Respond to this message   

Return to Index


*Command-line arguments should be available as COMMAND$

by (Login Mikrondel)
R

Posted on Dec 10, 2010, 10:50 PM

Respond to this message   

Return to Index


Because...

by David P (no login)

Clippy: You asked why. This program is for a PSDOS system. In batch scripts, I often need to take input on-the-fly from the user. This program would do this. From the batch script, you would call it like:

ASK [variable]

Where the variable is the environment variable into which you want to put the stuff that was types into ASK.EXE by the user.

Artelius: Thanks. That solved that one of the problems!

Solitaire: Thanks also. That solved the other problem. I don't know why I didn't think of that too! Duh! So I guess if QBASIC's ENVIRON function doesn't work, I could use:

SHELL "SET "; COMMAND$; "=";A$

Is this correct?

Thanks for all of the replies!

Posted on Dec 12, 2010, 6:59 PM

Respond to this message   

Return to Index


hello, david p

by (Login MCalkins)
Moderator

first if all, my programing experience is with ms-dos, not pc-dos. however, pc-dos should be pretty similar.

i do not know why qbasic's environ statement causes a memory error. i have run into that before. it must be a qbasic bug.

you can access the environment block directly. the address to it is in the program segment prefix. a qbasic program can find the address of qbasic.exe's PSP with a call to int 0x21, function 0x62.

the problem with the whole concept is that each program gets its own environment block. when you run qbasic.exe, it receives a copy of command.com's environment block. so any changes qbasic makes to the environment block are to its own copy.

shell "set" is even worse. that just creates a new instance of command.com which inherits yet another copy of the environment block from qbasic.exe, changes it, and immediately terminates.

does pc-dos not have choice? choice was an executable that batch files could call which would present the user with options, and then return a return code which a batch file could access with errorlevel.

regards,
michael

p.s.

http://fornax.elf.stuba.sk/SUPERMAN/SYSTEMS/DOS/advdos.txt

has information.

Posted on Jan 19, 2011, 11:11 PM

Respond to this message   

Return to Index


A RND alternative?

by lawgin (no login)

The 7 lines of code below uses the so-called logistics equation: y=kx(1-x) to produce an output that mimics the RND function. With k=4 and an initial value of x=.2, iterating the equation produces a seemingly random output of numbers between 0 and 1. Seeding with a different value, say x=.22, produces a completely different sequence. Interesting.


x = .2
PRINT "Press a key to display a random number"
DO
y = 4 * x * (1 - x)
IF INKEY$ <> "" THEN PRINT y
x = y
LOOP

Posted on Dec 7, 2010, 10:43 AM

Respond to this message   

Return to Index


* SO WHAT? The ONLY thing RANDOM is the time between key presses!

by Clippy (Login burger2227)
R

Posted on Dec 7, 2010, 1:19 PM

Respond to this message   

Return to Index


You're wrong -- try it without keypresses...

by lawgin (no login)

x = .2
DO
y = 4 * x * (1 - x)
PRINT y
x = y
LOOP

Posted on Dec 7, 2010, 3:05 PM

Respond to this message   

Return to Index


Not quite random...

by (Login qb432l)
R

I PSET the points defined by the output and it drew a portrait of George Washington crossing the Delaware!
(j/k)
Actually, it's very interesting.

-Bob

Posted on Dec 7, 2010, 6:26 PM

Respond to this message   

Return to Index


Funny...

by (Login The-Universe)
Admin


I got a picture of George Washington's cross dressing undereware!

Pete happy.gif

Posted on Dec 7, 2010, 7:14 PM

Respond to this message   

Return to Index


*Apparently his teeth weren't really wood, so you may be right about his undies :-|

by (Login qb432l)
R

*

Posted on Dec 8, 2010, 7:54 AM

Respond to this message   

Return to Index


Quite a revelation

by lawgin (no login)

I'm amazed that Leutze was running BASIC way back then. Probably on an Apple I.

Posted on Dec 8, 2010, 9:03 AM

Respond to this message   

Return to Index


*it repeats every 431 iterations

by David (no login)

.

Posted on Dec 8, 2010, 4:07 AM

Respond to this message   

Return to Index


linear feedback shift register

by david (no login)

Qbasic is not very good with bit-wise operations so the implementation is a bit messy. It produces a pseudo-random byte (0-255).

seed1 = 123
seed2 = 146
10 tap1 = (seed2 AND 128) \ 128
tap2 = (seed2 AND 32) \ 32
tap3 = (seed2 AND 16) \ 16
tap4 = (seed2 AND 4) \ 4
i1 = tap1 XOR tap2
i2 = i1 XOR tap3
i3 = i2 XOR tap4
j1 = (seed1 AND 128) \ 128
seed1 = (seed1 AND 127) * 2
seed1 = seed1 + i3
seed2 = (seed2 AND 127) * 2
seed2 = seed2 + j1
m = m + 1
IF m MOD 9 <> 0 THEN 10
PRINT seed1;
x$ = INKEY$
IF x$ = CHR$(27) THEN END
GOTO 10

Posted on Dec 8, 2010, 7:13 AM

Respond to this message   

Return to Index


*period is 21845

by lawgin (no login)

Posted on Dec 8, 2010, 12:16 PM

Respond to this message   

Return to Index


Re: *it repeats every 431 iterations

by lawgin (no login)

The repeat was inevitable, but I was hoping it would last longer than 431. A complete bifurcation diagram of this equation can be found here:

http://www.stsci.edu/~lbradley/seminar/logdiffeqn.html

Posted on Dec 8, 2010, 9:06 AM

Respond to this message   

Return to Index


One of my programs

by Ben (no login)

check out my file viewer. You can browse your C drive, and open text/bas files and scroll through them and drag them around and execute exe files. Pretty nice if you ask me. Source included

http://qbasic.orgfree.com/fview.zip


http://qbasic.orgfree.com/qb_003.png

Posted on Dec 7, 2010, 8:40 AM

Respond to this message   

Return to Index


Re: One of my programs

by lawgin (no login)

I get an error in line 20: setdta dta. Subs appear to be missing.

Posted on Dec 7, 2010, 10:34 AM

Respond to this message   

Return to Index


Run the executable

by Ben (no login)

It's safe.

Compiling the program requires building the asm lib then linking it with QB 4.5 only. This is automated with the make.bat batch file and requires to be build inside the QB 4.5 folder with PATH set to the directory cointaining the nasm assembler.

If you're still paranoid, you can mount C drive to an empty directory in dosbox, then run the exe from there, to insure it will not delete any files or damamge computer.

Posted on Dec 7, 2010, 10:44 AM

Respond to this message   

Return to Index


* LOL, sure we TRUST YOU...

by Clippy (Login burger2227)
R

Posted on Dec 7, 2010, 1:33 PM

Respond to this message   

Return to Index


why not

by Ben (no login)

Posted on Dec 10, 2010, 8:42 AM

Respond to this message   

Return to Index


*Because a good reputation is hard to get and easy to lose...

by (Login Mikrondel)
R

Posted on Dec 10, 2010, 12:22 PM

Respond to this message   

Return to Index


* Well I got that beat! I NEVER had a good reputation anyhow...:-P

by Clippy (Login burger2227)
R

Posted on Dec 10, 2010, 3:46 PM

Respond to this message   

Return to Index


ATTENTION ALL PROGRAMMERS (NO EXCEPTIONS)

by OPRESION (no login)

P_L_E_A_S_E
EVERY TIME YOU USE ANY SCREEN BUT THE SCREEN 0 BEFORE YOU FINISH
YOUR PROGRAM IT'S A NEED TO RETURN THE WINDOW TO THE DEFAULT
SCREEN (THE SCREEN 0) OR SOME COMPUTERS FREEZE THE WINDOW
(THE KEYBOARD STOPS RESPONDING). JUST USE THIS LINES:

SCREEN 0
SYSTEM

THANK YOU VERY MUCH.,

Posted on Dec 7, 2010, 8:24 PM

Respond to this message   

Return to Index


* My evil plan has succeeded!

by (Login The-Universe)
Admin

Posted on Dec 8, 2010, 10:54 AM

Respond to this message   

Return to Index


Not so fast, Zero! I emailed you a virus that adds SCREEN 12 to all your programs...

by (Login qb432l)
R

NOTE: After opening your emails from me, copy the associated text file into Notepad and save with a .BAS extension. Then compile in QB64 -- the virus won't run in QB anymore.

Cackle, cackle...
-Bob

Posted on Dec 8, 2010, 3:27 PM

Respond to this message   

Return to Index


* Drat, foiled again!

by (Login The-Universe)
Admin

Posted on Dec 8, 2010, 6:50 PM

Respond to this message   

Return to Index


Impressive but unpolished

by (Login Mikrondel)
R

Like a lot of my own programs.

Mouse values at the top of the screen; mouse droppings in a few places (the solution is to always hide the cursor before doing any drawing); when you go up one level the path display isn't cleaned up; flicker; you can drag things over the edge of the screen.

Nonetheless, great job.

The use of FS and GS means it needs a 386. Couldn't you use DS and ES for that inner loop? Well, not like anyone uses an 8086 anymore.

Actually I heard yesterday that Bluetooth controllers use an 8088.


So, what are you going to do next? A kernel perhaps? It's a good excuse to learn C. But there are plenty of other things you could do...

Posted on Dec 10, 2010, 1:02 PM

Respond to this message   

Return to Index


This program is nice

by Anonymus of Hungary (no login)

It is very impressive. Only one problem is that it lacks a helpful paperclip guide.

Posted on Dec 10, 2010, 3:50 PM

Respond to this message   

Return to Index


download qbasic

by (no login)

I had qbasic on my last laptop. The laptop died and took qbasic with it. I now have a VISTA laptop. How can I download qbasic(or other version of basic) free of charge?

Posted on Dec 6, 2010, 12:55 PM

Respond to this message   

Return to Index


QB64

by unseen machine (no login)

Its the only one that will do anything other than text for you in vista.

QB64.net

We all use it. Almost 100% qb4.5 compatible! and LOADS OF NEW TOOLS!!!

Posted on Dec 6, 2010, 1:50 PM

Respond to this message   

Return to Index


Except me

by (no login)

I don't use it yet. I'm one of the new tools. I'll download it as soon as it comes out on Mac.

(I read on Wiki that it came out for Mac already, but was short-lived and isn't available for Mac any more.)

Posted on Dec 6, 2010, 6:00 PM

Respond to this message   

Return to Index


* What WIKI? QB64 has NEVER supported MAC YET, but it will...

by Clippy (Login burger2227)
R

Posted on Dec 6, 2010, 7:23 PM

Respond to this message   

Return to Index


*Are you a Tiger or a Snow Leopard?

by Galleon (no login)

Posted on Dec 7, 2010, 10:48 AM

Respond to this message   

Return to Index


Snow Leopard

by (no login)

=^_^=

Posted on Dec 7, 2010, 9:38 PM

Respond to this message   

Return to Index


Jack Ass

by (Login The-Universe)
Admin



  /--\
  |..|
  || |
  || |
  ||-|
  \--/

Posted on Dec 8, 2010, 12:06 AM

Respond to this message   

Return to Index


* HEY! You is infringing on my copyrights of that thar image! ♂

by Clippy (Login burger2227)
R

Posted on Dec 8, 2010, 12:39 PM

Respond to this message   

Return to Index


I'd write a SCREEN 12 program in which your Jackass gets blown up...

by (Login qb432l)
R

Except that it already blows.

(j/k)

Actually, that's amazing. It looks just like a jack-ASCII.

-Bob

Posted on Dec 10, 2010, 6:49 PM

Respond to this message   

Return to Index


Eh... I need help

by Zack (no login)

Hi, I was taking a break from my main program and decided to make a simple program that I though would be fun to watch run. Little did I know it would now be that easy e-e. I was trying to make a program that counts indefinitely. I tried:

DO
ON ERROR GOTO BEGINA
OPEN "thecount.txt" FOR INPUT AS #1
INPUT #1, A
CLOSE #1
BEGINA:
PRINT ": ", A + 1
OPEN "thecount.txt" FOR OUTPUT AS #1
WRITE #1, A
CLOSE #1
LOOP WHILE INKEYS$ = ""
'But this just gave me a bunch of 1s'

-

A = 0
DO
PRINT ": ", A + 1
LOOP
'This also gave me a bunch of 1s'

-

DO
ON ERROR GOTO BEGINA
OPEN "thecount.txt" FOR INPUT AS #1
INPUT #1, B
CLOSE #1
B = A + 1
BEGINA:
PRINT ": ", A + 1
A + 1 = B
OPEN "thecount.txt" FOR OUTPUT AS #1
WRITE #1, B
CLOSE #1
LOOP WHILE INKEYS$ = ""
'This wouldn't let me set that variable; A + 1 = B'

-

DO
ON ERROR GOTO BEGINA
OPEN "thecount.txt" FOR INPUT AS #1
INPUT #1, A
CLOSE #1
BEGINA:
WAIT 1
PRINT ": ", A + 1
OPEN "thecount.txt" FOR OUTPUT AS #1
WRITE #1, A
CLOSE #1
WAIT 1
LOOP WHILE INKEYS$ = ""
'This is the closest I got so far. It gives me an error that says'
'Line:9 File alreadyopen'
'Line:10 Bad file mode'
'Line:4 Input past end of file'

-

Does anyone know how to make something like this work? If so please respond. In the meanwhile, I will continue to try new variations. Thank you so much.
-Zack

Posted on Dec 2, 2010, 6:36 PM

Respond to this message   

Return to Index


You need to use a counter variable

by Solitaire (Login Solitaire1)
S

A counter variable goes inside a DO loop. You initialize the counter before starting the loop (usually by assigning the value of 0 to it), and increment it inside the loop (by adding a constant value such as 1 to itself). You end the loop by setting it to repeat UNTIL a certain condition becomes true (or WHILE the condition is false).

For example, to print the numbers from 1 to 10:

DIM x as INTEGER
x = 0
DO
  x = x + 1
  PRINT x
LOOP UNTIL x = 10

--------------------------------
Regarding your error, the errortrap code must appear AFTER the program ends. Here is an example:

DIM flag AS INTEGER
flag = 0
ON ERROR GOTO nogood
OPEN "mynofile" FOR INPUT AS #1
IF flag = 0 THEN
  CLOSE #1
ELSE
  PRINT "Error opening file"
  flag = 0  'put the flag back down so it's ready for next time
END IF
END

nogood:
flag = 1
RESUME NEXT

Posted on Dec 2, 2010, 7:09 PM

Respond to this message   

Return to Index


Thank you

by Zack (no login)

Thanks, this helps a lot.

Posted on Dec 2, 2010, 7:17 PM

Respond to this message   

Return to Index


Hey

by Zack (no login)

I got my counter to work thanks, but I am confused at the error solving code you showed me. I have another program that opens a file and inputs like 10 variables, but later in the program I have the CASE where you set it and writes 10 variables. I am getting the same errors as before. I was planning on using EOF to fix it but i do not know how. Could you show me how to use EOF and/or explain to me how your error solver works. Thanks.
-Zack

Posted on Dec 3, 2010, 3:00 AM

Respond to this message   

Return to Index


* Post your code.

by Solitaire (Login Solitaire1)
S

Posted on Dec 3, 2010, 1:01 PM

Respond to this message   

Return to Index


EOF in a loop

by Clippy (Login burger2227)
R

DO WHILE NOT(EOF(number))

DO UNTIL EOF(n)

Posted on Dec 3, 2010, 1:08 PM

Respond to this message   

Return to Index


EOF sample:

by Solitaire (Login Solitaire1)
S

CLS
filenom$ = "C:\myfile.txt"
OPEN filenom$ FOR OUTPUT AS #1
FOR x = 1 TO 5
  INPUT "Enter a word: ", word$
  WRITE #1, word$
NEXT x
CLOSE #1
PRINT
OPEN filenom$ FOR INPUT AS #1
DO WHILE NOT EOF(1)
  INPUT #1, word$
  PRINT word$
LOOP
CLOSE #1
PRINT
OPEN filenom$ FOR APPEND AS #1
WRITE #1, "six"
CLOSE #1
OPEN filenom$ FOR INPUT AS #1
DO WHILE NOT EOF(1)
  INPUT #1, word$
  PRINT word$
LOOP
CLOSE #1
END

==================================================================
RE: The ONERROR code:

The label ends with either RESUME or RESUME NEXT (among other options I won't go into).
If it's RESUME it will attempt to run the same instruction that caused the error.
If it's RESUME NEXT it will go to the next instruction line instead.

My program code includes a flag variable that is initialized to 0. As part of the errortrap code, I changed the flag to 1. When the code resumes to the next line, it indicates that there was an error IF the flag was changed to 1. Then you can make your corrections inside of the same IF-THEN block. You must also reset the flag to 0 so that it can be used again for another possible error in your program, or if you loop back to repeat the same section of code. If the flag was not changed (is still 0) then there was no error and the code can proceed normally.

Using the flag this way makes your code much more efficient and you only need one short errortrap to work with all your possible errors.

Remember, the errortrap must be placed after the end of the main program.

Posted on Dec 3, 2010, 2:34 PM

Respond to this message   

Return to Index


Ok

by Zack (no login)

Ok, thanks! I got it work :)

Posted on Dec 3, 2010, 7:44 PM

Respond to this message   

Return to Index


counting

by (no login)

10 a=0
20 cls: a=1
30 print a
40 a=a+1
50 go to 30

Posted on Dec 6, 2010, 1:12 PM

Respond to this message   

Return to Index


OK

by UnseenMachine (no login)

But i suggest you forget line numbers and goto, both old and outdated.

Also integer multiplication is faster.

do
i% = i% + 1
locate 1,1: print i%
loop until inkey$ = chr$(27) ' ESC

should work just the same, press esc when you want to quit, though the chances are it will crash when it hits a number bigger than the integer max (i think this is 32000 and something) to get bigger numbers use bigger variables

do
i& = i& + 1
locate 1,1: print i&
loop until inkey$ = chr$(27) ' ESC

Posted on Dec 6, 2010, 1:46 PM

Respond to this message   

Return to Index


Interesting thing about integers in QB64...

by (Login qb432l)
R

They don't overflow, they just wrap into the negative, then positive again, etc. I'd almost prefer that they overflowed, because your program will start generating weird results without explanation. Often, the reason is integer wrap.

-Bob

Posted on Dec 6, 2010, 4:10 PM

Respond to this message   

Return to Index


Me too Bob, it just don't feel right AND...

by Clippy (Login burger2227)
R

If you try to use those Integer values, SOME functions like INT won't work! So I think it should check them.

Did you notice how the QB64 INPUT statement won't ALLOW you to exceed the entry variable limits? You can't even enter a letter(except D and E) instead of a number if it is a numeric variable.

Galleon didn't like that "Redo from start" garbage.

Ted

Posted on Dec 6, 2010, 4:31 PM

Respond to this message   

Return to Index


I think it's a good feature

by Ben (no login)

lots of times I have a main loop with an iterator that way it will run forever no problem.

Posted on Dec 6, 2010, 4:39 PM

Respond to this message   

Return to Index


I've mentioned this to Galleon

by (Login Mikrondel)
R

I think silent wraparound is scary for beginners who don't yet understand that a computer can't represent arbitrarily large numbers. An error message would help them learn this fact. A program going crazy might just frustrate them.

Even if you know that this is how integers behave, it's easy to do it by mistake and wonder what the heck is going on...

I think the default should be error-on-overflow but with a means of getting the wraparound behaviour if you really want it.

Posted on Dec 6, 2010, 5:03 PM

Respond to this message   

Return to Index


Hey TheBOB

by Zack (no login)

Hi, I am still having trouble finding out how to do string arrays. I found a page on arrays on this site, but it only talks about numbers. Anyways, could you give me a short run down on how to make a string array and how to get it to scroll rather than cut off. And about before, I am not sure how hard a horizontal scroll bar is but I had already made up a graphical data chart in Notepad and was planning on the user just being able to pan the entire chart with the arrow keys. Would this be easier or harder than making a scroll bar? Also, if you do not think I am ready to do both directions of scrolling, can you just show me how to make it scoll up and down, because I have another section where it is just two rows of number being displayed in a list. I figured I could use a Two dimensional array table, as mentioned by this site on the array page. Thank you so much for all your help and encouragement. I appreciate it very much.

Posted on Dec 1, 2010, 2:01 PM

Respond to this message   

Return to Index


Maybe this will help

by Unseen Machine (no login)

I'm not theBob, but i might be able to help a bit.

String arrays are just the same as integer arrays, they just hold letters instead of numbers. Try this code...

'this will make a string array that can hold 10 strings (usernames here)
DIM PlayerNames(10) AS STRING

'This lets a user add names
FOR i% = 0 to 9
INPUT "Enter a name : ", PlayerNames(i%)
NEXT

'This prints the names
FOR i% = 0 to 9
Print PlayerNames(i%)
NEXT

Wanna know more, feel free to ask.

Posted on Dec 1, 2010, 2:45 PM

Respond to this message   

Return to Index


Thanks

by Zack (no login)

I was actually just trying to get it to print a graph that is larger than the screen and make it scroll up and down and also side to side. TheBOB said that there was a way to do this using string arrays. The graph is not a picture, it is just a bunch of print commands that make a chart kinda thing.

Posted on Dec 1, 2010, 7:20 PM

Respond to this message   

Return to Index


Use MID$

by unseen machine (no login)

You can print part of a string using

Print MID$(TheString, StartingPositionInTheString%, NumberOfLettersToPrint%)

if you increase the starting position 1 each time for each string and use a maximum number of characters so that the string does not overrun on to the next line you should be able to do it. Here's is very quickly how i would do something like what you are after, you would replace the random strings with yours.

DIM StringArray(20) AS STRING

'// Make false strings FOR a% = 0 TO 19
FOR i% = 1 TO 200
StringArray(a%) = StringArray(a%) + CHR$(INT(RND * 80) + 65)
NEXT
NEXT

'// Print the strings increaseint the staring position 1 each loop
FOR i% = 1 TO 150
FOR a% = 0 TO 19
PRINT MID$(StringArray(a%), i%, 50)
NEXT
SLEEP 1
NEXT

Posted on Dec 1, 2010, 8:22 PM

Respond to this message   

Return to Index


Yeah, in that case you want a two-dimensional string array...

by (Login qb432l)
R

Also, if you're going to scroll horizontally, you'll want to make it out of single character strings. The one that Unseen showed you would hold strings of any length. With individual string elements, you can begin printing horizontally from and to any column position, as well as from and to any row.

Let's say that your chart is 200 characters wide and 100 characters deep. Here's the string array you'd have to DIM:

DIM ChartArray(1 TO 100, 1 TO 200) AS STRING * 1

The "AS STRING * 1" means that all 20000 "elements" in the array hold just 1 character. Characters can be anything, including letters, numbers or line characters (which you probably want for your chart).

The elements are assigned characters the same as any other array. For example:

ChartArray(20, 20) = "A"

If you than wanted to print the character at row 20, column 20, you'd use:

PRINT ChartArray(20, 20)

The output would be an A.

To assign an entire string to the array, you'd first have to break it down into individual characters, so lets say your chart is only 27 columns wide and the fifth row of your chart is this:

Five$ = "|   NOVEMBER   DECEMBER   |"

You would use a counting loop to go through the length of the string:

FOR Column% = 1 TO 27
Char$ = MID$(Five$, Column%, 1)
ChartArray(5, Column%) = Char$
NEXT Column%

The MID$ function creates a string from another string based on where it begins in the host string, and how long a string you want to make. In the above example I'm saying make me a string called Char$ from Five$, start it at the character position of Column%'s current value in the loop, and make it 1 character long. I then store Char$ in the array at row 5, and at the position of Column% (1-27).

If I were then to run the following loop:

CLS
For n% = 1 TO 27
PRINT ChartArray(5, n%);
NEXT n%

It should print Five$ as you created it. The reason there's an apostrophe after the PRINT statement in the loop is so that the next PRINT statement immediately follow the previous one -- otherwise you'd have all your characters scroll down the left side of the screen, rather than print in a row.

Before we go on, why not create and play with some small two-dimensional string arrays. Try assigning characters to them and printing them using loops. See if you can use a nested loop to assign all the elements from DATA statements.

When you've played with it a bit, post again with your experiences and questions.

-Bob




Posted on Dec 1, 2010, 8:45 PM

Respond to this message   

Return to Index


*BTW, be sure to check out Unseens "MID$" response -- probably a better method than mine.

by (Login qb432l)
R

*

Posted on Dec 1, 2010, 8:56 PM

Respond to this message   

Return to Index


Sample of a scrolling screen

by Solitaire (Login Solitaire1)
S

The following program will create a string array of rows filled with random characters. It will fill the screen with the arrays. Then a nested DO loop works with the MID$() function to break up the strings. It appears to scroll the rows to the left, wrapping the string to the right.

This works with rows of string up to 80 characters. It's a lot more tricky to get it to work with longer strings. But this will give you something to start with.

=============================================================================

DIM randnum AS INTEGER, x AS INTEGER, y AS INTEGER
DIM ch AS STRING, E AS STRING
DIM charow(25) AS STRING
CLS
RANDOMIZE randnum           'fill screen with random characters
FOR x = 1 TO 25
   FOR y = 1 TO 80
        ch$ = CHR$(INT(RND * 95) + 32)  'select a random character
        charand$ = charand$ + ch$       'create string of random characters
    NEXT y
    charow$(x) = charand$    'fill each array row with string of characters
    charand$ = ""            'reinitialize string for a new row
NEXT x

FOR x = 2 TO 25    'fill screen with array of random characters
    LOCATE x, 1    'leave top line for instructions to user
   PRINT charow$(x);
NEXT x
LOCATE 1, 20
PRINT "Press Enter to start scrolling...";
INPUT "", E$
CLS
LOCATE 1, 20
PRINT "Press any key to stop...";
y = 1
DO                  'Screen will wrap from right edge to left
        y = y + 1               'starts with row 2
        IF y = 80 THEN y = 2    'goes up to right edge of screen
        FOR x = 2 TO 25         'fills rows to bottom of screen
            LOCATE x, 1         'one row at a time
            PRINT MID$(charow$(x), y, 80 - y + 1);  'left side of row
            PRINT MID$(charow$(x), 1, y - 1);       'right side of row
        NEXT x

        t = TIMER               'delay needed to see the scrolling action
        DO WHILE t + .1 )= TIMER                    'delay part of a second
            IF t ) TIMER THEN t = t - 86400
        LOOP
LOOP WHILE INKEY$ = ""
SYSTEM

-----------------------------------------
NOTE: Copy and paste code into Notepad and save as a .bas file instead of .txt. Due to this forum's inability to display the greater-than sign, I had to substitute ) for that symbol in the following two lines. Please make that correction when you paste the code into your program.

DO WHILE t + .1 )= TIMER
IF t ) TIMER THEN t = t - 86400



Posted on Dec 2, 2010, 5:37 PM

Respond to this message   

Return to Index


Variation of scrolling sample

by Solitaire (Login Solitaire1)
S

This sample uses numbered strings instead of random characters. That makes it easier to see what is going on as it scrolls.

===========================================================================
DIM x AS INTEGER, y AS INTEGER, L AS INTEGER
DIM strow AS STRING, E AS STRING, z AS STRING
DIM charow(25) AS STRING
CLS

FOR x = 1 TO 25
    IF x ( 10 THEN z$ = " " ELSE z$ = ""
    strow$ = "This is row #" + z$ + STR$(x) + ". It will scroll right. "
    DO
        strow$ = strow$ + strow$
        L = LEN(strow$)
   LOOP UNTIL L )= 80
    charow$(x) = LEFT$(strow$, 80)
    strow$ = ""
NEXT x

FOR x = 2 TO 25    'fill screen with array of numbered strings
    LOCATE x, 1    'leave top line for instructions to user
   PRINT charow$(x);
NEXT x
LOCATE 1, 20
PRINT "Press Enter to start scrolling...";
INPUT "", E$
CLS
LOCATE 1, 20
PRINT "Press any key to stop...";
y = 1
DO                  'Screen will wrap from right edge to left
        y = y + 1               'starts with row 2
        IF y = 80 THEN y = 2    'goes up to right edge of screen
        FOR x = 2 TO 25         'fills rows to bottom of screen
            LOCATE x, 1         'one row at a time
            PRINT MID$(charow$(x), y, 80 - y + 1);  'left side of row
            PRINT MID$(charow$(x), 1, y - 1);       'right side of row
        NEXT x

        t = TIMER               'delay needed to see the scrolling action
        DO WHILE t + .1 )= TIMER                    'delay part of a second
            IF t ) TIMER THEN t = t - 86400
        LOOP
LOOP WHILE INKEY$ = ""
SYSTEM

------------------
NOTE: As in the previous sample, you need to substitute the greater-than symbol for the ) or the ( in these lines:

IF x ( 10 THEN z$ = " " ELSE z$ = ""
LOOP UNTIL L )= 80

DO WHILE t + .1 )= TIMER
IF t ) TIMER THEN t = t - 86400



Posted on Dec 2, 2010, 6:45 PM

Respond to this message   

Return to Index


*You can type &lt; and &gt; for < and >

by (Login Mikrondel)
R

Posted on Dec 3, 2010, 3:36 PM

Respond to this message   

Return to Index


How to make a scroll bar

by Zack (no login)

Hi again. Thank you to all the people who helped me before. And I have another question. How do you make a scroll bar? I have a paragraph that is too large to display on a single screen and I dont wanna say PRINT "Press Enter to Continue" / SLEEP. I would like, if possible, to put a scroll bar on the right side and at the bottom. If you know how to do this could you please post some sample code and/or direct me to a place where I cqn figure out how do do this. Thanks in advance, and any help will be appreciated.

Posted on Nov 29, 2010, 7:48 PM

Respond to this message   

Return to Index


lol - you certainly are ambitious for a beginner...

by (Login qb432l)
R

Study up on arrays -- string arrays. The text you want to scroll will have to be stored line by line in the array, and the scroll bar (when you get to it) will tell the program where to begin and end printing from that array. I wouldn't get into horizontal scrolling just yet; that would be very complicated, and really unnecessary if you just keep line length in the array to less than a screen width of characters.

Once you learn how to store your text in a string array, post again about scrolling. If you need help with string arrays, you can ask specific questions -- but really, these are the things you should be studying first, rather than trying to write a complex program without the basic skills.

-Bob

P.S. Did you ever get a button press to work?

Posted on Nov 29, 2010, 8:43 PM

Respond to this message   

Return to Index


...and btw, I totally understand...

by (Login qb432l)
R

I know you don't want to write a simple little program, you want to write something interesting.

When I was younger, I decided to take up sewing. I have a longish neck and couldn't find shirts with a high-enough collar. Since I was pretty good with my hands, I figured I'd sew myself one -- after all, it's just like woodworking: you cut out the pieces and join them together. I bought a Singer zig-zag sewing machine and some chocolate brown broadcloth, plus thread and buttons.

Well, there was a girl at work who was well known as a sewing whiz, so I asked her if she had any tips. She told me to start out simple: sew handkerchiefs and pillow cases and other flat stuff until I developed the basic sewing skills. I asked her, "What about a shirt?".

She shook her head sagely. "Don't try a shirt, they're very difficult to sew -- you have to turn the yoke and attaching the collar and sleeves is very tricky. Stick with hankies".

Of course, problem was, I didn't want to sew hankies. I wanted to sew a shirt with a high-enough collar to hide my giraffe-like head connector. I didn't spend good money on a sewing machine so that I could stop carrying Kleenex.

Long story short, I carefully took apart an old shirt that fit me perfectly and made cardboard patterns from it. As I disassembled it I studied how it went together. Well, it took me an entire weekend but I finished my brown, high-collared dress shirt. When I wore it on Monday, she took one look and started searching for the label. She couldn't believe that I, a beginner, could sew such a perfect shirt. Her final comment was, "Well, everything comes easy to you".

Now, I admit that I have some talent in that regard, but I was hurt that my 40 hours of intense study and effort were dismissed as though I had done it all in my sleep.

In any case, I realize that you want to make a shirt, not sew hankies. Still and all, at some point you will actually have to learn how to sew.

-Bob

Posted on Nov 30, 2010, 12:31 AM

Respond to this message   

Return to Index


I didn't spend good money on a sewing machine so that I could stop carrying Kleenex...

by (Login The-Universe)
Admin


ROFL, that was funny.

Hey, I just got the urge to become a manufacturer... can I take apart your sewing machine?

Pete

Posted on Nov 30, 2010, 8:07 AM

Respond to this message   

Return to Index


*Sure -- you learned how spines go together, a sewing machine should be a snap.

by (Login qb432l)
R

*

Posted on Nov 30, 2010, 9:53 AM

Respond to this message   

Return to Index


* No, a spine is a "snap." A sewing machine requires tools.

by (Login The-Universe)
Admin

Posted on Nov 30, 2010, 6:37 PM

Respond to this message   

Return to Index


yes

by Ben (no login)

best way to learn is to set big goal and than learn whatever you have to learn to make it happen

Posted on Nov 30, 2010, 8:44 AM

Respond to this message   

Return to Index


Hi

by Zack (no login)

Well, I'm not really sure what I should be learning. I can already do like loops and write and input from files and other stuff. I am not really sure what the next thing to learn is, so I am just trying to learn whatever I need at the moment for the program I am working on. And I did not ever get tha button to work :( I couldn't figure how to make it wait for a mouseclick. But I decided that I could do that part and pretty the program up with buttons at the end. I will look into string arrays and thank you for the help.

Posted on Nov 30, 2010, 2:22 AM

Respond to this message   

Return to Index


Use SUB

by (Login MarineDon)
R

Use SUB DisplayMessage to display a paragraph/message or
or to read a text file.
==========================================================================================
SUB DisplayMessage (Message$(), ULRow%, ULCol%, LRRow%, LRCol%, MaxNum%, ColrFG%, ColrBG%)
===========================================================================================

Here's the link:
http://www.smithselfgen.com/QuickBasic/DMESSAGE.TXT

Regards, Don Smith

Posted on Nov 30, 2010, 10:07 AM

Respond to this message   

Return to Index

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement