由于某种原因,我的变量被分配了看似错误的结果。
to generaRed
set numpoints number
set onlist (list points)
set xlist [xcor] of points
set ylist [ycor] of points
set vallist [value] of points
set onlist fput false onlist
set xlist fput 0 xlist
set ylist fput 0 ylist
set vallist fput 0 vallist
clear-drawing
if max xlist > max-pxcor - 1 or max ylist > max-pycor - 1 or min xlist < min-pxcor + 1 or min ylist < min-pycor + 1
[user-message "One or more coordinate values are outside the screen range. Please check your inputs and setup again"
stop]
ask points [ die ]
( foreach xlist ylist vallist [
[ x y v ] ->
create-points 1 [
setxy x y
set value v
set super? false
set hidden? false
face patch 0 0
set size 10
]
]
)
ask points with [not hidden?] [if distance min-one-of other points with [not hidden?] [distance myself] = 0
[user-message "Two or more active points have identical coordinates. Please halt, revise your inputs and setup again" stop]]
create-points 1 [set hidden? true set super? true setxy (min-pxcor + 1) (min-pycor + 1)] ; who numpoints + 1
create-points 1 [set hidden? true set super? true setxy (min-pxcor + 1) (max-pycor - 1)] ; who numpoints + 2
create-points 1 [set hidden? true set super? true setxy (max-pxcor - 1) (max-pycor - 1)] ; who numpoints + 3
create-points 1 [set hidden? true set super? true setxy (max-pxcor - 1) (min-pycor + 1)] ; who numpoints + 4
end
public E0m1 as long
Set DD = Workbooks("correct path")
DD.Activate
E0m1 = DD.Range("B36").Value '(cell value is 0.5)
E0m1 = 0.5