Jump to content

Sigil (computer programming)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Gwalla (talk | contribs) at 02:12, 11 February 2005. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

In computer programming, a sigil is a symbol attached to a variable name, showing the variable's datatype.

The use of sigils was popularized by the BASIC programming language. The best known example of a sigil in BASIC is the dollar sign ("$") appended to the names of all strings. Other sigils existed for integers and floating point numbers, and sometimed for other types as well.

Larry Wall adopted BASIC's concept of sigils for his popular scripting language Perl. However, as Perl is a weakly typed language, the sigils specify not datatypes such as strings and integers, but general categories such as scalars, lists, and hashes.

See also