Perfect Developer tutorial | This page last modified 2011-10-29 (JAC) |
1. Which of the following are valid identifiers in Perfect?
(b) is not valid because it begins with a digit.
(f) is not valid because value is a reserved word in Perfect.
(h) is not valid because it contains a character that is not a letter, digit or
underscore.
The remainder are valid identifiers.
2. Rewrite the following fragment of Perfect, removing some of the redundant white space:
The only white space that is really needed is the space between the reserved
word function and the identifier square;
so with all redundant white space removed, the fragment looks like this:
function square(x:int):int^=x*x;
To improve readability, it is best to retain some of the redundant white space,
e.g.:
function square(x: int): int
^= x * x;