[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Ruby arithmetic question.

Axel Etzold

6/16/2007 3:16:00 PM

Salai,

welcome to Ruby!
You're right - 2**2 is 2 to the power of 2.

Best regards,

Axel

-------- Original-Nachricht --------
Datum: Sun, 17 Jun 2007 00:02:16 +0900
Von: "Salai Khine" <sayakyi@gmail.com>
An: ruby-talk@ruby-lang.org
Betreff: Ruby arithmetic question.

> Dear all,
>
> I am very new to ruby language. I have some question in Ruby arthmetic
> operation.
>
> Why did i get 2 ** 2 = 4 ??
>
> a = 2 ** 2
>
> puts a
>
> --> 4
> Why ?
>
> It is like 2 ^ 2 = 4 ???
>
> regards,
> salai.

--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/mult...