Simply english/slovank dictionary
Delphi & Pascal (česká wiki)
Category: KMP (Club of young programmers)
Author: ghostix
Program: Slovnik.pas
File exe: Slovnik.exe
Author: ghostix
Program: Slovnik.pas
File exe: Slovnik.exe
Simply english/slovank dictionary. The words must write user - not included.
{ slovnik.pas } { Program je jednoduchým anglicko/slovenským slovníkom. } { Slovíčka musí zadávať užívateľ, nie sú súčasťou. } { } { Author:ghostix } { Datum:20.04.2006 http://www.trsek.com } program slovnik; uses crt; var f1,f2:text; i,y,x:integer; slovo,slovo1:string; svk:array[1..15]of string; eng:array[1..15]of string; ODP:char; procedure zapis; begin clrscr; writeln('Zadajte pocet slovicek'); readln(x); assign(f1,'svk.txt'); append(f1); assign(f2,'preklad.txt'); append(f2); for i:=1 to x do begin writeln('Zadajte ',i,' slovicko'); readln(svk[i]); writeln(f1,svk[i]); writeln('Zadajte preklad'); readln(eng[i]); writeln(f2,eng[i]); end; close(f1); close(f2); readln; end; procedure anglicky; begin clrscr; writeln('Zadajte Anglicke slovicko: '); readln(slovo1); assign(f1,'svk.txt'); reset(f1); assign(f2,'preklad.txt'); reset(f2); for i:=1 to 30 do begin readln(f1,svk[i]); readln(f2,eng[i]); if slovo1=eng[i] then writeln('Preklad: ',svk[i]); end; close(f1); close(f2); readln; end; procedure slovensky; begin clrscr; writeln('Zadajte slovenske slovicko: '); readln(slovo); assign(f1,'svk.txt'); reset(f1); assign(f2,'preklad.txt'); reset(f2); for i:=1 to 30 do begin readln(f1,svk[i]); readln(f2,eng[i]); if slovo=svk[i] then writeln('Preklad: ',eng[i]); end; close(f1); close(f2); readln; end; begin clrscr; repeat writeln('Vytvorit subor ............... V':50); writeln; writeln('Preklad ENG na SVK............ E':50); writeln; writeln('Preklad SVK na ENG............ S':50); writeln; writeln('Koniec ....................... K':50); repeat ODP:=upcase(readkey); until (ODP='V')or(ODP='E')or(ODP='S')or(ODP='K'); clrscr; case ODP of 'V' : zapis; 'E' : anglicky; 'S' : slovensky; end; until ODP='K' end.