代码大全

(singke) #1
Boundary: Integer; { upper index of sorted part or array }
InsertVal: String; { data elmt to insert in sorted part of array }
InsertPos: Integer; { position to insert elmt in sorted Part Of array }

for i := 1 to MaxElmts – 1 { fixed error #A423 10/1/92 (Scm) }

while if


/* swap the roots */

OldRoot = root[ 0 ];
root[ 0 ] = root[ 1 ];
root[ 1 ] = Oldroot;

{ check each character in 'InputStr" until a dollar sign
is found or all character have been checked }

Done := False;
MaxLen := Length( InputStr );
i := 1;
while ( ( not Done ) and ( i <= MaxLen ) )
begin
if ( InputStr[ i ] = ‘$’ ) then
Done := True
else
i := i + 1
end;
Free download pdf