GFA Basic



GFA BasicOriginally GFA-Basic had been developed for the ATARI computers (16-bit and 32-bit) and the version for Windows wanted to be a valid alternative to VisualBasic. The goal was to give the programmer the best instruments to create powerful programs. GFA-Basic had never followed the road traced by VisualBasic, as it has always been developed as a product with its own characteristics. GFA-Basic is a professional programming language, it has hundreds of commands and functions and a very well written manual. Thousands of programmers use GFA-Basic but if you plan to start using it, keep in mind that this language does not follow those implicit syntax rules that most of the popular modern Basic languages do. Althought there are really many GFA-Basic programmers, unfortunately the forums I found where not enought populated to be useful. The IDE should be improved. GFA-Basic has been discontinued at least since 2005.
March-July 2008. GFA-Basic is still alive!. GFA-Basic fans created a site dedicated to this language where you can dowload a copy of for Windows 32bits. The sites states that GFA-Basic "is now abandonware. Back in 2001 the firm responsible for 15 years of GFA-BASIC products went bankrupt. Despite several pleas for providing the source code to the public domain, no former employee of Gfa Software Technologies GmbH responded to the GFA-BASIC community." The source code is not available, but the site owners are in any way able to support the language by fixing bugs. Last update is of December 2007. Thanks Jose, thanks Steffen.

Rated 2.7/5 upon 50 votes
Review updated: 2009-01-12 GFA Basic homepage
jj2007 2014-09-14 23:03
GfaBasic is a great language, with the best elements of BASIC and PASCAL combined. While I have tons of sources of Gfa for Win16, the Gfa32 version never convinced me, so eventually, to get Gfa for Win32, I rolled my own: MasmBasic. It's available on the Masm32 site, has about 200 commands that resemble heavily good ol' Gfa16, and produces standalone executables with an overhead of 20kBytes. And it's faster than C/C++, because it's written in assembly with a lot of SSE2 code.
Lonny 2014-05-27 21:22
The Atari version is still updated as well.
Multitasking Editor/IDE with compile/link built in.
Atari Firebee clone compatible (Coldfire CPU).
Jim 2013-10-25 9:04
Just a heads up, I quit using Microsoft Windows and have gone to Linux Mint 15 KDE. I tried many programming programs for Linux and got really frustrated. Many of then were easy to adapt to, how ever distributing them was a different matter. Unless the machine your installing your software on has all the dependencies installed your program will not work. So I decided to try GFA32 under Linux Wine. It works and I found no problems working with it. Installing it on another system was super simple. Just install the execute file, plus the GFA32 OCX file and your done. Just two files verses 10+ dependency files which most have to be loaded via the command line. So now I am writing my programs once again with GFA32. If you have a Linux operating system, give GFA a try. Just remember to place the program in your wine/Drive C/Program Files (X86) directory, and you should not have any problems.
Jim 2012-12-18 22:39
Great programing language. I can write the same program in GFA as I would in VB6 but at 1/3 or less the size. It's very fast, and easy to use. There is a small learning curve, and the user GUI needs to be updated. Other than that I use this compiler more then I do VB6 any more. Produced programs do not need an installer. Just unzip the program into a folder then use it. It's a shame the the makers gave up on this excellent program, as I think it could of been a real challenge to Microsoft. The required run time is only 973 Kb verses the huge run time for VB6. This is a compiler I would highly recommend to anyone.
Bereb 2011-05-07 19:07
Good language competing with PureBasic (which is a good langue too). Some times faster than the latter and more free ;-) (I'm using both and FBSL, a fast interpreted basic language))
Bruce Bell 2010-05-28 2:35
The following may help in understanding this programing language: GFA-BASIC 32 v2.3.1166 (Latest Version) Publisher: (Most below info is from this website) Released: 2010-03-22 O/S: Win 9x/ME/NT/2K/XP/2K3/Vista/Win7 MY USER RATING: 4.86 (out of 5) + Excellent IDE with combined window form designer and code editor. + Easy development with good help file and many example programs. + Code editor has auto-completion of code line with object drop-downs of methods and properties. + Normal distribution files are small executable and small (less than 1 MB) run-time file. Usually, exe file and run-time file work fine in same directory. Overview GFA-BASIC 32 is the fastest BASIC compiler for Windows 32-bits OS. GFA-BASIC 32 comes with an IDE to edit code, design forms, store resources, compile, run, and debug. The Basic language is highly VB compatible and yet allows programming the C/Pascal way (top-down, procedural, and low-level). The language supports inline assembler (and provides a disassembler object) and real pointers. Windows controls are wrapped-up in COM objects, making it easy to create GUI response functions. Introduction After GFA-BASIC for MSDOS and GFA-BASIC for Windows 3.1, a 32-bits version of GFA-BASIC is available. These versions of GFA-BASIC were divided in a an interpreter and a separate compiler. Starting with GFA-BASIC 32 the interpreter part is replaced by an in-memory compiler, the same that is used to compile to external EXE files. When a program is run from the IDE the code is first compiled to machine code and then executed. The compiler is optimized for producing (very) fast machine code, so that GFA-BASIC 32 programs execute at high speed. The command library of GFA-BASIC 32 is partly compatible to GFA-BASIC 16-bit. Much of the functionality of the 16-bit version is retained, but due to an entirely new concept of creating and handling of windows and dialog boxes, GFA-BASIC 32 is also quite different and much more compatible to VB in that area. Other incompatibilities are due to the 32 bits operating system; an integer is now 32-bits wide instead of 16-bits in GFA-BASIC 16-bit, for instance. One Project-File Only GFA-BASIC (32-bit) code files are single project files. This is typical of GFA-BASIC since the very first version in 1985 for the Atari ST. Code, forms (windows and dialog boxes), data, resource info are all contained in one file; the .g32 source code file. To create modular programs code can be compiled in to a library file (.lg32) and included into the project file. Editor When possible GFA-BASIC 32 will automatically convert 16-bit code to the new 32-bit syntax. An odd number of parentheses in a code line are auto-completed to match all required parenthesis. The underscore character ( _ ) can be used to split "logical" lines of source code, across physical lines in the source code file. The effect of using a line continuation character is for "visual" appearance only - the compiler itself treats lines split this way as only one contiguous line of code. The colon character (:-) can be used to separate multiple statements on a single (logical) line of source code. Subs and functions can be folded, of course. A rudimentary "intellisense: is provided for OCX objects. Procedural GFA-BASIC 32 is a procedural language and looks much like plain C, but it is syntax compatible with Visual Basic. GFA-BASIC 32 supports both the VB compatible Sub and FunctionVar statements, but it also provides the classical Procedure/Function statements from earlier BASICs and C. Procedures and functions can have optional parameters. You can use GoSub and Return anywhere in a procedure, but GoSub and the corresponding Return statement must be in the same procedure. New Features GFA-BASIC 32 has been greatly extended. Many new commands and functions are added, like ReDim, Iif, Choose, etc. New operators are included as well, like the conditional operator ?:. It uses a question mark after the condition to be tested, and specifies two alternatives, one to be used if the condition is met and one if it is not. The alternatives are separated by a colon. New Data Types New data types are Large (64-bit), Date, Currency, Variant, Object, Pointer and Handle. Integer and Long data types are now 32-bits. New is the full support of 64-bit integer arithmetic. Variables declared without specifying a type explicitly are a Variant data type by default. Array, Hash, and Collection Arrays can be re-dimmed now. Array elements can be inserted and deleted. The array can be sorted using quick sort in every possible way. The Hash is a one dimensional array or linked list whose (optional) index is of type string. The Hash list can be of any type, Int/String/Date/etc. A Hash is dynamic and is not dimensioned prior to its use. Values are added or assigned to existing elements. A hash can be examined, sorted, saved and loaded. Elements can be accessed by numeric index as well. Access to hash elements is very fast. The Hash is used with Split, Join, EvalEval the regular expression functions reMatch, reSub. The Collection is an COM object (OCX). It is a kind of one dimensional variant array whose index is of type variant. A collection is dynamic and is not dimensioned prior to its use. Values are added or assigned to existing elements. The collection is mainly targeted at OLE objects. Const and Enum A constant is a variable whose value is fixed at compile-time, and cannot change during program execution (hence, it remains constant). A constant is defined using the Const keyword. The Enum keyword is used to define a sequence of constants whose values are incremented by one. Strings For string functions the $-postfix is no longer mandatory, as in Chr$(0) which becomes Chr(0). The return value from a $-free string functions is NOT a Variant as in VB, but a real (ANSI) string. New are the Pascal compatible character constants #number that can be used in place of Chr(number). The following "Line1" #13#10 "Line2" #13#10 is the same as "Line1" + Chr(13) + Chr(10) + "Line2" + Chr(13, 10). Comparison and Assignment Operators In contrast with 16 Bit GFA-BASIC the expression x == y is now the same as x = y and x := y. The comparison operator == from16 Bit GFA-BASIC should now be replaced by NEAR. Alternatively, you can use a forced floating point comparison like If a = 1!. Direct Memory Access For direct memory access a whole range of variants of Peek and Poke are available (PeekCur, PokeStr, etc, etc.). Memory move and manipulation commands are provided (MemMove, MemOr, MemAnd, MemBFill, etc). ’Bits and bytes’ swap and make functions (BSwap8, MakeHiLo, etc, etc). Bits rotate and shift is supported (Shl, Shl8, Rol, etc). Port access is supported (Port Out, Port In). Matrix Arithmetic Next to the normal arithmetic functions, GFA-BASIC 32 offers Matrix functions and many more (advanced) mathematical functions. For runtime expression evaluation GFA-BASIC 32 includes Eval(). File functions Special file functions are for checksums (Crc32, Crc16, CheckSumXor, etc), file encryptions (Crypt), file compression (Pack/UnPack). Others are MimeEncode/MimeDecode, MemToMime/MimeToMem, and UUToMem/MemToUU to convert between binary and plain text formats. Built-in Win32 API Functions GFA-BASIC 32 supports more than 1000 API-Functions, functions that can be used as any other GFA-BASIC 32 function. Only the Standard-API-Functions from User, Kernel und GDI are implemented, other not often used API-Functions like for instance WinSock-Functions are to be declared explicitly. The type of the parameters of the built-in API-Functions are not checked upon compiling. Each parameter is assumed to be a 32-bit integer. A string can be passed to an API function, but is always copied to one of the 32 internal 1030-Byte buffer BEFORE the address of the buffer is passed. A user defined Type (As type) is always passed by reference, so that its address is passed (automatically V: ). To be on the safe side, keep things in your own hand and pass the addresses explicitly using VarPtr or V:. These rules don’t apply to DLL functions introduced with the Declare statement. Here GFA-BASIC 32 behaves like VB and the rules for calling such APIs must be respected. Some API function names are already in use by GFA-BASIC 32 and are therefore renamed. GetObject() becomes GetGdiObject(), LoadCursor becomes LoadResCursor. Obsolete functions are not implemented, obviously. Built-in Win32 API Constants As with the built-in API functions from User, Kernel and GDI, their accompanying constants are built-in. (1400 API-Constants from the 16 Bit-Version and more then 900 Constants from Win32-APIs are implemented. Obsolete constants are not implemented, obviously. Assembler and DisAssembler GFA-BASIC 32 provides an inline assembler and a disassembler object (DisAsm). Graphics Graphic commands take floating point values (Single) now. After scaling (set with ScaleMode) the coordinates are passed as integers to the GDI system. Scaling provides much more flexibility and is VB compliant. Most graphic commands can be used in VB format as well: Line (x, y)-(z, t),, BF is identical to Pbox x, y, z, t. The Color-command is now the same as RGBColor in 16 Bit GFA-BASIC. Additionally, a table with 16 standard colors can be used: Color QBColor(i) or a shortcut QBColor i. The windows now have an AutoRedraw property so that output is captured (performance decrease) to a second bitmap as well. A redraw of the window is then performed by copying the contents of the bitmap to the screen. Windows and Dialogs Windows and dialogs are all OLE - Forms now and their events are handled the same way as in VB. All standard and common controls are implemented using an OCX object wrapper. In general, all GUI objects are now OCX objects and are manipulated through properties, methods, and events. The old GetEvent/Menu() structure is now obsolete. You can still use third party controls by using the general Control statement. The notification messages are then handled in the window procedure of the parent, which is an form event sub as well! COM Programming With CreateObject you creates and returns a reference to an ActiveX object. After the object reference is assigned to a variable of type Object you can use the object's properties, methods, and events. Picture and Font Objects OLE Object types to create and manipulate fonts and pictures. Since these types are OLE-type compatible of a Font or Picture instance can be assigned to a property of an OCX control or form. Other objects are: App Object - The App specifies information about the application's title, version information, the path and name of its executable file and Help files, and whether or not a previous instance of the application is running. In addition it provides methods to create shortcuts. It has many properties returning information that are otherwise hard to find. Screen -- Returns the current capabilities of the display screen your code is executing on. The Screen object has much more properties than the VB counterpart. Err -- Contains information about runtime errors or helps in generating useful errors. Try/Catch/EndCatch error-handling. CommDlg -- An OCX wrapper about the common dialog box functions. Printer -- Object that provides full printer support for your application. Built-In Database One of the most exciting new features is the built-in database engine. CodeBase, from our technology partner Sequiter, is a high-Speed xBase compatible database engine that's small, easy-to-use and portable. Use the database engine to write extremely high performance database applications. Query a million record table in 0.49 seconds; read 250,000 records in 0.78 seconds; append 10,000 records in 0.65 seconds. It's lightning fast! Create extremely large databases, up to millions of terabytes in size! The database engine fits perfectly into GFA-BASIC 32. It is designed for developers who need maximum speed in their applications, using a minimal amount of memory. The new database engine meets this need by combining a small, fast database library (DLL) with an easy-to-use set of GB32 commands that integrates seamlessly with your code. And it is even easy to deploy. Just add one DLL (there are three, for FoxPro, dBASE and Clipper compatibility) to your Exe, and that's all. The database engine is royalty-free for GB32 customers.
Steffen 2009-10-04 4:41
All documentation that was included in the German help file and German PDF documents is now collected into one help file. The Help includes, keywords, statements, functions, OCX object, properties, methods, and events. Undocumented functions and OCX objects are included of course. In addition, the right-click help for built--in API functions is extended by providing their full syntax.

Leave a comment

click on image to refresh it