Next / Previous / Index / ITC Help System / Publications / Site map / NM Tech homepage

Using csets to describe sets of characters in Icon

Tech Computer Center logo

Before we look at Icon's functions for analyzing strings, we must first understand the idea of the cset, which is a basic Icon type that describes sets of characters.

Csets are for describing generic types of characters, such as ``letters,'' ``digits,'' and ``punctuation marks.'' Mathematically, a cset is a subset of the external character set (such as ASCII).

For example, suppose we want to talk about ``delimiter'' characters, where a delimiter is either a period, comma, or slash. This Icon statement would define a variable called delim as this cset:

    delim  :=  '.,/';
Characters written between single quotes ('') define a cset. A number of csets are predefined in Icon:
Next: Analyzing strings with Icon
See also: Using strings in Icon
Previous: Selecting a substring in Icon
Site map
Index: Keyword index to help pages
Help: New Mexico Tech Information Technology and Communications: Help System
ITC Publications
To report a problem: File a ticket
Send mail to the User consultant on duty or call them at 575-835-5437
Home: About New Mexico Tech

John Shipman, john@nmt.edu
Last updated: 1996/01/06 21:12:57 UT
URL: http://www.nmt.edu/tcc/help/lang/icon/simplecset.html
QR two-dimensional bar code