For everything that's not in any way related to PureBasic. General chat etc...
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Thu Mar 21, 2013 1:34 pm
Code: Select all
Debug e-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------5
freak
PureBasic Team
Posts: 5948 Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany
Post
by freak » Thu Mar 21, 2013 9:44 pm
So what? It's a correct expression.
quidquid Latine dictum sit altum videtur
Psychophanta
Always Here
Posts: 5153 Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:
Post
by Psychophanta » Thu Mar 21, 2013 9:48 pm
Just offtopic-ing!
anyway i ask myself why if replace '-' by '+' it does not work
eesau
Enthusiast
Posts: 589 Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland
Post
by eesau » Thu Mar 21, 2013 10:15 pm
Because your expression is e minus (lots of unary minuses) 5. There is no unary plus operator.
Shield
Addict
Posts: 1021 Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:
Post
by Shield » Thu Mar 21, 2013 10:19 pm
Mathematically speaking it's wrong as it's not allowed to have two operators next to each other.
Why is it allowed and why aren't multiple + operators allowed? Because it's PureBasic.
Simple as that.
eesau
Enthusiast
Posts: 589 Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland
Post
by eesau » Thu Mar 21, 2013 10:28 pm
The expression is actually evaluated as (shortened here) e-(-(-(-(-(-5))))) which is perfectly valid, even in mathematics.
Shield
Addict
Posts: 1021 Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:
Post
by Shield » Thu Mar 21, 2013 10:52 pm
...of course I was talking about PB's implementation.
It doesn't matter how it's interpreted, the notation is still wrong.
And I'm not saying it bothers me (as I would never write it like that because it simply doesn't make sense to do so).