On 29/04/11 04:52, Serge Stinckwich wrote:

and in Smalltalk :

6/2*1+2
=>  5

but :

2+6/2*1
=>  4

Any ideas why ?


Yes, because in Smalltalk all binary operators have the same precedence (which is less prioritary than unary operators).

--
Nguyễn Hải Nam

Thông tin công nghệ http://www.thongtincongnghe.com/
_______________________________________________
POST RULES : http://wiki.hanoilug.org/hanoilug:mailing_list_guidelines
_______________________________________________
HanoiLUG mailing lists: http://lists.hanoilug.org/
HanoiLUG wiki: http://wiki.hanoilug.org/
HanoiLUG blog: http://blog.hanoilug.org/

Trả lời cho