with text_io; use text_io; procedure LinKer2 is s: constant STRING := "Hello World!"; c: constant CHARACTER := 'o'; p: NATURAL := s'FIRST-1; v: BOOLEAN := (s'LENGTH=0); l: BOOLEAN := false; function Talalt ( s: STRING; c: CHARACTER; pos: POSITIVE ) return BOOLEAN is begin return ( s(pos) = c ); end Talalt; begin while (not v) and (not l) loop v := (p+1 >= s'LAST); l := Talalt(s,c,p+1); p := p+1; end loop; if l then Put_Line("megvan..."); else Put_Line("nincs..."); end if; end LinKer2;