Article View: pl.comp.lang.pascal
Article #92251Re: Turbo Pascal i znaki polskie
From: fatrix
Date: Tue, 06 Nov 2007 19:16
Date: Tue, 06 Nov 2007 19:16
50 lines
2432 bytes
2432 bytes
Użytkownik "Tomasz Minkiewicz" <Tomasz.Minkiewicz@interia.pl> napisał
> W czym tworzysz ten plik? W Notatniku?
Plik txt tak, a potem już w okienku konsoli podawany jest ciąg do
odnalezienia
> Może weź go po prostu pokaż, bo tak to trudno się
> domyślać.
Mam coś takiego:
...
const
tab1:array[1..18] of
char=(#164,#143,#168,#157,#227,#224,#151,#141,#189,#165,#134,#169,#136,#228,#162,#152,#171,#190);
tab2:array[1..18] of
char=(#165,#198,#202,#163,#209,#211,#140,#143,#175,#185,#230,#234,#179,#241,#243,#156,#159,#191);
....
while not (eof(plik)) do
begin
j:=1;
readln(plik, linia);
dlugosczdania:=length(linia);
repeat
for k:=1 to 18 do
if (linia[j]=tab2[k]) then linia[j]:=tab1[k];
if szukane[i]=linia[j] then
begin
inc(i);
inc(j);
if i>dlugoscszukana then
begin
inc(ile);
i:=1;
end;
end
else
begin
inc(j);
i:=1;
end;
until j>dlugosczdania;
end;
....
Pozdrawiam
fatrix
Technical Details
Message-ID:
<fgqek1$c59$1@atlantis.news.tpi.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.gazeta.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mailReferences:
<fg4bl0$hc5$1@atlantis.news.tpi.pl> <3299.00000007.4725c9d4@newsgate.onet.pl> <fgagog$chs$1@nemesis.news.tpi.pl> <fgf3h4$p0f$1@nemesis.news.tpi.pl> <fgfmrp$8fj$1@atlantis.news.tpi.pl> <fggdsb$jfb$1@atlantis.news.tpi.pl> <zvpuavrjfxvwxvryprubzrcy.jr22qb0.pminews@news.home.net.pl> <fgno6v$ff4$1@nemesis.news.tpi.pl> <4314526.SuDauV5BP3@tommink.pl>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.gazeta.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "fatrix" <fatrix@poczta.neostrada.pl> Newsgroups: pl.comp.lang.pascal Subject: Re: Turbo Pascal i znaki polskie Date: Tue, 6 Nov 2007 20:16:58 +0100 Organization: tp.internet - http://www.tpi.pl/ Lines: 54 Message-ID: <fgqek1$c59$1@atlantis.news.tpi.pl> References: <fg4bl0$hc5$1@atlantis.news.tpi.pl> <3299.00000007.4725c9d4@newsgate.onet.pl> <fgagog$chs$1@nemesis.news.tpi.pl> <fgf3h4$p0f$1@nemesis.news.tpi.pl> <fgfmrp$8fj$1@atlantis.news.tpi.pl> <fggdsb$jfb$1@atlantis.news.tpi.pl> <zvpuavrjfxvwxvryprubzrcy.jr22qb0.pminews@news.home.net.pl> <fgno6v$ff4$1@nemesis.news.tpi.pl> <4314526.SuDauV5BP3@tommink.pl> NNTP-Posting-Host: bnv50.neoplus.adsl.tpnet.pl Mime-Version: 1.0 X-Trace: atlantis.news.tpi.pl 1194376641 12457 83.29.11.50 (6 Nov 2007 19:17:21 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Tue, 6 Nov 2007 19:17:21 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit