Chapter 10 - Qbasic Tutorial - Qbasic Tutorial - Qbasic Tutorial - ^^JPS^^
Saturday, 2016-12-03, 5:38 PM

Welcome Guest | RSS

MainRegistrationLogin
Qbasic Home

Catalog categories
Qbasic Tutorial [31]

Rate my Site
Rate JPSor Site
Total of answers: 149

Main » Articles » Qbasic Tutorial

Chapter 10 - Qbasic Tutorial

So far, we've only let the user fill in our variables. We can fill in variables on our own inside our programs too. Like this:

 CLS
A = 1
B = 2
A$ = "Hello"
PRINT A
PRINT B
PRINT A$

"A = 1" places the value 1 in the variable A. "B = 2" places the value 2 in the variable B. A$ = "Hello" places the string "Hello" in the variable A$. You get the picture. Then the program prints them out to prove to you that they are there.

See if you can figure out what this rather clever program will do. Then type it in and run it to see if you were right.

 CLS
Count = 1
DO
PRINT Count
Count = Count + 1
LOOP

Did you get it right? Did the output go by way too fast? You'll have to press Break to stop it. Then take a closer look and see if you can see what's going on.

That program is what is called a "counter". It counts 1, 2, 3, 4... until it is stopped.



Source: http://jpsor.ucoz.com
Category: Qbasic Tutorial | Added by: JPSor (2009-02-26) | Author: JPSor
Views: 739 | Rating: 0.0/0 |
Login

Qbasic Clock

Search

Visit my Friends

Who's Online

Total online: 1
Guests: 1
Resgistered: 0


Copyright MyCorp © 2016