Page 6 of 6
Posted: Fri Nov 04, 2005 9:32 am
by Dare2
Hi Kukulkan,
I DLed that a little while ago, looked through the code and at the powerpoint presentation. Haven't spent much time with it, or tried to translate to English, as OO is not really big thing for me (perhaps "yet").
But it looks, um, classy.
Perhaps Fred should make it official. Then everyone will take note. (Just kidding)

Posted: Sat Nov 05, 2005 7:48 pm
by josku_x
A yes from me.
I think PureBasic is NOT a BASIC language. Sure it supports all BASIC keywords and is implemented as a BASIC language, but it isn't.
I have been using PowerBasic and the syntax is slighlty different than Purebasic's. I don't mean Purebasic is bad, nor do I mean I hate BASIC or that BASIC sucks.
I mean, what if Purebasic would be it's own language still supporting the BASIC keywords and have it's own cool functions?
I think more people would buy it if they would know how powerful it is.
so, I think that object oriented programming would be a great idea.
*unless that I'll just work with GameMaker

*
Posted: Sun Nov 06, 2005 2:32 am
by fsw
Kukulkan wrote:I tell you again: There is already such a preprocessor available:
Go to
http://members.chello.at/pure-basic-essentials/ and select "Downloads" and "Dokumente". On "Downloads" you can see a sample-code of accepted oo-code.
Kukulkan
Too bad their own example on the download page doesn't work
Code: Select all
Class MyClass1
attribute1.l
Method setAttribute1(value.l)
*this\attribute1 = value
EndMethod
Method.l getAttribute1()
MethodReturn *this\attribute1
EndMethod
EndClass
Class MyClass2 Extends MyClass1
attribute2.l
Method setAttribute2(value.l)
*this\attribute2 = value
EndMethod
Method.l getAttribute2()
MethodReturn *this\attribute2
EndMethod
EndClass
NewObject *obj.MyClass2
*obj\setAttribute1(1)
*obj\setAttribute2(2)
Debug Str(*obj\getAttribute1()) + " / " + Str(*obj\getAttribute2())
*obj\destruct()
End
My take:
First the preprocessor has to work 100%, and then you can go the next mile and code a special editor for it or whatever is needed.
In my opinion they do to much at once ...
It would have been great - if it would work

Posted: Mon Nov 07, 2005 7:20 am
by Kukulkan
Hi fsw,
Too bad their own example on the download page doesn't work
Why do you tell something?
I tested it in this moment and it works perfectly!!!
Simply
- download the executable
- run it
- select the desired OOP-Code (like exactly the example in your post)
- watch the resulting file (*_pp.pb extended filename)
The generated code compiles without any errors and gives the correct results!
Whats your problem?????
Kukulkan
Posted: Mon Nov 07, 2005 5:36 pm
by fsw
Kukulkan wrote:Hi fsw,
Too bad their own example on the download page doesn't work
Why do you tell something?
Because it doesn't compile here.
Kukulkan wrote:
I tested it in this moment and it works perfectly!!!
Good for you
Kukulkan wrote:
Simply
- download the executable
- run it
- select the desired OOP-Code (like exactly the example in your post)
- watch the resulting file (*_pp.pb extended filename)
The generated code compiles without any errors and gives the correct results!
That's what I did, and the resulting file has a size of 0 bytes.
Kukulkan wrote:
Whats your problem?????
Kukulkan
There is a reported error.
I'm not @ home so I can't tell you in which line the error was reported.
If I have time tonight I will rerun it again and post the error message.
Posted: Tue Nov 08, 2005 3:32 am
by fsw
OK,
used PBE-ClassPreCompiler.exe (size 25600 bytes) with original file
I've copyed and pasted from the essential downloadpage.
Get the error:
"Row 20: Global code not allowed in a class-syntaxerror!"
For the next test I've copyed and pasted from my post above.
and get the message:
"No errors!"
Strange...
Looked through both code files and they look the same,except the file that doesn't work has TAB's in it instead of SPACES.
Now I killed all TAB's in the original file and it works now.
Conclusion:
There is a BUG when TAB's are used.
Posted: Tue Nov 08, 2005 4:29 am
by dagcrack
I say its good and only good if you can still programm in PB with out having to use it. that said, maybe it's good for many people, maybe its not. but if its there and its optional, it wont harm those who wouldnt use it (or will, eventually).
Posted: Tue Nov 08, 2005 4:36 am
by rsts
I'm from the "old school" (procedural) and while I wouldn't really care if OO were included (as long as I didn't have to use it and it didn't impact my code in any way), I can't imagine that it wouldn't take resources away from the development of other, more pertinant, features I would use and benefit from.
So, as long as the name of the game is "Fred", and the name of the product is PureBasic, I'd prefer we stick with "Pure Basic" not OBasic or BasicO or whatever.
cheers
Posted: Tue Nov 08, 2005 9:58 am
by Kukulkan
Hi fsw,
Thank you for the tests with the precompiler. I will tell it to didelphodon on the PBE-forum so he can fix it. I used jaPBe. Seems that jaPBe converts every TAB to spaces. So I didn't found this bug. This will be easy to remove.
Kukulkan
Posted: Tue Nov 08, 2005 5:40 pm
by fsw