User`s guide
Introduction
This chapter describes the data typesV+ used by V+.
Dynamic Data Typing and Allocation
V+ does not require you to declare variables or their data types. The first use of a variable
determines its data type and allocates spaV+ce for that variable. You can create variables
and assign them a type as needed. The program instruction:
real_var = 13.65
creates the variable real_var as a real variable and assigns it the value 13.65 (if the real_var
had already been created, the instruction will merely change its value).
Numeric, string, and transformation arrays up to three dimensions can be declared
dynamically.
Variable Name Requirements
The requirements for a valid variable name are:
1. Keywords reserved by Adept cannot be used. The V+ Language Reference Guide lists
the basic keywords reserved by Adept. If you have AdeptVision, The AdeptVision
Reference Guide lists the additional reserved words used by the vision system.
2. The first character of a variable name must be a letter.
3. Allowable characters after the first character are letters, numbers, periods, and the
underline character.
4. Only the first 15 characters in a variable name are significant.
The following are all valid variable names:
x
count
dist.to.part.33
ref_frame
The following names are invalid for the reasons indicated:
3x (first character not a letter)
one&two (& is an invalid name character)
pi (reserved word)
this_is_a_long_name (too many characters)
All but the last of these invalid names are rejected by V+ with an error message. The extra-
long name is truncated (without warning) to:
this_is_a_long_.
Introduction
(Undefined variable: Primary.Product_Name_V)Language User's Guide, version
17.x
Page 99










