is( t: u0 _& @3 i4 S
obj : object; -- first carbody in store. @, j& O& U( @% z8 J# `' w- X
found : boolean; -- found a chassis" D* q3 C2 ]1 a, C
counter : integer; -- position in store + f& D6 I. q! ?6 z" Ldo 4 ?* ~% a! P2 H7 Y& t -- make sure there is a carbody in the store 3 b$ j3 x: t$ T& _8 Z if not StoreCarbody.empty() then [% s% B4 `- J0 k* N/ k9 Q
found := false;$ u. {) b1 M# b2 F! i
counter := 1; 3 {- c& E; R4 n* s8 j) Y 7 l4 s% M' X0 P" h; [2 W* d7 s
-- iterate through the store 9 [; J7 q7 {( N g- ~6 [/ V while not found and counter <= StoreCarbody.xDim loop" a6 a( b$ p8 _ ^, A' F) X. `& w
obj := StoreCarbody.pe(counter,1).cont;4 L/ ~4 `4 P9 n
if(obj /= void) then! U. z- }8 x' z! V/ k
found := true;& k) A% O& ?* I) f, g: g* p
end; -- if ! n' ?2 {' A* W6 a; e6 X4 ~1 Z counter := counter + 1;2 S8 q" O. V9 U& F5 b& j2 U
end; -- while; {3 S% F( A! W& G1 }* x5 ]
0 Z4 S, r) c( G# y* O if found then, i7 V4 N8 z$ E# Y" @# `
-- put the carbody on a skid b' u$ ], e& [) S
obj.move(@);9 W# ]& H" E/ M& c! F- Y
end; -- if/ ^6 D. D" d _* |8 p: J& c
end; -- if not StoreCarbody.empty . K) L1 }# L$ Cend; ' m" b" t% ^5 V' j& u) X里面的found急整个循环不太懂,求高手讲解下?急~~~~