GFA-BASIC for Windows 3.1

Home - MS-DOS - Win32

Most versatile BASIC for Windows 3.1

This is the most powerfull version of GFA-BASIC until the 90s. It supported everything a BASIC programmer wanted at that time and much more.   

The Editor

Starting GFA-BASIC from MS-Windows produces a standard Windows window which is used for editor input. The GFA-BASIC editor window contains a menu bar and a vertical scroll bar. An extra line for various messages is located at the bottom of the window.

 

The GFA-BASIC editor is a program editor written especially for the development of GFA-BASIC programs. It is a line oriented editor, in that it performs a syntax check for each line, it automatically indents the loops and subroutines and allows the usage of GFA-BASIC command abbreviations.

 

The syntax check means that the editor checks  whether the entered statements are syntactically correct for GFA-BASIC. If not, a warning bell is sounded and the "Syntax error" message is displayed in the left half of the extra line on the screen.

 

A program line can be up to 255 characters long. A comment can be placed in between statements or at the end of a GFA-BASIC statement. To separate a statement from a comment the characters "/*" (slash asterisk) are placed at the beginning and "*/" (asterisk slash) at the end of the comment.

 

Debug

The Dubugging feature within GFA-Basic is a very powerful tool.  The Debug-Window can be initiated by clicking on the "Debug" button or by pressing the Alt and G Keys together.

 

The Debug-Window displays six lines of buttons, optionally displaying variable names and the contents of the variables. To display a variable, just click on a variable button, and then select a variable from the resulting list box to be allocated to this particular button. The variable name appears within the variable button and its contents to the right of the button. Selecting a variable button, while depressing the Shift key, will allow you to set the variable value.

 

Below the variable buttons can be found a Groupbox  which will display a section of up to 5 lines from your program. The first line is the name of the current procedure that your program is within. The next line will be the previous executed program line. The next line (also indentified with the > symbol), is the currently executable program line. The next two lines to be executed are then also displayed. At the base of the Debug Window is a row of 5 buttons.

Trace: Executes a line at a time, but will execute fast through procedures.

Step:   Single step through all program lines.

Walk:  Walk through all program lines. (Slow tracing). After every statement the variables and program lines are displayed.

Go:      Fast Tracing. The Debug Window is only updated when the mouse pointer is moved over the Debug Window.

Brk:     Up to 6 break points can be set. Execution will stop when a breakpoint is reached. The current breakpoint is also displayed in the line number box, in the main GFA-Basic editor window.

When executing a program, the Debug-Window can be called up using Shift-Ctrl-Break. If you wish to activate the Debug-Window when single stepping through a program use Shift-Pause.

 

Calling the Debugger from a program

The Debug feature is also programmable. You may automatically call the debugger from within your program and specify which variables should be tracked.

 

Debug On        Activates the Debug Window or stops a Walk or Go

Debug OFF      Switches off the Debug Window.

Debug 0,var    Assign varaible var to variable display 0 (#,%,!,&,|,$)

Debug 1,var    Assign varaible var to variable display 1 (#,%,!,&,|,$)

Debug 2,var    Assign varaible var to variable display 2 (#,%,!,&,|,$)

Debug 3,var    Assign varaible var to variable display 3 (#,%,!,&,|,$)

Debug 4,var    Assign varaible var to variable display 4 (#,%,!,&,|,$)

Debug 5,var    Assign varaible var to variable display 5 (#,%,!,&,|,$)

 

The GFA BASIC RCS.

The RCS (Resource Construction System) makes it possible for the GFA-Basic programmer to create a Dialog,to use all the Control-types Windows offers.You are also able to change / modify the Dialog or any of its elements independently from each other.

 

Styles are selectable for every element (control) separately, as well as for the Dialog-window itself.  The Dialog can have its own font, or the System-font. 

The RCS works with the Basic interactively: by clicking on the RCS-button in the Basic-Editor, or by using the short cut key Alt + s. If a command line contains a DLGBOX Command, the RCS will also activate and display the Dialog used. 

Also, the RCS has a possibility to 'send ' a command-line to the Basic and insert the DLGBOX Command at the current cursor position. The user is always able to switch back and forth between RCS and Basic-Editor, except when the Basic-program is executing (or in Debug-mode). 

After creating a Dialog, it should be saved in a file. This file is loaded by the Basic only if a DLGBOX-Command is executed. The extension is GFR. This file contains a DLGTEMPLATE structure, followed by DLGITEMTEMPLATEs for every element the Dialog contains.

 

GFA-BASIC Make Exe Compiler

The GFA-BASIC Interpreter can create a run time .EXE which dependents upon a run time DLL.

 

Compiler and Linker

The GFA-BASIC Compiler for Windows is available as a stand alone and will compile a GFW file created by the Interpreter into a true (independent of run time DLL) .EXE file.

A major advantage of the GFA-BASIC Compiler, is the ability to create a DLL, that can then be used by other programs and languages.

 

GFA-BASIC dBASE Interface

GFA-BASIC can access dBase files using the optional dBase DLL. The GFA dBASE interface allows GFA Basic programs to access dBASE III and dBASE IV files. The following functionality is supported:

  • Records may be access in sequential order or randomly accessed by an index.
  • Field values may be retrieved and updated.  New records may be appended to an existing file.
  • Records may be locked for multi-user access applications.
  • Information is returned about the table including the number of fields, field names, types, width and number of decimals (for numeric fields).

 Download 16-bit dBase DLLs


Generating Exe files for Windows XP (from Steffen Schirmer)

There is a problem generating *.exe files with GFA Basic 16 with Windows XP. At the site http://www.ilmiositoweb.it/gfa-basic/index.html Cristiano Fanucci from the GFA Club in Bologna is offering a modified version of the gfarun10.dll. On my email he send me last year a small GFA code which is detecting the version of my gfarun10.dll and modifies it to fit it to Windows XP. With this modified gfarun10.dll now it is possible (without the "real" compiler) to create *.exe files running on XP. Is working perfectly for me!

Download code: GFR10PA2.GFW