[futurebasic] Re: [FB] New to programing and futurebasic

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2009 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Mon, 12 Jan 2009 20:34:38 -0500
Wayne asked:

>  I used to program in the old gwbasic in a ibm pc 20 years  
> ago...Can you suggest a starting place to look and which book to  
> start with?



Wayne,

You've come to the right place. I think you will find list members  
here eager to help you learn and progress. A special edition of FB  
used to come with an excellent tutorial that walked a beginner  
through the basics of BASIC programming. Unfortunately I have never  
seen a downloadable version of this tutorial.

I'm going to make what some might consider a radical suggestion: To  
bring yourself up to speed on BASIC concepts, I recommend you find an  
online QBasic tutorial such as the one here:

http://chortle.ccsu.edu/CS113/index.html

QBasic and FB are both based on early dialects of the original BASIC.  
The QBasic language statements used at the elementary level of this  
tutorial are-- with a few exceptions-- interchangeable with FB. I  
just worked through first couple of chapters and compiled and ran the  
code examples with FB's Console mode checked under FB's "Command" menu.

Console mode lets you concentrate on the elementary concepts of  
programming without worrying about building windows and window  
objects such as buttons, text- and picture-fields, etc. The  
aforementioned tutorial reviews:

Arithmetic Expressions
Variables
Loops
If-Then-Else Statements
Logical Expressions
String Variables
For-Next Loops
Nested Loops
Arrays

The nice thing about these fundamental coding concepts is that they  
are universal across all programming languages. There is no way to  
learn them other than by writing and running code. Despite the hard  
work, there are few things more gratifying than realizing you have  
grasped and made your own an important coding concept.

As you work through the tutorial, you probably will run across  
syntactical differences in QBasic and FB. Post the problematic code  
here and most likely you'll have you answer in a few minutes.

Here's your first exercise:

1. Launch FutureBASIC.

2. Go to FB's "Command" menu and slide down to "Console" and check it.

3. Go back to FB's "File" menu and select the first item: "New." This  
brings up an Editor window where you can begin writing code.

4. Type in the following lines (or you can cheat and copy them from  
this post and paste them in:

Print "Hello World!"
Print
Print "What does 1 + 1 equal? "; 1 + 1

5. Go to FB's "Command" menu and select the first item: "Run untitled 1"

6. A window will pop up asking you if you want to save the code as an  
FB file. If you don't want to save your code click the Cancel button  
and the program will run. First will you see the Compiler window pop  
up and run down its checklist, and then a second window-- the Console  
window--  will open with the output of your executed program.

7. If you want to save the program as a compiled executable, at Step  
5 above, select "Build untitled 1" under the Command window. This  
will open a dialog asking you where you want to save the compiled  
executable application. Select your Desktop and name the file "Hello  
World." The Compiler window will do its thing, and when it's over  
your first compiled application "Hello World" with the generic FB  
blue leaf icon, will appear on your Desktop. Double click it and enjoy.

Welcome to FB.

Ken