Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: yrinfish on June 14, 2011, 02:16:14 am

Title: Operator precedence...
Post by: yrinfish on June 14, 2011, 02:16:14 am
As some of you know I'm working on a programming language for the TI83/84 etc, but I've got a question:

Do you guys want operator precedence?

It would be less optimized (pushes and pops), but since the compiler is not on-calc, I can work on this. It would also mean more work for me (but that's not really bad)
Title: Re: Operator precedence...
Post by: Juju on June 14, 2011, 02:48:30 am
IMHO, operator precedence is a must, unless it have unconventional syntax (does not look like C at all) or the editor is on-calc (like Axe).
Title: Re: Operator precedence...
Post by: Builderboy on June 14, 2011, 04:29:22 am
When you say partial, no difference between +- and */, that is how PEMDAS works anyways.  Subtraction is the same as addition anyway, so the partial and full options are the same :P
Title: Re: Operator precedence...
Post by: yrinfish on June 14, 2011, 07:34:02 am
By partial I meant that 23+1/4 is 6 and not 23.25.

The syntax will be C-like
Title: Re: Operator precedence...
Post by: Ashbad on June 14, 2011, 07:51:52 am
Well, it depends on what type of language it is that you're writing.  Is it like RPL, BASIC, C, or something else?  I suggest if you go with a language similar to C for example, that most of the language is the same as the one you're modeling from (C).  I think operator precendence is something you worry about later -- first figure out how you're going to even use a stack, and use no precedence as a placeholder.