PureBasic Love hate relationship
PureBasic Love hate relationship
Hi all,
I've always debated which is better PureBasic or FPC(Free Pascal). I mean PureBasic is a good lang and cross platform. Even with 3.94 I've seen more functionality ported to Linux under PB. It still can't make Linux libs though and thats a bit annoying. Then I'm faced with which do I use since PB is a great lang, but FPC is has more units and things for such as zlib,mysql,pgsql. Granted ODBC works and can be used under Linux/Unix via UnixODBC. PureBasic also seems to play better with C code than FPC usually. However there is allot of stuff that FPC can do that PB can't, unless you write the code needed to do it by hand. I've written a interprerter in PB already and to me that says alot of good things about PB. However I've decided to create another one and tried it in PB and have found it to not be so easy as it would be with FPC. Bottom line I'm stuck in a love hate relationship with PB and its driving me nuts. There are days where I hide in the PB IDE and others when I hide in a console window coding FPC. It bothers me that I can't make up my mind. Consider this the irrelvant thought for the day.
I've always debated which is better PureBasic or FPC(Free Pascal). I mean PureBasic is a good lang and cross platform. Even with 3.94 I've seen more functionality ported to Linux under PB. It still can't make Linux libs though and thats a bit annoying. Then I'm faced with which do I use since PB is a great lang, but FPC is has more units and things for such as zlib,mysql,pgsql. Granted ODBC works and can be used under Linux/Unix via UnixODBC. PureBasic also seems to play better with C code than FPC usually. However there is allot of stuff that FPC can do that PB can't, unless you write the code needed to do it by hand. I've written a interprerter in PB already and to me that says alot of good things about PB. However I've decided to create another one and tried it in PB and have found it to not be so easy as it would be with FPC. Bottom line I'm stuck in a love hate relationship with PB and its driving me nuts. There are days where I hide in the PB IDE and others when I hide in a console window coding FPC. It bothers me that I can't make up my mind. Consider this the irrelvant thought for the day.
Re: PureBasic Love hate relationship
> there is allot of stuff that FPC can do that PB can't, unless you write the code needed to do it by hand
In other words, PureBasic can do what FPC does.
In other words, PureBasic can do what FPC does.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
... which is great 
( 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... )
I'm gonna agree with thefool that is bad. Now I realize I'm crazy, but still I say I'm allowed to be a bit over the top. I used to hate OOP myself and the I discovered some of its very unique advantages, like class inheritiance and I was hooked I got over the initial eww its bad. Its infact a good thing, a very good thing. Please note this will not stop or discourage me from using PureBasic at all, but has been things for me toconsider when starting a new project. To each his own I suppose.
you are wrong!
PB can do OOP look in the CodeArchiv, there are examples on using OOP with PB.
You can do Object(0)\Move(x, y) I'm sure about it!
Or am I sure? 
EDIT:
Well? day-dreamers, it's time to wake up!
PB can do OOP look in the CodeArchiv, there are examples on using OOP with PB.
You can do Object(0)\Move(x, y) I'm sure about it!
EDIT:
Code: Select all
; PureBasic Chat
; Author: Danilo (updated for PB3.93 by ts-soft)
; Date: 10. January 2004
;- CLASS cTEST start
; cTest CLASS Interface
Interface cTEST
Procedure1.l()
Procedure2.f(String$)
EndInterface
; cTest CLASS Object
Structure cTEST_OBJ
VTable.l
Functions.l[SizeOf(cTEST)/4]
EndStructure
Procedure.l cTEST__Procedure1(*this.cTEST)
MessageRequester("INFO","Procedure 1 in cTEST")
ProcedureReturn 12
EndProcedure
Procedure.f cTEST__Procedure2(*this.cTEST, String$)
MessageRequester("INFO",String$)
ProcedureReturn 123.456
EndProcedure
; cTEST CLASS Constructor
Procedure cTEST()
; Function table
*object.cTEST_OBJ = AllocateMemory(SizeOf(cTEST_OBJ))
If *object=0: ProcedureReturn 0: EndIf ; memory allocation failed
*object\VTable = *object+OffsetOf(cTEST_OBJ\Functions)
*object\Functions[0] = @cTEST__Procedure1()
*object\Functions[1] = @cTEST__Procedure2()
ProcedureReturn *object
EndProcedure
;- Program Start
*obj1.cTEST = cTEST()
If *obj1
Debug *obj1\Procedure1()
Debug *obj1\Procedure2("Hello World !")
EndIf



