help logoLON-CAPA Help


A script consists of several statements, separated by semi-colons. A statement is the smallest kind of instruction to the computer. Most problems will be built from several statements.

A script can contain comments, which are not interpreted as statements by the computer. Comments start with # and go to the end of that line. Thus, if a line starts with #, the whole line is ignored. Comments can also begin in the middle of a line. It is a good idea to comment more complicated scripts, as it can be very difficult to read a large script and figure out what it does. It is a very good idea to adopt some sort of commenting standard, especially if you are working in a group or you believe other people may use your problems in the future.

Variable names are case sensitive, must start with a letter, and can only consist of letters, numbers, and underscores. Variable names can be as long as you want.