Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Perl
my $i = $s + 0;

Perl automatically converts numbers to strings, and strings to numbers, whenever required. This means the addition of 0 is strictly superfluous, it only indicates programmer intent.

+ always is addition, not concatenation.
I : Integer := Integer'Value (s);

New implementation...