-
order of operations...
(), []
new
.
++, - -
- (unary), + (unary), !, ~, ++, - -, (type)
*, /, %
+, -
<<, >>, >>>
<, >, <=, >=, instanceof
==, !=
&
^
|
&&
||
?:
=, *=, /=, %=, -=, <<=, >>=, >>>=, &=, ^=, |=
that is the correct order of operations, right? I want to make sure it's in the right order and that I'm not going crazy
-note-
I pulled this from a Java site, because it's the first one that came up when i searched google, so there's some odd operators in there
-
Here's a C version for ya.
-
awesome, thanks.
I've almost got my new stack-based parser finished for OST2 Release #10! It's going to make the language run so much faster. Just have to implement && and || and then I have to get variables and functions working in the parser and I'll have a new, incredibly fast math parser!
As opposed to the string-based parser I use right now which basically runs through the string (IE: "3+3*(522/42)-var1") over and over every time, the new parser will precompile the statement in to an operator stack that can be processed insanely fast.
(PS: Look for Release #10 of OST2 coming in the next month or so!)