IF not condition THEN GOTO 10
I = 1
GOT0 20
10
I = 2
20
####
INTEGER II;
IF condition THEN
II = 1
ELSE
II = 2
ENDIF
####
int i = ( condition ) ? 1 : 2;
####
{
my $temp = $a[ $i ];
$a[ $i ] = $a[ $j ];
$a[ $j ] = $temp;
}
####
@a[ $i, $j ] = @a[ $j, $i ];
####
sub isleap {
my ($year) = @_;
return 1 if (( $year % 400 ) == 0 ); # 400's are leap
return 0 if (( $year % 100 ) == 0 ); # Other centuries are not
return 1 if (( $year % 4 ) == 0 ); # All other 4's are leap
return 0; # Everything else is not
}
####
not $year % 4 xor $year % 100 xor $year % 400;