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 & Date Manipulation
  8. Conference List Information
  9. Conference Organizer Information
  10. Person Information
  11. "My" Information
  12. Groups of People
  13. Item Information
 
  1. Response Information
  2. Adding Items & Responses
  3. Text Filters
  4. Conference, User, Item, Site Variables
  5. Searching Conference Text
  6. CML Page Functions
  7. Manager Functions
  8. Password Functions
  9. Debugging Functions
  10. Array Manipulation
  11. Authentication & Authorisation
  12. SQL interface
  13. Caucus 5.0 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".