gfabasic

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

gfabasic

Post by blueznl »

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... )
Berikco
Administrator
Administrator
Posts: 1326
Joined: Wed Apr 23, 2003 7:57 pm
Location: Belgium
Contact:

Post by Berikco »

hehe, bluez on number one in google with a dead corps :lol:
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post 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...
( 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... )
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

blueznl, just curious with what language have you written GfaBasic and if it's so lame, could you give the source?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post 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
( 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... )
User avatar
griz
Enthusiast
Enthusiast
Posts: 167
Joined: Sun Jun 29, 2003 7:32 pm
Location: Canada

Post 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?
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

User avatar
Michael Vogel
Addict
Addict
Posts: 2819
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post 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
User avatar
einander
Enthusiast
Enthusiast
Posts: 744
Joined: Thu Jun 26, 2003 2:09 am
Location: Spain (Galicia)

Post 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

Code: Select all

state=GetKeyState_(#VK_SHIFT)
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!
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post 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.
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post 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 :-)
( 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... )
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Good luck ;).
Jan Vooijs
Enthusiast
Enthusiast
Posts: 196
Joined: Tue Sep 30, 2003 4:32 pm
Location: The Netherlands

Post 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.
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)
User avatar
djes
Addict
Addict
Posts: 1806
Joined: Sat Feb 19, 2005 2:46 pm
Location: Pas-de-Calais, France

Post by djes »

Personnally, I prefer to do code cleaning by myself, when I want it! Sorry to not support you in this idea... :oops:
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post 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 :-)
( 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... )
Post Reply