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).

The expression "1\2*3" is not really ambiguous, it is only for Gambas 
(don't ask me why); it should be seen as "take an integer number, 
integer-divide it for another integer number, and multiply the result 
for another integer number, giving an integer result".

About integer division, there are other reasons apart from wanting an 
*integer* division: for example is faster.

Regards,
Doriano


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to