if ($a==1) {
print "A is 1!";
} else {
print "A is not 1!";
}
Cool, huh?
public class !CondOpTest? {
public static void main(String[] args) {
}
public !CondOpTest?(Integer a) {
if (a.intValue()==1) {
System.out.println("A is 1!");
} else {
System.out.println("A is not 1!");
}
}
}
public class !CondOpTest? {
public static void main(String[] args) {
}
public !CondOpTest?(Integer a) {
System.out.println((a.intValue()==1 ) ? "A is 1!" : "A is not 1!");
}
}
In Perl, however, things are slightly different.
No page links to TernaryOperator.
lib/main.php:944: Notice: PageInfo: Cannot find action page
lib/main.php:839: Notice: PageInfo: Unknown action
lib/plugin/WlugLicense.php:99: Warning: Invalid argument supplied for foreach()