Page 1 of 2
gfabasic
Posted: Mon Dec 26, 2005 8:46 pm
by blueznl
hah, dunno why, but when one enters 'gfabasic' in google, it leads to my page

and then on to purebasic

Posted: Mon Dec 26, 2005 8:50 pm
by Berikco
hehe, bluez on number one in google with a dead corps

Posted: Mon Dec 26, 2005 9:01 pm
by blueznl
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...
Posted: Mon Dec 26, 2005 11:06 pm
by josku_x
blueznl, just curious with what language have you written GfaBasic and if it's so lame, could you give the source?
Posted: Mon Dec 26, 2005 11:17 pm
by blueznl
josku_x wrote:blueznl, just curious with what language have you written GfaBasic and if it's so lame, could you give the source?
you're gonna step on people's toes with this!
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
Posted: Wed Dec 28, 2005 8:14 am
by griz
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?
Posted: Wed Dec 28, 2005 11:32 am
by Falko
Posted: Thu Feb 09, 2006 11:33 pm
by Michael Vogel
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
Posted: Fri Feb 10, 2006 9:38 am
by einander
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:
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()
BluezNL PB-GFA pages are a must.
http://www.xs4all.nl/~bluez/datatalk/pure2.htm#gfabasic
Cheers!
Posted: Fri Feb 10, 2006 9:45 am
by djes
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.
Posted: Fri Feb 10, 2006 5:32 pm
by blueznl
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

Posted: Fri Feb 10, 2006 5:38 pm
by Fred
Good luck

.
Posted: Fri Feb 10, 2006 6:20 pm
by Jan Vooijs
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.
Posted: Fri Feb 10, 2006 7:32 pm
by djes
Personnally, I prefer to do code cleaning by myself, when I want it! Sorry to not support you in this idea...

Posted: Fri Feb 10, 2006 9:14 pm
by blueznl
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
