
05-26-2001, 01:25 PM
|
|
Registered User
|
Join Date: May 2001
Location: Wherever I may roam
Posts: 86
|
|
|
?: is a C construct similar to the if statement. Graal doesn't support it as far as I know. Syntax is thus:
(condition) ? (true-statement) : (false-statement)
The ?: construct is more compact than the if statements. That code snippet you have there? I'll expand it into if's.
if (this.size == 1) {
this.speed = 1;
} else if (this.size == 2) {
this.speed = 1.2;
} else {
this.speed = 1.5;
}
|
__________________
WhoopA, the Official Kicker of Butts
--- No images. No clutter. Just pure, simple text.
"Thank you, thank you. Please, ladies, put your clothes back on... Not you Samus..." - Link from the BOTVGH
Everywhere I look, I see rabbits. Maybe I should take down all my Sailor Moon stuff.
|
|
|
|