There is a bug in the legacy compiler that causing this fault.
This bug will be fixed in the next release.
You have a small typo in the following lines:
Code:
' testing data
NR(0)=100
X(0)=52000.0
Y(0)=35000.0
For I=1 To 99
NR(I)=NR(I-1)+ 1
X(I)=X(I-1)+ 50. 'Remove the dots
Y(I)=Y(I-1)+ 60.
Next I
The solution is to use the much improved optimized compiler.