is 4 C* G8 g2 d+ k* P% g! R. O obj : object; -- first carbody in store9 W/ `4 w" `3 p3 J
found : boolean; -- found a chassis * }$ m- H- d# o counter : integer; -- position in store2 z j; U; k$ B$ z) L1 ?3 I! b
do 6 i: Q: [1 ?5 c* w -- make sure there is a carbody in the store8 D8 i! |/ S* s& _2 R Q1 u2 p
if not StoreCarbody.empty() then - ^8 P% [7 k0 e& R3 e" ]* { S found := false; : Q7 T+ S; p, z! m counter := 1; 4 _0 @5 s5 w; m3 i; ^' ?% a- J# N# z " o3 M2 X' z/ s. Q, ^: l, Y -- iterate through the store! I( Q- A2 e0 [2 ]8 T! C
while not found and counter <= StoreCarbody.xDim loop 0 v& B& N; Y. G9 j: W obj := StoreCarbody.pe(counter,1).cont; 8 i* z4 C2 F- Y' x1 E8 f9 L3 z8 U if(obj /= void) then4 a/ H' K) s0 m$ v* r p3 y% g9 c
found := true; 1 F0 V1 B& d' c8 H/ l0 D' F& E end; -- if 6 Q F* P, T8 f- r! c" s counter := counter + 1; ' u+ G) S- `+ I: F end; -- while 6 P9 L. a4 q* G 0 a& M+ A# m0 u X0 ~' z& o1 f
if found then9 b9 y% X( g- K3 n4 \$ N. p8 s
-- put the carbody on a skid 5 n5 ]6 I3 ^+ E( ]( J obj.move(@); % N; b5 w: ]$ R: J( w; v( G end; -- if# \) V- m$ t" j' p0 {* P( w
end; -- if not StoreCarbody.empty' ] D' L. Y: ?, z/ f* Q* k- ]
end; * K2 c) ] ]4 K3 ^; ^里面的found急整个循环不太懂,求高手讲解下?急~~~~