This section introduces the ``built-in'' VCV data classes as used in the vcv:type attribute. The class names are case sensitve, even if your VCV programming language is not.
This is just a string containing any data passed to VCV. Using String as content type and omitting a vcv:type declaration is the same.
This is a string that can be converted to a numerical value.
This class is more specific, because the Number must not be an integer value.
Numbers starting with a
- are treated as negative, without a
- or with a leading
+ they are treated as positive.
This one defines a floating point value as known from many programming languages:
The value may start with a leading
+, some (or even none) digit before the decimal point, maybe some trailing digits and at least there could be an exponent.
See the following examples for details:
1. = 1.0,
.17 = 0.17,
1.E4 = 10000,
.5E1 = 5,
-5.23E-17 = -5.23*10^-17 or even
-5.23*10^-17 meaning exactly this.
This is a special case of Float: It has only two digits after the decimal point.
This is a string representing a date;
it currently supports the forms
YYYY-MM-DD (see SQL Date),
MM/DD/YYYY (english notation),
DD.MM.YYYY (german notation).
This is a string representing a timestamp.
The time may be written in the following ways:
As Unix timestamp (32 bit signed integer), as seen on most clocks
hh as the hours and
mm the minutes and in the form
hh:mm:ss with seconds.
This is a combination of Date and Time with a blank space between the Date and the Time part, such as
This is a string of the form
YYYY as the year,
MM the numerical value for a month and
DD the months day.
This is an alias for Time
As Date-Time, this is the combination of SQL Date and SQL Time.
You can also add your own classes to the VCV classes repository by writing a either a (perl) regular expression or a validation function for it.
Take the following example:
We would like to use a content class named BrowserVersion that recognizes values like
A RegExp for this would be
So you only need to call the VCV method
registerClass() and VCV will use your class like any of the built-in ones:
If you cannot describe the class using a single regex, you write a validation function that performs certain checks on the submitted value:
(Implementations that do not allow function overloading may rename both versions of
This document: $Id: vcv-classes.pod,v 1.1 2005/07/22 16:28:03 robertbienert Exp $
See http://vcv.sourceforge.net/spec/ for the latest revision.