is! V( S# b. {: ]7 C4 d
obj : object; -- first carbody in store% J3 c2 q' Z5 p+ O& B$ w( u$ w
found : boolean; -- found a chassis7 w3 s7 S& {/ _1 j3 l+ z8 X, r
counter : integer; -- position in store ( Y& z% ?% i* e# `: Ido ; [) u2 n; E c4 [9 L -- make sure there is a carbody in the store& K. o" D0 d( E% Y0 w; P/ [
if not StoreCarbody.empty() then. u' f5 P8 L Q4 g/ e, L: M
found := false;) h$ J4 s9 ]. d8 Z
counter := 1; }& ]9 N8 j" V. b9 n, j( s6 J - x( t _, x- k( Z/ z -- iterate through the store " j& o- e) f4 R" a* M while not found and counter <= StoreCarbody.xDim loop 5 c; I( n1 }( e. } obj := StoreCarbody.pe(counter,1).cont; , L6 l( y1 `7 r" R0 @ }' ~ p% G if(obj /= void) then5 w4 ]5 h9 V0 K8 z1 }& s: d4 L% K
found := true;1 ~" e) m! k8 {; z3 }$ q+ b
end; -- if& h. I j: h4 z9 ?) Q* j$ T8 @" i
counter := counter + 1; 8 ~$ j& Y- k2 g2 ^ u) d end; -- while/ o8 c5 G5 M& p( n( ?; B# ~
/ W* Z% S" n9 ~8 X
if found then 9 P1 P4 H8 n. k -- put the carbody on a skid8 z! b% G# R8 {& k% S
obj.move(@);% j' W2 t) Q' x/ J/ S/ e
end; -- if 1 W+ ? K0 r4 Y2 |$ r: G! f* n end; -- if not StoreCarbody.empty4 m) a; o9 [, r
end;' S! i6 n2 ^. K6 D
里面的found急整个循环不太懂,求高手讲解下?急~~~~