CML Reference Guide

Chapter 4: CML Functions

[TOP] [PREV] [NEXT]

CML contains a large number of functions, which provide much of the power of the language.  They are grouped by category and described in the subsections listed below:

  1. CML state functions
  2. Browser & Server Information
  3. File Access
  4. Shell Access
  5. Comparisons & Logic
  6. Mathematics
  7. String Manipulation
  8. Conference List Information
  9. Conference Organizer Information
  10. Person Information
 
  1. "My" Information
  2. Groups of People
  3. Item Information
  4. Response Information
  5. Adding Items & Responses
  6. Text Filters
  7. Conference, User, Item, Site Variables
  8. Searching Conference Text
  9. CML Page Functions
  10. Manager Functions
  11. Password Functions

CML functions serve several purposes:

  1. Extract data (from the Caucus conference database) for display.

  2. Manipulate or compare data (such as addition, subtraction, testing equality, etc.)

  3. Put new data back into the Caucus database.

  4. Maintain "state" information between CML pages.

The syntax of a function must always be "$name(arguments)".  There must be no spaces between "$" and "name".  Spaces may be used freely around the "(" and ")".  Anything (including spaces or other functions) may be in the arguments.  Some functions have no arguments.

If you wish to display a "$" in your HTML text, and not have it be confused with a CML function, escape it with a preceeding "\", i.e. "\$".

CML variables

CML supports one type of variable, that contains arbitrary string data.  To get the contents of a variable (called "evaluating" a variable), you use a syntax similar to function evaluation:

This means "evaluate the variable name, and place its value here".  For more information about variables, see the CML directives "for", "count" and "set".