Difference between revisions of "MC-Basic:CASTLOCATION"

From SoftMC-Wiki
Jump to: navigation, search
(CASTLOCATION)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Languages|MC-Basic:CASTLOCATION}}
 
{{MC-Basic
 
{{MC-Basic
 
|SHORT FORM=
 
|SHORT FORM=
Line 14: Line 15:
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Version 4.9.11 and up.
+
Since Version 4.9.11
 +
 
 
|DESCRIPTION=
 
|DESCRIPTION=
Creates and returns a generic location-type point, using the robot type given by the second, long-type argument, whereas coordinate values are taken from the first argument. If the first argument is a scalar, the resulting point will be composed of identical coordinates. Using an array as first argument will result in a point composed of the first "number-of-coordinates" (determined by the robot type) array elements.
+
Creates and returns a generic location type of point, using the robot type given by the second, long-type argument, while coordinate values are taken from the first argument. If the first argument is scalar, the resulting point will be composed of identical coordinates. Using an array as the first argument will result in a point composed of the first "number-of-coordinates" (determined by the robot type) array elements.
  
 
|TYPE=
 
|TYPE=
Line 33: Line 35:
  
 
|LIMITATIONS=
 
|LIMITATIONS=
Only a single-dimension array can be used as argument.
+
*Only a single-dimension array can be used as argument.
 +
*Number of array elements must be equal or greater than number of coordinates.
  
Number of array elements must be equal or greater than number of coordinates.
+
|EXAMPLE=
  
|EXAMPLE=
 
<pre>
 
 
GenLocation = CASTLOCATION(0.5, TYPE_XYZ)
 
GenLocation = CASTLOCATION(0.5, TYPE_XYZ)
  
 
? CASTLOCATION(ArrayOf6Longs, TYPE_XYZR)  
 
? CASTLOCATION(ArrayOf6Longs, TYPE_XYZR)  
</pre>
+
 
  
 
|SEE ALSO=
 
|SEE ALSO=
 +
* [[MC-Basic:CASTPOINT|CASTPOINT]]
  
 +
* [[MC-Basic:CASTJOINT|CASTJOINT]]
 +
* [[MC-Basic:ROBOTTYPE| ROBOTTYPE]]
 +
* [[Point Type List|LIST OF ROBOT TYPES]]
  
 +
[[Category:MC-Basic:Points Handling|CASTLOCATION]]
 
}}
 
}}

Latest revision as of 02:04, 26 April 2017

Language: English  • 中文(简体)‎

Creates and returns a generic location type of point, using the robot type given by the second, long-type argument, while coordinate values are taken from the first argument. If the first argument is scalar, the resulting point will be composed of identical coordinates. Using an array as the first argument will result in a point composed of the first "number-of-coordinates" (determined by the robot type) array elements.

Syntax

<location_variable> = castlocation (<long_scalar_expression>, <long_expression>)

<location_variable> = castlocation (<double_scalar_expression>, <long_expression>)

<location_variable> = castlocation (<long_array>, <long_expression>)

<location_variable> = castlocation (<double_array>, <long_expression>)

Availability

Since Version 4.9.11

Type

Location

Scope

Configuration, Task, Terminal

Limitations

  • Only a single-dimension array can be used as argument.
  • Number of array elements must be equal or greater than number of coordinates.

Examples

GenLocation = CASTLOCATION(0.5, TYPE_XYZ)

? CASTLOCATION(ArrayOf6Longs, TYPE_XYZR)

See Also