dprocedure ProzkoumejStav( stav: string ); begin case pos( ' ', stav ) of 1: begin PridejDoFronty( stav[2]+stav[1]+stav[3]+stav[4]+stav[5]+stav[6] ); PridejDoFronty( stav[4]+stav[2]+stav[3]+stav[1]+stav[5]+stav[6] ); end; 2: .... 3: .... 4: .... 5: .... 6: .... end; end; begin NactiVstupniStav( stav ); PridejDoFronty( stav ); while FrontaNeniPrazdna do begin VyberStavZFronty( stav ); ProzkoumejStav( stav ) { hned skonci, pokud najde cilovy stav } end end. var f: text; s: string; begin assign( f, 'text.txt' ); reset( f ); while not eof(f) do begin readln( f, s ); writeln( s ) end; close( f ) end. var f: text; begin assign( f, '170110.pas' ); append( f ); writeln( f, '{ ------ KONEC ----- }' ); close( f ) end. var CHYBA: procedure (typ: string; hlaska: string); {$F+} procedure Hlaseni(typ: string; hlaska: string); begin writeln( typ,': ', hlaska ); end; {$F-} procedure HlaseniSKoncem(typ: string; hlaska: string); begin writeln( typ,': ', hlaska ); halt(1) end; procedure NeHlaseni(typ: string; hlaska: string); begin end; var i: integer; begin CHYBA := Hlaseni; CHYBA := HlaseniSKoncem; CHYBA := NeHlaseni; for i:=1 to 7 do begin write( i, ' ' ); if i=5 then CHYBA( 'chyba', 'promenna i nikdy nesmi byt pet!!!' ) end end. type funkce = function (x: real) : real; procedure VytiskniTabulku( zac,kon,krok: real; f: funkce ); var x: real; begin x := zac; while x <= kon do begin writeln( x:10:2, f(x):10:2 ); x := x + krok end end; {$F+} function sinus( x: real ): real; begin sinus := sin( x ) end; function cosinus( x: real ): real; begin cosinus := cos( x ) end; var f: funkce; begin if random > 0.5 then f := sinus else f := cosinus; writeln( 'f:' ); VytiskniTabulku( 0, PI, PI/10, f ); { writeln( 'sinus:' ); VytiskniTabulku( 0, PI, PI/10, sinus ); writeln( 'cosinus:' ); VytiskniTabulku( 0, PI, PI/10, cosinus ) {} end. const PISMENA = ['a'..'z','A'..'Z']; var c: char; s: string; begin c := '?'; while not( c in PISMENA) do begin read( c ) end; while c in PISMENA do begin s := s + c; read( c ) end; writeln; writeln( '>',s,'<' ) end. var M,N: set of byte; begin M := [1] + [20..35]; N := [15..25]; M := M - N; M := M * [2..255]; end.{ ------ KONEC ----- }