Return to Statement


Relative Minimum Distance Example

This example shows how an array is used to return the minimum distance between two solid blocks. The seventh position in the array "mindis" contains the distance.

   ENTITY/B1,B2
NUMBER/MINDIS(7)
$$
B1 = SOLBLK/ORIGIN,-2,-2,-2,SIZE,1,1,1
B2 = SOLBLK/ORIGIN,2,2,2,SIZE,1,1,1
$$
MINDIS = RELDST/B1,B2
$$
MESSG/'MINIMUM DISTANCE = ' + FSTR(MINDIS(7))
$$
HALT