View Full Version : java to pbasic
can I convert java to pbasic? If so anyone know where I can download one?
If there's not a java/pbasic converter can I convert it this way
01-05-2003, 06:04 PM
01-05-2003, 06:13 PM
I don't know of any cross-language compilers to pbasic but for projects other than our BASIC Stamps Parallax has a Javelin Stamp that does work with a subset of Java.
Pbasic is a pretty mimimalist language. If you already know Java it should be a snap.
01-06-2003, 12:18 AM
ooo that would be soo cool. I hate PBasic. I have been wondering of it might be possible to convinve the ppl at FIRST and Innovation First to create a Java based comtrol sys for nex years competition. nah. Im probably just dreaming.
The thing is, inside your robot controller is a BASIC Stamp made by parallax. These stamps are designed for things like robot control/fun little machines. They run on PBASIC, which is essentially a simplified basic. Actually though, PBASIC Just got nicer if you look at the default source code. Now we've got SELECT/CASE statements, ELSE clauses for our IF statements, and you can put something other than an address after an IF/THEN clause. Just don't try to do that with your other BASIC Stamps!
01-08-2003, 06:03 PM
It would be awesome if you could program the stamps using Java, but I don't think its going to happen unless they produce a new one based on Java or some other higher-level language. (And we might be a while waiting on that)
Java doesn't have a goto command, and PBASIC can't support the methods and classes Java is based on. C+/++ is reasonable, and there's tools to do it, but Java's just to high level.
One day though, Innovation First will come around and use Java... (Hopefully)
01-08-2003, 06:13 PM
I just had to make a point...
Good programs don't need goto commands!
That would be, good programs in high level languages don't need goto commands.
Sorry, it's just one of those things that bothers me...
01-08-2003, 06:20 PM
Ok, here's my $0.02... Java is one of the worst languages I have ever used. C++ is definately the way to go. I would consider myself a master of C++ and intermediate at java. I'd sooner use PBASIC, perl, or even assembly than java. There's OOP, and then there's unreasonablely difficult and ugly code because OOP has gone way, way too far. It should be noted I'm also very much against C# :)
01-08-2003, 06:21 PM
C# I understand...
PLEASE PM ME and tell me why in the world you hate Java. I'm interesting in hearing your reasoning.
01-09-2003, 06:29 PM
it's a Robot.. not a shuttle to the moon...
why would you ever need anything more powerfull than Pbasic to map inputs to outputs and maybe a few simple logic lines? that seems like such overkill to me. our team (and me personally) have done alot of pretty advanced stuff with the Pbasic and minus a little bit of frustration, they have all been reachable with the existing setup
another thing, your a rookie team.. wich is easier to learn, C, java or whatnot or Pbasic?
I think that with the changes in PBASIC 2.5, it is becoming a repectable language. I think the biggest thing about it that bothered me was the syntax for the IF/THEN statements (IF condition) THEN address: ), but that has been changed!! (IF (condition) THEN codeGoesHere! ). That's a major improvement. It means that the code is suddenly a LOT cleaner, with a lot less jumps around the code. I already wonder how I got along without that...
I feel that PBASIC provides a very good medium for the FIRST robotics competition programming. First, it's related to BASIC, which is a very popular language that is (pardom the pun) very basic. It's easy for novice teams to grasp, and allows Innovation first to use the inexpensive BASIC Stamps by parallax to power the robot controllers. In addition, PBASIC allows novice programmers robots to perform almost as well as those of the veteran programmers. (I know that many of you might disagree with that statement, but I believe it to be true.)
Also, while the PBASIC Stamps provide enough processing power and memory for our needs, we still must learn to conserve space, keep code short and optimized, and write it efficiently. (This would be where an experienced programmer can defeat the novice)
With all that said, is anyone planning on running checks testing the efficiency of PBASIC 2.5 code versus 2.0 code? I would be interested to see which runs faster. If no one else is, I would run a couple tests.
01-09-2003, 07:24 PM
The thing to keep in mind is that nothing is new on the hardware level. Truth be told, the new interpreter probably just converts this new syntax to the old style.
if <condition> then <expression>
if NOT <condition> then no_exp
CASE a TO b
CASE c to d
if expr>a AND expr<b then case1
if expr>c AND expr<d then case2
vBulletin® v3.6.4, Copyright ©2000-2016, Jelsoft Enterprises Ltd.