Statements > Miscellaneous > Add Comment

Add Comment

Tags:  

Table of Contents  [ Hide]

Add Comment

Add comments to your deluge scripts to document your script and enhance code readability. The Comment line is prefixed with a //.

Syntax

//<comment>;

Example

In the following example, the comment tag explains the code in detail.

 Age
(
type = number
)
on submit
{
// checks if the age specified is less that 20 or greater than 100
if (input.Age < 20) && (input.Age >100)
{
// displays the specified alert message if validation fails and cancels form submission
alert "age should be between 20 to 100";
cancel submit;
}
}


To add a comment line in script builder, use the Add comment task as shown in the screen-shot below. Click on the Edit button and specify the comment text.



0 Comments  Show recent to old
Post a comment


 RSS of this page