4.12 Comments

Comments are lines that lead with a // and are drawn red in the editor of Xpressionist. Such lines can be used to make comments to your expression script to be able to read it at a later point, or when you save it to a library. When a line leads with // it will be ignored by the calculator of Xpressionist up until the next return:

// This line is a comment. It will be ignored by the plugin
// These can be used to comment your script.
// Such lines can also follow statements to comment them

Light_1.Position.X = Camera_1.Position.X; // this is a comment after a statement

You can also use the // as a switch to temporarily disable some portions of your expression code, when you want to work only on one aspect of your expression:

// The line below is a disabled statement and will not be executed by Xpressionist.

// Light_1.Position.X = Camera_1.Position.X;

To make comments that are longer than one line you can use this syntax:

/*

Everything between the above and below mark is a comment.

Such comments can contain more than one line.

*/

With this you can easily disable larger chunks of your expression script:

// The ten statements below are disabled:

/*

Bone_1.Pitch_X = Controller.Pitch_X;
Bone_2.Pitch_X = Controller.Pitch_X;
Bone_3.Pitch_X = Controller.Pitch_X;
Bone_4.Pitch_X = Controller.Pitch_X;
Bone_5.Pitch_X = Controller.Pitch_X;
Bone_6.Pitch_X = Controller.Pitch_X;
Bone_7.Pitch_X = Controller.Pitch_X;
Bone_8.Pitch_X = Controller.Pitch_X;
Bone_9.Pitch_X = Controller.Pitch_X;
Bone_10.Pitch_X = Controller.Pitch_X;

*/

Comments like this can be folded in the text editor of Xpressionist.

It is a good habit to make comments for all working and programming steps.

Xpresionsit 3.5