Introduction Introduction This chapter describes the data typeseV+ used by eV+. Dynamic Data Typing and Allocation eV+ does not require you to declare variables or their data types. The first use of a variable determines its data type and allocates spaeV+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 Omron Adept cannot be used. The eV+ Language Reference Guide lists the basic keywords reserved by Omron Adept. If you have ACE Sight, The ACE Sight 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. The following are all valid variable names: 4. Only the first 15 characters in a variable name are significant. 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 eV+ with an error message. The extra- long name is truncated (without warning) to: this_is_a_long_. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 39