-
Notifications
You must be signed in to change notification settings - Fork 0
General Syntax
Kameron Brooks edited this page Nov 14, 2018
·
5 revisions
A CCL script is a collection of statements. In general, each statement ends with a semi-colon ;
. The semi-colon is mandatory.
var temp = 0; // Correct: has a semi-colon at end
var temp = 0 // Incorrect: missing semi-colon
Newlines and Indentation are recommended for readability, but are not mandatory. All white space is ignored by the lexer.
if (x == 5) {
return x + 5;
}
is the same as:
if(x==5) {return x + 5;}
This is also technically valid, even though it is hideous:
if(x==5) {return x
+ 5
;}
I really don't recommend that last style though...
Comments begin with //
and are all line comments
// This is a comment
bool notComment = true;
Comments are the only place where a newline matters, a newline character ends a comment
Questions? Comments?
Contact me at [email protected]
Follow on Twitter: @wasteland_11
Copyright 2019 © Kameron Brooks