Hi!
This; 1\2*3
Yields this; Ambiguous expression. Please use braces
But if I write; 1/2*3
Then no problem.
Why? Is this planned behaviour?
Gambas 3 revision 2664 (old!)
Ubuntu 9.10 64bit
Jussi
--
Download Intel#174;
I really think yes.
Standard symbol for fractions is /, why should you use \?
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune
1/2 = 0.5
1\2 = 0
3\2 = 1
\ operator gives only integer part.
Jussi
On Wed, Mar 10, 2010 at 19:48, Alessandro Rinaldi
alerina...@linuxzogno.org wrote:
I really think yes.
Standard symbol for fractions is /, why should you use \?
Wow, interesting! Didn't know it :)
Thanks!
So, I really don't know what's the problem, have you tried using brackets?
--
Download Intel#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling,
Alessandro Rinaldi ha scritto:
I really think yes.
Standard symbol for fractions is /, why should you use \?
Backslash is integer division, and should yeld an integer result.
Slash is float division, and yelds a float number (this is Basic
syntax; other languages use different methods).
Alessandro Rinaldi ha scritto:
I really think yes.
Standard symbol for fractions is /, why should you use \?
Backslash is integer division, and should yeld an integer result.
Slash is float division, and yelds a float number (this is Basic
syntax; other languages use different methods).
Benoît Minisini ha scritto:
Alessandro Rinaldi ha scritto:
I really think yes.
Standard symbol for fractions is /, why should you use \?
Backslash is integer division, and should yeld an integer result.
Slash is float division, and yelds a float number (this is Basic
syntax;
Benoît Minisini wrote:
Alessandro Rinaldi ha scritto:
I really think yes.
Standard symbol for fractions is /, why should you use \?
Backslash is integer division, and should yeld an integer result.
Slash is float division, and yelds a float number (this is Basic
syntax; other
You are correct to not suppress it. The warning is correct.
The actual value of the numbers is not important.
The expression is ambiguous without the brackets.
5 \ (2 * 3) = 0
(5 \ 2) * 3 = 6
This is also ambiguous
5/2*3
5 / (2 * 3) = 0.8333
(5 / 2) * 3 = 7.5
This is