in reply to Re^2: Question on simple arithmetic using perl
in thread Question on simple arithmetic using perl
I'm not quite sure what the question is:
#!/usr/bin/perl -w use strict; my $all_bits_are_on = -1; printf ("all_bits => %X\n", $all_bits_are_one); my $x = $all_bits_are_on + 1; print "Adding -1 to +1 is: $x\n"; __END__ all_bits => FFFFFFFF Adding -1 to +1 is: 0
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Question on simple arithmetic using perl
by zwon (Abbot) on Sep 29, 2011 at 02:20 UTC | |
by Marshall (Canon) on Sep 29, 2011 at 03:29 UTC |