gfabasic
gfabasic
hah, dunno why, but when one enters 'gfabasic' in google, it leads to my page
and then on to purebasic 
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
see it as free advertising 
just upped the page, wanna be sure that any straggler finds his way to purebasic
oh man, cannot wait for v4...
just upped the page, wanna be sure that any straggler finds his way to purebasic
oh man, cannot wait for v4...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
you're gonna step on people's toes with this!josku_x wrote:blueznl, just curious with what language have you written GfaBasic and if it's so lame, could you give the source?
i DID NOT write gfabasic, if i did, i wouldn't be here
gfabasic was another basic variant from a few years back, and in fact it was not bad at all, it just sort of disappeared with the disappearence of the company that sold it
it had, however, a few very good points, and in some ways purebasic feels less structured than gfabasic did
then again, purebasic appears to be more powerfull, so i will not complain
if you want to try it, i think there are still some free demo versions floating on the net
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Yep, GFA BASIC came out years ago for the Atari ST (originally). From Germany, it was brought to the US via Michtron software at a time when a good BASIC was needed to go beyond ST BASIC. GFA later appeared on the PC (Amiga too?). I still have some old Gfa-centric programming manuals laying around collecting dust. Ah the good 'old days.
GFA BASIC had competition from STOS/AMOS and BLITZ. Didn't Fred write a bunch of Blitz libs on the Amiga back then?
GFA BASIC had competition from STOS/AMOS and BLITZ. Didn't Fred write a bunch of Blitz libs on the Amiga back then?
- Michael Vogel
- Addict

- Posts: 2819
- Joined: Thu Feb 09, 2006 11:27 pm
- Contact:
Hi,
I have been using GFA for about 100 years (maybe some less;) -- so I'd like to have some nice functions also in PureBasic (also in the editor, folding is just a begin, a real "auto complete", "auto indent" and "auto case" should be coming).
So I just began...
___________________________________________________________
;{ PureBasic 4.0-Library including useful GFA-16Bit-Functions }
; 2006/02/09 started by Michael Vogel
; ..... everyone can help!
;}
;{ File System }
; V0.01
;}
Procedure Exist(file$)
; Function: checks, if the given filename exists
; Return: True if the file exists, otherwise False
If ReadFile(0,file$)
CloseFile(0)
ProcedureReturn #True
Else
ProcedureReturn #False
EndIf
EndProcedure
Procedure.s DIR(dummy)
; Function: returns actual directory path, where program has been started from
ProcedureReturn "\Program Files\Tools\PureBasic\Sources\GFA"
; UNSOLVED - how to get the directory information?!
EndProcedure
;{ Mathematics }
; V0.0.1
;}
Procedure Max(a,b)
; Function: returns smaller of two numbers
If a>b
ProcedureReturn a
Else
ProcedureReturn b
EndIf
EndProcedure
Procedure Min(a,b)
; Function: returns bigger of two numbers
If a<b
ProcedureReturn a
Else
ProcedureReturn b
EndIf
EndProcedure
Procedure Div(a,b)
; Function: returns a div b
ProcedureReturn a/b
EndProcedure
Procedure Mod(a,b)
; Function: returns a mod b
ProcedureReturn a%b
EndProcedure
;{ Graphics }
; V0.0.1
;}
Procedure Cls(color)
EndProcedure
Procedure Get(x,y,w,h)
EndProcedure
Procedure Put(x,y,w,h)
EndProcedure
Procedure Stretch(x,y,w,h)
EndProcedure
;{ Windows }
; V0.0.1
;}
Procedure OpenW(n,x,y,w,h,mode)
EndProcedure
;{ Extras }
; V0.0.1
;}
Procedure ShiftKey()
; Function: returns True, when the Shift key is actually pressed, otherwise False
;ProcedureReturn GetKeyState(#VK_SHIFT) & 128
; UNSOLVED - how to call the API-Function GetKeyState?
EndProcedure
Procedure ControlKey()
; Function: returns True, when the Control key is actually pressed, otherwise False
; UNSOLVED - how to call the API-Function GetKeyState?
EndProcedure
Procedure AltKey()
; Function: returns True, when the Alt key is actually pressed, otherwise False
;ProcedureReturn GetKeyState(#VK_MENU) & 128
; UNSOLVED - how to call the API-Function GetKeyState?
EndProcedure
;{ Debugging & Testing }
;}
Procedure Test(what)
Select what
Case 1
Debug Exist("\boot.ini")
Debug Exist("c:\Win")
Debug Exist("c:\autoexec.bat")
Case 2
Debug dir(0)
Case 3
Debug min(9,2)
Debug div(19,5)
Debug 59%50
Case 4
Debug "Shift-Key..."
Debug shiftkey()
EndSelect
EndProcedure
test(3);{ change number for testing... }
; IDE Options = PureBasic v4.00 - Beta 1 (Windows - x86)
; CursorPosition = 55
; FirstLine = 10
; Folding = AAAg
I have been using GFA for about 100 years (maybe some less;) -- so I'd like to have some nice functions also in PureBasic (also in the editor, folding is just a begin, a real "auto complete", "auto indent" and "auto case" should be coming).
So I just began...
___________________________________________________________
;{ PureBasic 4.0-Library including useful GFA-16Bit-Functions }
; 2006/02/09 started by Michael Vogel
; ..... everyone can help!
;}
;{ File System }
; V0.01
;}
Procedure Exist(file$)
; Function: checks, if the given filename exists
; Return: True if the file exists, otherwise False
If ReadFile(0,file$)
CloseFile(0)
ProcedureReturn #True
Else
ProcedureReturn #False
EndIf
EndProcedure
Procedure.s DIR(dummy)
; Function: returns actual directory path, where program has been started from
ProcedureReturn "\Program Files\Tools\PureBasic\Sources\GFA"
; UNSOLVED - how to get the directory information?!
EndProcedure
;{ Mathematics }
; V0.0.1
;}
Procedure Max(a,b)
; Function: returns smaller of two numbers
If a>b
ProcedureReturn a
Else
ProcedureReturn b
EndIf
EndProcedure
Procedure Min(a,b)
; Function: returns bigger of two numbers
If a<b
ProcedureReturn a
Else
ProcedureReturn b
EndIf
EndProcedure
Procedure Div(a,b)
; Function: returns a div b
ProcedureReturn a/b
EndProcedure
Procedure Mod(a,b)
; Function: returns a mod b
ProcedureReturn a%b
EndProcedure
;{ Graphics }
; V0.0.1
;}
Procedure Cls(color)
EndProcedure
Procedure Get(x,y,w,h)
EndProcedure
Procedure Put(x,y,w,h)
EndProcedure
Procedure Stretch(x,y,w,h)
EndProcedure
;{ Windows }
; V0.0.1
;}
Procedure OpenW(n,x,y,w,h,mode)
EndProcedure
;{ Extras }
; V0.0.1
;}
Procedure ShiftKey()
; Function: returns True, when the Shift key is actually pressed, otherwise False
;ProcedureReturn GetKeyState(#VK_SHIFT) & 128
; UNSOLVED - how to call the API-Function GetKeyState?
EndProcedure
Procedure ControlKey()
; Function: returns True, when the Control key is actually pressed, otherwise False
; UNSOLVED - how to call the API-Function GetKeyState?
EndProcedure
Procedure AltKey()
; Function: returns True, when the Alt key is actually pressed, otherwise False
;ProcedureReturn GetKeyState(#VK_MENU) & 128
; UNSOLVED - how to call the API-Function GetKeyState?
EndProcedure
;{ Debugging & Testing }
;}
Procedure Test(what)
Select what
Case 1
Debug Exist("\boot.ini")
Debug Exist("c:\Win")
Debug Exist("c:\autoexec.bat")
Case 2
Debug dir(0)
Case 3
Debug min(9,2)
Debug div(19,5)
Debug 59%50
Case 4
Debug "Shift-Key..."
Debug shiftkey()
EndSelect
EndProcedure
test(3);{ change number for testing... }
; IDE Options = PureBasic v4.00 - Beta 1 (Windows - x86)
; CursorPosition = 55
; FirstLine = 10
; Folding = AAAg
Hi Michael:
Welcome to PB!
For Auto Indent, you can try JapBE, a nice editor.
For PB4
viewtopic.php?t=19335&highlight=japbe
For PB3
http://gpihome.de/purebasic/jaPBe/
To call API functions from PB, append an underscore to the Api funcion name
Here goes the Dir procedure:
BluezNL PB-GFA pages are a must.
http://www.xs4all.nl/~bluez/datatalk/pure2.htm#gfabasic
Cheers!
Welcome to PB!
For Auto Indent, you can try JapBE, a nice editor.
For PB4
viewtopic.php?t=19335&highlight=japbe
For PB3
http://gpihome.de/purebasic/jaPBe/
To call API functions from PB, append an underscore to the Api funcion name
Code: Select all
state=GetKeyState_(#VK_SHIFT)Code: Select all
Procedure.s DIR(); returns actual directory path, where program has been started from
Buff$=Space(256)
GetCurrentDirectory_(256,@buff$)
ProcedureReturn buff$; get the directory information
EndProcedure
Debug dir()
http://www.xs4all.nl/~bluez/datatalk/pure2.htm#gfabasic
Cheers!
GFA was on Amiga too, it was the first good BASIC on this platform (as I know, because Amigabasic was awful). But he hadn't any cool features like inline ASM and powerfull graphic functions, like the new BASICs, Amos, Blitz Basic and PureBasic.
Anyway, syntax was clearly defined, and the editor was not tolerant, so code was clean.
Anyway, syntax was clearly defined, and the editor was not tolerant, so code was clean.
well, isn't it time we wrote our own (unicode
) editor that does exactly that? check on code upon entering?
though it may not be easy
though it may not be easy
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
-
Jan Vooijs
- Enthusiast

- Posts: 196
- Joined: Tue Sep 30, 2003 4:32 pm
- Location: The Netherlands
BleuZnL,
I hope you mean "we" write it in PureBasic?? Otherwise there are a lot of those editors. The onbly problem is that it will be sort of a "compiler" in it self.
Hence Fred's wink....
But the idea is a nice one, maybe a collaborate project? here on the forum? But why in (unicode) good old acsii not enough?
Jan V.
I hope you mean "we" write it in PureBasic?? Otherwise there are a lot of those editors. The onbly problem is that it will be sort of a "compiler" in it self.
Hence Fred's wink....
But the idea is a nice one, maybe a collaborate project? here on the forum? But why in (unicode) good old acsii not enough?
Jan V.
Life goes to Fast, Enjoy!!
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)
well, the basics would be simple, i mean, i do not want to write my own editor (but don't tempt me
) as i already have too many projects at hand
but what we could cook up is perhaps a procedure that would validate a line of code to see if it is correct purebasic syntax or not, from that point onwards we could either convince
the pb team to include our realtime syntax check in the ide (by, for example, letting the ide highlight a 'faulty' line in a different colour) or use it as a building block
i have, to be honest, no clue how difficult such a thing would be
it's great to be ignorant and naive 
but what we could cook up is perhaps a procedure that would validate a line of code to see if it is correct purebasic syntax or not, from that point onwards we could either convince
i have, to be honest, no clue how difficult such a thing would be
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )

