Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Vb
Function Square(x As Integer) As Double
    Return x ^ 2
End Function

The exponentiation operator is compiled as a Math.Pow() call for numeric types.
Function Square(x As Integer) As Integer
    Return x * x
End Function
function Square (X : Integer) return Integer is
begin
   return X * X;
end Square;

New implementation...
< >
programming-idioms.org