View Source Document

README.markdown

Version

Copyright ©2001-2010 Cat's Eye Technologies. All rights reserved.

What is Version?

Version is a programming language based on the concept of ignorance-spaces. An ignorance-space is represented by a pattern (irregular expression.) All instructions in a Version program have a tag or label. Instructions with labels which match the current ignorance-space are ignored. Other instructions are executed sequentially. When the last instruction is reached, execution wraps around to the beginning of the program. The only way to halt a program is to put it in a state in which all instructions will be ignored.

Other than this ignorance-space, there are no jumping or conditional execution mechanisms in Version.

Instructions

Each Version instruction must occur on its own line of source code, and looks like:

label: destination = expression

The label is a string. The destination is the name of a variable, or a special destination name listed below. The expression may be made up of prefix operators, string variables, and special expression terms, listed below.

The result of executing an instruction is that a message containing the expression is sent to the destination. If the destination is a variable, this generally results in the state of the variable changing. This may not however hold true under all conditions - future extensions to Version may add further effects under prescribed conditions.

Special Destinations

Special Expression Terms

Functions

Ignorance-Spaces

The current ignorance-space is accessed through the keyword IGNORE, whether as a destination or as a term in an expression.

The ignorance-space is defined by an irregular expression, which is encoded in a string. An irregular expression is like a regular expression in that it contains special wildcard characters. The wildcard characters resemble those used in MS-DOS.

Any characters, except :, are allowed in labels, which are case sensitive. The characters *, ?, and |, if used, cannot be matched literally (use ? to match them, or don't use them - for simplicity, wildcard characters cannot be "quoted".)

So DOG|CAT would match DOG or CAT but not cat or antelope or seahorse. But a*e would match antelope. As would a?t?l?p?.

Conventions

For reasons that are not well known, the common filename extension for Version source files is _7% (underscore, seven, percent sign).

Each source line which does not even contain a colon is treated as a comment.