Register to reply

Programming with BASIC language.

by nwadimoore
Tags: basic, language, programming
Share this thread:
nwadimoore
#1
Mar20-09, 08:59 PM
P: 8
BASIC syntax, drawing flowcharts, QBASIC
Phys.Org News Partner Science news on Phys.org
FIXD tells car drivers via smartphone what is wrong
Team pioneers strategy for creating new materials
Team defines new biodiversity metric
nwadimoore
#2
Mar20-09, 09:01 PM
P: 8
This may be old but still important for freshers
nwadimoore
#3
Mar20-09, 09:03 PM
P: 8
I need to find some info on the QBASIC. I still find it hard.

nwadimoore
#4
Mar20-09, 09:06 PM
P: 8
Programming with BASIC language.

Is anyone there?
pantaz
#5
Mar20-09, 09:24 PM
P: 589
Relax...it's only been a few minutes since you started the topic. This is a discussion forum, not Twitter.

There is an awful lot of information out there concerning BASIC programming. Have you studied any of the "getting started" tutorials?

Google is your friend... http://www.google.com/search?q=getti...ic+programming

E.g., http://www.svatopluk.com/qbtutor/ or http://westcompsci.pima.edu/cis100/basic-00.html
nwadimoore
#6
Mar22-09, 10:41 PM
P: 8
Wow! Thanks, Pantaz. I think i'm doing well with the programming, but my headache lies on how to print the output on a paper. So far, if i try to print, only the program is print out. I want both the program and output to print on paper. How possible is it?
Integral
#7
Mar23-09, 12:06 AM
Mentor
Integral's Avatar
P: 7,318
Wow, Qbasic! I am amazed that this is still in use anywhere.

To print from a program

10 Print "Hello world"


Isn't that the universal first program to write in basic?

Suppose you have some variable x.

10 Print x


you can combine strings and variables:

10 Print "This is x "; x

The semi colon means that no space it left between the previous element printed. If you use a comma then it will space out to the next tab field.

10 for i = 1 to 10
20 print i
30 next i

Outputs
1
2
3
4
5
6
7
8
9
10

10 For i = 1 to 10
20 print i;
30 next i

Outputs
12345678910

That should get you started.
Gnosis
#8
Mar28-09, 12:36 PM
P: 143
Quote Quote by Integral View Post
Wow, Qbasic! I am amazed that this is still in use anywhere.
I still use GWBasic from time to time, which is even older than QBasic. I was working with computers when GWBasic was first introduced. It doesn't seem like all that long ago and yet, it's been roughly 3 decades. Time sure flies when you're having fun.
waht
#9
Mar28-09, 12:56 PM
P: 1,636
I still have "Qbasic in 21 days" picking up dust on the bookshelf. I believe the latex complier that came out eons ago was QB 4.5, try googling that. The compiler also has a comprehensive syntax library.

Here's some more code

CLS
SCREEN 12

WINDOW (-10,-10)-(10,10)

FOR R = 0 To 10

CIRCLE (0,0), R

NEXT R
nwadimoore
#10
Mar28-09, 02:53 PM
P: 8
Thanks, Integral. Gnosis. Waht. My idea in BASIC programming is ok. But the issue lies on printing out the program and its output on paper.
CRGreathouse
#11
Mar28-09, 03:35 PM
Sci Advisor
HW Helper
P: 3,684
Quote Quote by nwadimoore View Post
Thanks, Integral. Gnosis. Waht. My idea in BASIC programming is ok. But the issue lies on printing out the program and its output on paper.
Use LPRINT instead of PRINT.

My decades-dormant QBasic comes in handy again!
nwadimoore
#12
Mar29-09, 06:23 PM
P: 8
Thanks, CRGreathouse. U did well. It worked. But is there any way the input statement will appear on paper too.
Gnosis
#13
Mar29-09, 07:32 PM
P: 143
Quote Quote by nwadimoore View Post
Thanks, Integral. Gnosis. Waht. My idea in BASIC programming is ok. But the issue lies on printing out the program and its output on paper.
I'm sorry, I overlooked your need to print.

If you simply need to print everything that's visible on the screen, trying pressing the "Print Screen/SysRq" key while the printer is on-line. It generally takes at least two presses of this key (sometimes a 3rd press) for printing to commence, as each press of the key typically only fills half of the printer's paper (captures the entire screen, but that only fills half of the paper) and it's only buffered, not printed until a whole page worth of screen captures have occured. So press the key once, then list another full screen of your program, then press the key again and the printer will typically begin printing everything from the two screens that you captured.

In some cases, I have seen it require a 3rd press of the key, but usually only two key presses prints out a page.


Register to reply

Related Discussions
Which programming language do you use? Academic Guidance 20
Which programming language is the best ? Programming & Computer Science 15
C programming language Programming & Computer Science 1
Consoles Programming Language Computing & Technology 7
Programming language in Biology Biology 10