Comments

Expressions support comments. Comments are very useful for telling the user (and yourself) what the code is doing. Commented text will not be executed or checked for errors. Comments are saved as part of the expression.

The Expression command supports two types of comments:

 

Type

Description

//

Comments everything to the right on the same line.

(* *)

Comments everything between the starred brackets. This comment type cannot be nested. For example, (* (* sample comment *) *) will be an error.

 

Example 1

IF _Axis[0].ActPos> 20.0 THEN    //This is a comment.

MyREAL:= 92;                        //This is a comment, too.

END_IF

Example 2

MyREAL1 := 34.0;          (*This is a comment*)

MyREAL2 := 70023.0;     

(*This is a multi-line comment

that spans multiple lines *)

MyDINT := 2;

 

See Also

Expressions Overview


Send comments on this topic.

Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion