is1 z W6 t3 W) }2 g# P4 h: [
obj : object; -- first carbody in store; r8 x3 p/ }4 c
found : boolean; -- found a chassis! M L) D6 N3 E# R
counter : integer; -- position in store ; F8 j0 n$ p1 ^ @do 5 y: l2 }! h/ a. _. x% P) Q
-- make sure there is a carbody in the store+ ^1 {: r: M! s7 R
if not StoreCarbody.empty() then6 L* T! y2 W7 R% J
found := false; ; W0 X( j( M- l* y6 @+ g3 h counter := 1; 2 u* O, B. F* a, o/ G1 | * X2 {- O$ ]5 R' g -- iterate through the store( E! ~& m8 H+ [& R5 ?7 _
while not found and counter <= StoreCarbody.xDim loop/ y6 n$ t. s2 A \) K5 S
obj := StoreCarbody.pe(counter,1).cont;6 q1 \$ z; S; w: f
if(obj /= void) then & o$ A1 J" r* O8 C3 _; n found := true;7 d! [! E) \6 X, _) ~
end; -- if 7 }5 y# d# K$ ` counter := counter + 1; ; V, ~$ O7 O2 z. W% r0 [) f end; -- while* o W4 a4 @9 Y" K5 V' h
5 b$ o: S! C( O4 [4 B! Q- s; q- ^
if found then/ F1 W. F: t* {; _
-- put the carbody on a skid 8 `4 A" V4 T+ g d obj.move(@);1 l/ U& r; h! [3 E' w" F/ [9 V
end; -- if0 c/ Q* z! w+ J4 w8 ]8 ?- c5 Z
end; -- if not StoreCarbody.empty 0 \2 L. R g1 a o+ h$ b" o jend; + k! f% v9 s% b0 F3 W5 R9 J里面的found急整个循环不太懂,求高手讲解下?急~~~~