home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <?xml-stylesheet type="text/xsl" href="transformations/cubedoc2xhtml.xslt"?>
-
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" lang="en" xml:lang="en">
- <head>
- <title></title>
- </head>
- <body>
- <h1>CubeScript Console Language</h1>
-
- <p>
- Cube's console language is similar to console languages of other games (e.g. Quake), but is a bit more powerful in
- that it is almost a full programming language.
- </p>
-
- <p>
- What is similar to quake is the basic command structure: commands consist of the command itself, followed by any
- number of arguments seperated by whitespace. you can use "" to quote strings with whitespace in them (such as the
- actions in bind/alias), and whereever a command is required you can also use ; to sequence multiple commands in one.
- </p>
- <p>
- What is new compared to quake is that you can evaluate aliases and expressions. You can substitute the value of an
- alias as an argument by prefixing it with a "$" sign, i.e.: <span class="code">echo The current value of x is $x</span>
- You can even substitute
- the values of console variables this way, i.e $fov gives the current fov. Some aliases are set automatically, for
- example $arg1 to $argN are set if you supply arguments when you execute an alias.
- </p>
- <p>
- There are two alternative ways to "" to quote a string: () and []. They work in the same way as "", with the difference
- that they can be nested infinitely, and that they may contain linefeeds (useful for larger scripts). () is different
- from [] in that it evaluates the commands contained in it _before_ it evaluates the surrounding command, and substitutes
- the results. () bracketed strings are called expressions, and combined with some commands made especially for
- "programming", you have a minimal language. See the <a href="reference.xml#section_CubeScript">reference</a>
- for information about those commands.
- </p>
- </body>
- </html>