View Full Version : PBasic Code Suggestions

08-09-2006, 05:26 AM
Although ive come to love pbasic and how well it was written, i have noticed that alot of it takes VB as its inhertiance, I think that there are a few things that could be changed very easily which would make the coding standards a little bit easier... by taking in some of c++ standards i think you could gain alot more efficient· coding... such as

variable = variable + 1 translates to Variable++

the for loop could be changed also to be made simpler, im sure there are many other suggestions but i figured ide make a suggestion! thanks for listening!

08-09-2006, 08:13 AM
pbasic and the simple syntax·is what makes stamping so darn easy. Making a hybrid from the syntax of two different languages will not make anything easier for anyone, anywhere.

If you want to develop in a language/syntax similiar to c++, you should take a look at the javelin stamp. It has common elements found in java, like OO, exceptions and strings.

my .02

08-09-2006, 08:45 AM
my main thing was the incrementing porcedure, i thought that would be a nice thing to have in there instead of that... its a good coding standard no doubt i agree!

08-09-2006, 09:21 AM
Please stay away from c++ with the STAMP. It is too cryptic. The C++ community already destroyed the great Visual Basic IDE by going to .NET (although Microsoft has added layers to make some of it look like the old VB6).

08-09-2006, 09:26 AM
i would have to disagree Katy, the c++ language is the most powerful, AND efficient language on the PC and will be for years to come,IMO. VB is too much to deal with for one reason and one reason only, its COM files you have to include. if ones missing nothing works...

Chris Savage
08-10-2006, 06:26 AM
willthiswork89 said...(trimmed)
Although ive come to love pbasic and how well it was written, i have noticed that alot of it takes VB as its inhertiance,
Are you saying that you think PBASIC was derived from VB?· I don't think VB was around then...There were a great number of BASICS but VB is inherently an Object-Oriented Language, whereas the BASIC Stamp is an Embedded Microcontroller.· Many of the facilities that VB makes use of wouldn't normally be available on such a controller.· I guess I don't see the comparison, but I am trying to understand if you are referring to upgrading PBASIC?

Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

08-10-2006, 08:14 AM
no no not at all i just think there should be an easier way of incrementing things and what not... little things like the variable++ which would save a little time, i think pbasic should be changed but in a very inconspicuous way. i was pointing out that pbasic and vb are alike buy the way the language writes out, like IF has to have END IF

brackets would make the clarity of pbasic alot better, and the editor has to background color changer! it stays white regardless ide like to see that changed.

im sure you all agree that

IF(Variable < variable1)

looks alot easier then

if(variable < variable1) THEN
variable = variable + 1

maybe its because im used to reading c++ as thats where my core is. just my opinion!

08-10-2006, 09:07 AM
Don't be sure that we'll all agree. The {} do not appear clearly in all fonts on all displays and printouts. They're also not easy to discern from () and [] in many cases. I work (in my daily job) with several different languages and I generally find the IF / THEN / ENDIF (or FI) easier to deal with.

I do prefer x++ or x += 1 over x=x+1, especially when the variable names are long.


Post Edited (MikeK) : 8/10/2006 2:11:40 AM GMT

08-10-2006, 09:50 AM
I agree KatyBri.

/mourn VB6

I also never understood why Microsoft didn't make the VB files part of the default Windows installation. It made no sense whatsoever.

In the early years it may have bloated the basic Windows install a bit, but from the late 90s on, the additional disk space needed was trivial.

- Rick

Chris Savage
08-10-2006, 10:43 AM
Some of the things you are interested are already in place on the new Propeller/Language.

Chris Savage
Parallax Tech Support
csavage@parallax.com (mailto:csavage@parallax.com)

08-10-2006, 01:23 PM
yea i totally agree mike ide love to have variable++ for normal pbasic... if that could be added ide be completley satisfied.