< Previous | Contents | Manuals Home | Boris FX | Next >
โand rules about "whole an object" ๏พsee the bonuses? Q: Create a less redundant version using otherwise or return. A: In this first one, the first otherwise is important. Try leaving it out.
define a procedure to say the sign of a number.
if the number is greater than zero, say "it's positive". otherwise if the number is less than zero, say "it's negative". otherwise, say "it's zero".
done.
define a procedure to say the sign of a number.
if the number is greater than 0, say "it's positive" and return. if the number is less than 0, say "it's negative" and return. say "it's zero".
done.
For each version, or your own, say the sign of 2, say the sign of 0, and say the sign of -5.
For an example of similar rules, see the rules about x polarity .
ยฉ2025 Boris FX, Inc.ย โย UNOFFICIALย โย Converted from original PDF.