www.kxcad.net Home > CAM Index > EdgeCAM Index >
You must be aware of the data types required and in use. Any expression or subdivision of an expression evaluated will be created as an appropriate data type (Real/Integer/String). The final data type will depend on the variable being set.
If an expression contains mixed types the following order of preference will be followed
Any expression with a string variable will be evaluated as a string
Any expression with a real number but no strings will be evaluated as a real.
You are advised not to mix data types unless there is a pressing need to do so as the results can be difficult to predict.
When a real number is converted to an integer this is done by truncation, i.e. 3.4 becomes 3, 5.9 becomes 5, -6.4 becomes -6, and -5.9 becomes -5.
Expression Types
Note that attributes and expressions may be integer, real or string and that mixing types must be undertaken with care:
|
Integer & integer |
gives integer result |
|
Integer & real |
gives integer result |
|
Real & integer |
gives real result |
|
Real & real |
gives real result |
|
String & integer |
gives string result |
|
String & real |
gives string result |
|
String & string |
gives string result |
|
|
|
Click here for examples of expressions, setting attributes/modifiers