- or download this
config = ''
fred = 42
fred == 42 ? config = 'k1' : config = 'k2'
print "config=#{config}\n"
- or download this
<?php
$config = '';
...
$fred == 42 ? $config = 'k1' : $config = 'k2';
echo "config=$config\n";
?>
- or download this
#include <stdio.h>
int main()
...
printf("config=%d\n", config);
return 0;
}
- or download this
fred == 42 ? (config = 1) : (config = 2); // this works
fred == 42 ? config = 1 : (config = 2); // also works
fred == 42 ? (config = 1) : config = 2; // syntax error