is- s' A3 Z3 n$ n' {' {
obj : object; -- first carbody in store: p5 T& k8 \) ~' f/ ?* U5 [
found : boolean; -- found a chassis) B6 C- h% d9 k1 e" w; m- H/ e
counter : integer; -- position in store % G# |- S" s3 a( ?: tdo ( G% a9 y" ~" V. E+ H6 Y) L0 q+ @! S3 ^- W
-- make sure there is a carbody in the store( ?1 k7 F( O: v6 O5 J9 }/ ~
if not StoreCarbody.empty() then 4 c% u" O \ `# B9 \ found := false; 7 N2 a$ q' `! F# J' I! ~( ]' w' }( r counter := 1;3 }$ u* [. y1 Y; a
6 c0 G7 L9 |8 H, v( i( e -- iterate through the store ( G: J. l6 ]5 z' e$ _* \ while not found and counter <= StoreCarbody.xDim loop 6 a& Y0 r' k S7 [7 L9 O obj := StoreCarbody.pe(counter,1).cont;. g n6 c0 y( u. J- r
if(obj /= void) then, ]' M6 ]& d5 P% s! ~1 e
found := true; 4 z0 W( V9 V* T end; -- if 9 i, n4 A; q- }- M0 s3 H, Z counter := counter + 1; g8 j! g6 l$ Y2 z* K7 @) _. F. [
end; -- while! |2 t2 f) ]% v' `' x; s
9 Q( E" n' ~- B6 _! R& A* p if found then * [% B# B* O2 a8 T$ ^ -- put the carbody on a skid $ Y1 M2 u/ `) A# k, D& ^, @ obj.move(@);* p7 d# x+ p$ ?* D& u
end; -- if 7 y+ ^ Y% {) F) Z4 O& p end; -- if not StoreCarbody.empty6 I* k) F5 Z) I$ w' l
end; " t: C3 ^. k; A3 g% S8 ^9 T里面的found急整个循环不太懂,求高手讲解下?急~~~~