Code Comments

Top  Previous  Next

 

Either a semi-colon or an asterisk may be used to denote the beginning of a comment. A comment may be a on separate line by itself or it may share a line with a script command; assuming the script command appears first. All comments run from the point they begin until the end of the line.

 

Consider the following examples of valid script file comments:

 

; Log on to an FTP site

FTPLOGON

 

* this is a comment line

MESSAGEBOX "hello world"

DIALNET "My Connection" ;; use Dial-Up Networking

 

Any text appearing after a semi-colon or asterisk character on a line is a comment. This may cause unintended consequences. Consider the following example:

 

FTPLOGON "192.168.1.15" /user=Robo /pw=secr*t /servertype=FTPS

 

The line above will fail because the password contains an asterisk character so the command parser will treat the remainder of the line as a comment. The issue may be resolved by using quotes as follows:

 

FTPLOGON "192.168.1.15" /user=Robo /pw="secr*t" /servertype=FTPS