I've Had It!

Everything else that doesn't fall into one of the other PB categories.
chris319
Enthusiast
Enthusiast
Posts: 782
Joined: Mon Oct 24, 2005 1:05 pm

I've Had It!

Post 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.
jamba
Enthusiast
Enthusiast
Posts: 144
Joined: Fri Jan 15, 2010 2:03 pm
Location: Triad, NC
Contact:

Re: I've Had It!

Post 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! :)
-Jon

Fedora user
But I work with Win7
Fred
Administrator
Administrator
Posts: 16681
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: I've Had It!

Post 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
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: I've Had It!

Post by srod »

I can guess which compiler that might be! :wink:
I may look like a mule, but I'm not a complete ass.
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: I've Had It!

Post 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.
User avatar
idle
Always Here
Always Here
Posts: 5094
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: I've Had It!

Post 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.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: I've Had It!

Post 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.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Re: I've Had It!

Post 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 '
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Re: I've Had It!

Post 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 "=".
oh... and have a nice day.
Foz
Addict
Addict
Posts: 1359
Joined: Tue Nov 13, 2007 12:42 pm
Location: Manchester, UK

Re: I've Had It!

Post by Foz »

Perhaps I should have used the word "common" instead of "standard".
kerryn
New User
New User
Posts: 1
Joined: Fri Apr 09, 2010 12:19 pm

Re: I've Had It!

Post 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
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: I've Had It!

Post 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.
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
User avatar
fsw
Addict
Addict
Posts: 1572
Joined: Tue Apr 29, 2003 9:18 pm
Location: North by Northwest

Re: I've Had It!

Post 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:
User avatar
Blue Steel
Enthusiast
Enthusiast
Posts: 132
Joined: Wed Aug 31, 2005 4:49 pm
Contact:

Re: I've Had It!

Post 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
Currently using PureBasic 4.51(x86)

Image http://www.codingmonkeys.com
Covers many languages including PureBasic
User avatar
Frarth
Enthusiast
Enthusiast
Posts: 241
Joined: Tue Jul 21, 2009 11:11 am
Location: On the planet
Contact:

Re: I've Had It!

Post 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:
Last edited by Frarth on Sat Apr 10, 2010 3:22 pm, edited 2 times in total.
PureBasic 5.41 LTS | Xubuntu 16.04 (x32) | Windows 7 (x64)
Post Reply