Chapter 9 Variables

Table of Contents
9.1 Use of Variables
9.2 Automatic Type Conversion
9.3 Variable Assignment
9.4 Variable Expansion
9.5 Undefining Variables
9.6 The $ Function
9.7 Variables Example

You can think a variable as a value which has been given a label; whenever you use the label, it is replaced by the associated value.

9.1 Use of Variables

Variables allow to work on symbolic names instead of raw values. As an example, you can define mail addresses, release versions, file names used in links etc. as variables. By doing so, you can change the definition once and see the changes spreading all over the site.

You can write a file leaving some parts of it as variables and define them before including it or pass them to it. You may also find valuable to create a number of files defining all these variables and include one of them at the beginning of every file. Such files can look like this:

// File standard.cws
language = "English";
version = "frames";

This manual can be downloaded from http://www.g-cows.org/.