Page 1 of 2

I've Had It!

Posted: Tue Apr 06, 2010 12:33 pm
by chris319
I had the bright idea of porting some PureBasic code to another BASIC compiler which is "Free". Big mistake! BASIC is supposed to be easy and this other "Free" compiler was anything but. I felt like I was programming in C all over again. Spend lots of time, get very little result. Try this, try that, search the documentation high and low and your code still doesn't work. So my project is going to remain in PureBasic where a) it works, and b) I don't have to kill an entire evening trying to accomplish something with no results.

Re: I've Had It!

Posted: Tue Apr 06, 2010 2:11 pm
by jamba
I've been converting from VB classic to PureBasic... PureBasic is a breeze! Loving it so far... it's well laid out, fast, and still cheap! :)

Re: I've Had It!

Posted: Tue Apr 06, 2010 2:52 pm
by Fred
chris319 wrote:I had the bright idea of porting some PureBasic code to another BASIC compiler which is "Free". Big mistake! BASIC is supposed to be easy and this other "Free" compiler was anything but. I felt like I was programming in C all over again. Spend lots of time, get very little result. Try this, try that, search the documentation high and low and your code still doesn't work. So my project is going to remain in PureBasic where a) it works, and b) I don't have to kill an entire evening trying to accomplish something with no results.
What's a wierd idea :P

Re: I've Had It!

Posted: Tue Apr 06, 2010 11:31 pm
by srod
I can guess which compiler that might be! :wink:

Re: I've Had It!

Posted: Wed Apr 07, 2010 6:39 am
by fsw
Sorry that you had such an experience but you are comparing apples with oranges:

What PureBasic users don't realize is that PureBasic's syntax is not the same as the early BASIC programming languages.
PureBasic is not BASIC - it's BASIC-like.
The other BASIC you tried was surely more BASIC than PureBasic.

What makes PureBasic great though is the framework that comes with it (libraries)
If you would have had an equal framework for the other BASIC the overall experience would have been more comparable.
Try to use PureBasic without the framework it comes with and you will know what I mean.

There are surely good reasons to program an application with other programming languages; but simplicity and programming speed are not one of them.

Conclusion:
If you don't have time to waste, code as much as possible with PureBasic.

Re: I've Had It!

Posted: Wed Apr 07, 2010 8:20 am
by idle
once you've exausted the basic path you could always try your luck with a free delphi compiler, though it they just feel as ancient as pascal, though if what you really want is something like c on acid, you can't beat Purebasic for the ease and results.

Re: I've Had It!

Posted: Wed Apr 07, 2010 8:29 am
by eesau
I've always thought PB to be very C-like, it just uses keywords for marking blocks as opposed to using curly brackets. I suppose it would look something like this with those curlies:

Code: Select all

If InitSound() = 0
{
	MessageRequester("Error", "Sound system not available.") : End
}

FileName$ = OpenFileRequester("","","Modules (*.mod, *.xm, *.it)|*.mod;*.xm", 0)

If FileName$
{
	If LoadModule(0, FileName$)
	{
		PlayModule(0)    
		MessageRequester("PureBasic - Module player", "Playing the module...")

    	For k=100 To 0 Step -1
    	{
			Delay(20)
			ModuleVolume(0, k)
    	}
   }
	Else
	{
		MessageRequester("Error", "Can't load the module or bad module format.")
	}
}
Looks and feels like a very clean version of C :) That's probably why porting C snippets to PB is easy.

Re: I've Had It!

Posted: Wed Apr 07, 2010 10:20 am
by Foz
Not having to worry about the trailing ; is also a bonus - I suspect the reason it's the comment character rather than the standard '

Re: I've Had It!

Posted: Wed Apr 07, 2010 1:12 pm
by Kaeru Gaman
"standard" ... "standard" ....
what standard?

on the C64 I wrote REM to start a command line.
just because Billy did something into his BASIC, it's not necessarily to be called a "standard".
if you want a standard, put Line Numbers into your code and work with "Goto". ;)

there are three, four, five generations of BASIC over the last thirty years, so no wonder the dialects can be really different.
even COBOL and COBOL II had quite markable contrasts, so why should an even larger family of languages have no differences to each other?

and PB may have some advantages which were first introduced in C, like Select/Case and Structures and such...
start and end keywords for subroutines is quite common in a lot of languages.

but it is no C, C has some really unique attributes that make it C.
the most remarkable maybe the fact you can mix up math operations and other operations, and that the comparison "==" is clearly different from the assignment "=".

Re: I've Had It!

Posted: Wed Apr 07, 2010 1:25 pm
by Foz
Perhaps I should have used the word "common" instead of "standard".

Re: I've Had It!

Posted: Fri Apr 09, 2010 12:28 pm
by kerryn
I couldn't help seeing the comment by fsw and couldn't agree more. Basic has changed over the last 30 years - hardly recognisable in some aspects. So why should one of the compilers referred to in the OP work?

It's like trying to get a truck engine to fit in a mini!

For starters I can see the libraries in PB being a problem in compiling from some older versions!

Just my 2cw

KN

Re: I've Had It!

Posted: Fri Apr 09, 2010 6:46 pm
by Frarth
fsw wrote:What makes PureBasic great though is the framework that comes with it (libraries)
If you would have had an equal framework for the other BASIC the overall experience would have been more comparable.
Try to use PureBasic without the framework it comes with and you will know what I mean.
I would like to add *POINTERS* to the power of PB! It is one of the most powerful tools for a programmer, and I've missed that a lot in other Basic languages.

Re: I've Had It!

Posted: Sat Apr 10, 2010 4:07 am
by fsw
Frarth wrote:
fsw wrote:What makes PureBasic great though is the framework that comes with it (libraries)
If you would have had an equal framework for the other BASIC the overall experience would have been more comparable.
Try to use PureBasic without the framework it comes with and you will know what I mean.
I would like to add *POINTERS* to the power of PB! It is one of the most powerful tools for a programmer, and I've missed that a lot in other Basic languages.
The UNNAMED Basic Compiler from the first post also has pointers...

Actually the trend nowadays is that pointers are evil!
Look at C#, Vala, D, Go, etc. all newer languages despise pointers because they are too dangerous :shock:

How in the world did computing start back in the days? (the era after tubes and relays, and Conrad Zuse...)
Without pointers?
I don't think so.

:mrgreen:

Re: I've Had It!

Posted: Sat Apr 10, 2010 6:06 am
by Blue Steel
lol.. so is driving a car. but people still do it even those who havn't learned how to. lol

Pointers are a tool .. and it depends on how you use or misuse them them

Re: I've Had It!

Posted: Sat Apr 10, 2010 8:06 am
by Frarth
fsw wrote:Actually the trend nowadays is that pointers are evil!
Look at C#, Vala, D, Go, etc. all newer languages despise pointers because they are too dangerous :shock:

How in the world did computing start back in the days? (the era after tubes and relays, and Conrad Zuse...)
Without pointers?
I don't think so.

:mrgreen:
For a while I followed the trend of OOP and programming without having pointers at hand. For programmers with(out) (less) discipline, forcing them to structural programming may be a good thing, but PB goes back to procedural programming, which was common in the 80s, and it gives the programmer so much more freedom and flexibility! I worked a lot with QB and developed great apps with it. PB reminds me of those days, and with support coming for arrays in structures I'll be settled!

I am reprogramming an app from scratch which I developed some time ago with REALbasic (which forces programmers to OOP to the extreme IMO). The same app in RB uses three times more memory, and the exe is almost three times as big. Reason enough for me to use PB. It is just elegant!

Great topic guys. :wink: