is* D8 [2 p- K8 `9 k; i# B% o! d
obj : object; -- first carbody in store% i- c G) c- V; V9 Z; T! c
found : boolean; -- found a chassis7 k& R1 v5 S) h" {5 T( r
counter : integer; -- position in store" K; W1 e$ U7 W( L; h% m
do . h9 I; b& p6 Z5 ?, e+ H8 e -- make sure there is a carbody in the store I5 W# A; K P$ z( Y if not StoreCarbody.empty() then& y v% \2 d. E* D K) P, P6 G& ^
found := false; % L1 {; e" Y) u' G; i0 ^ counter := 1;% P! V- p: h/ A/ a
8 F6 _. B8 f( F -- iterate through the store2 R0 F2 F7 F8 x4 F
while not found and counter <= StoreCarbody.xDim loop 0 N/ X; @9 W0 U- x: T( _ obj := StoreCarbody.pe(counter,1).cont; $ Z1 Q$ R6 v; C7 d if(obj /= void) then! {# _ n) ?2 f1 N
found := true; : Z8 q/ ?! F7 E. L/ M; B* k) S1 I) {9 p end; -- if# I- K! k8 x3 o; ?& L7 i! ]
counter := counter + 1; ) a$ h& \. E4 _ end; -- while& P5 [! @" K. x# ?
, i2 r, h# s1 S; U* s1 d7 x
if found then, Y- A" q# c% c* |: K
-- put the carbody on a skid# O; t" h; p2 x
obj.move(@);1 m% E! ]0 ~, F) V5 O
end; -- if9 ]* j. D6 H3 [' z
end; -- if not StoreCarbody.empty " H7 h6 w3 L7 _" ^9 a3 Qend;5 |* ]( g$ A* n; R
里面的found急整个循环不太懂,求高手讲解下?急~~~~