From a RAW beginner

New to FreeBASIC? Post your questions here.
Post Reply
Oldned
Posts: 3
Joined: Dec 22, 2009 6:04

From a RAW beginner

Post by Oldned »

I have downloaded and opened FbEdit in windows.
I have typed in the program 'Hello World"
I tried running it and nothing happened.
What do I do now to compile or run or compile and run this program?
I know nothing of command lines or DOS
Thanking you in advance.
oldned
nobozoz
Posts: 238
Joined: Nov 17, 2005 6:24
Location: Chino Hills, CA, USA

Post by nobozoz »

OldNed,

When FBEdit starts, the main window is blank (gray in my color scheme), but blank.

Under the 'Options" tab, select 'Path Options'.
In the popup window, make sure that FBEdit knows where to find the freebasic compiler (fbc.exe) under 'Compiler Path:'. I use

C:\FreeBASIC

Now that FBEdit knows where to find the compiler, make sure that the words, 'Windows Console' appear in the window just to the right of the Green triangle on the Toolbar.

Find the White Toolbar icon on the left end of the toolbar and click it to bring up a a new file: (untitled).bas.

Copy and paste the following two lines into the '(untitled).bas' text window.

Print "Hello, world."
Sleep

Now, click on the Green triangle icon on the toolbar.
If the "SaveFiles" window pops up, go ahead and click 'OK' to save the file with the default name, or change the name in the 'Save As' window.

You should then see a console window pop up with the words

Hello, world.

printed in white letters on a black background.

Happy New Year and enjoy programming in FreeBasic.

Jim
JohnB
Posts: 236
Joined: Jul 22, 2005 3:53
Location: Minnesota Arizona

Post by JohnB »

In FBEdit go to the menu and select

Options-> Path Option

and setup the paths. You could set up all the path to the FreeBASIC directory.

In FBEdit go to the menu and select File->New Code File
Type in you program and save it.
In FBEdit go to the menu and select File->Save

In FBEdit go to the drop down box, just after green arrow head, and select "Windows Console".

In FBEdit go to the menu and select

Make -> Go

The program should compile and run.

Simple hello world program should end with SLEEP commands so console stays open until you press a key.

Hope this helps.

JohnB
Post Reply