[Contents][Index]

CQL Command Summary

This section contains a description of how to use the CQL (Chronological Query Language) commands available in OxCal.

Index guide

Each entry in the alphabetical list consists of the keyword in bold followed by the icon used to access the command from the Windows interface followed by a definition of the syntax of the command. For example the entry for the command R_Date is:
R_Date
syntax = R_Date [name] date [error];
indicating that the command can be accessed by dragging the icon from the selection tree. In the syntax the values in italics are descriptive rather than verbatim and items in square brackets [item] are optional. Thus possible forms of this command are:
R_Date OxA-1000 3000 30;
R_Date OxA-1001 3000;
R_Date 3000 30;
In general in the syntax the term command implies that any command can be placed here but there are frequently restrictions. For example the function C_Combine can only be used to combine calendar dates and so although the syntax is given as:
C_Combine
syntax = C_Combine [name] { command; command; ...;};
the following will give rise to an error message indicating incorrect nesting:
C_Combine test {R_Date 3000 30; R_Date 3010 30;};
whereas what is expected is:
C_Combine test {C_Date 1000 30; C_Date 1010 30;};

Entry of Values


Dates

Dates can be entered as integers or floating point numbers. Radiocarbon dates are always assumed to be `Radiocarbon BP'. Calendar dates are usually given as BC/AD by use of the minus sign so that -100 indicates 100BC whereas 100 indicates 100AD. By setting the relevant system option it is possible to write all calendar dates as `Calendar BP' where 100 would indicate 1850AD.

Doses

For the verb C_Date it is also possible to enter the dates in terms of luminescence accumulated doses. To do this the dose rate must first be defined using the verb Dose. Full scientific notation may be used:
Dose 1.5e-3;
If dose rates are to be used with C_Date they must be prefixed by the letter d so that you might have:
C_Date d1.23 d0.13;
Again scientific notation may be used.

Strings

Strings such as names or labels can simply be typed as they are if they contain no gaps:
R_Date OxA-3000 3030 50;
but normally they should be surrounded with quotation marks:
R_Date "Bone needle A" 3030 50;


Nesting of Commands

Most of the rules covering nesting are fairly obvious but the following points should be born in mind:

Multi-Plots

A multi-plot may contain any other command except that a plot cannot be nested within a plot.

Functions returning values

These are After, Before, Combine, First and Last. They can contain another one of their own type but cannot contain sequences and phases. For technical reasons D_Sequence also falls into this category.

The special functions C_Combine and R_Combine can only contain C_Date and R_Date respectively (plus the display orientated commands).

Sequences and Phases

The commands Sequence, Phase, TAQ and TPQ can be freely nested inside each other. The special case V_Sequence may contain Sequence or functions but not any of the other sequence and phase commands