Skip to main content

Multiple Purpose Characters

There's just one more interesting thing to point out before we move on to the next exercise. You may have noticed that ObjectScript uses certain characters for multiple purposes. Here's a summary:

Character Purposes
? Tab for Write. Pattern Match operator (covered later).
: (colon) Timer for Read. Post-condition for all commands. Counter specification for For.
# Fixed-length for Read. Modulo operator for arithmetic expressions.
. (period) Object.member separator (covered later). Range specifier for Pattern Match operator (covered later).
^ (caret) Routine prefix for Do. Global prefix (covered later).
FeedbackOpens in a new tab