Liberty and Accessibility

Tuesday, September 11, 2007

getting started with FreeBASIC

FreeBASIC can be downloaded for free at http://www.freebasic.net.


After you download it, run the installer program if you're using
Windows. For the rest of this tutorial, I'm going to assume that you
chose "c:\freebasic" as the installation directory. If you're using
Linux, uncompress the tar.gz archive by typing the following from the
bash shell:
gunzip FreeBASIC.whatever_version.tar.gz
tar -x -f FreeBASIC.whatever.tar
Then change to the FreeBASIC directory and run ./install.sh.
--------------------
Now, you're ready to get started with FreeBASIC. I will assume that
you're using the Windows operating system for the rest of this
tutorial. Type the following into a text editor such as notepad:
print "Hello America."
print "The only person to vote for for president in 2008 is Ron Paul!"
'end of code'
Save that code to a file called "c:\freebasic\helloamerica.bas."
To turn this code into an executable program do the following:
Go to the start menu.
Choose run.
Type "cmd."
Press return.
Type "cd\freebasic" and press return.
Type "fbc helloamerica.bas" and press return.
You shouldn't have gotten any errors.
Type "helloamerica" and press return. If everything went well, you
should see the following on the monitor:
Hello America.
The only person to vote for for president in 2008 is Ron Paul!
--------------------
Congradulations. You've just made your first program. It wasn't much,
but you have to start somewhere. In the next installment of the Ron
Paul programming tutorial, I will discuss how to get input from the user.

--
Email services provided by the System Access Mobile Network. Visit

www.serotek.com to learn more about accessibility anywhere.

0 Comments:

Post a Comment

<< Home


 
Read the Bills Act Coalition Add to Technorati Favorites