amir_cpp
یک شنبه 12 خرداد 1387, 21:43 عصر
سلام!
خوب این هم از فارسی ساز، بفرمایید:
البته حتما یکم مشکل داره، یعنی باید تموم رویه ها رو هم اضافه کنم، نگران نباشید...
procedure read1(var name:string;j,y2,y1:shortint;t,b:shortint);
var
ch,c : char;
str1 : string;
label
del,start,fin,cod,lpos;
begin
name:='';
str1:='';
i:=y1;
tgw(b,t+16,i,j,'_');
repeat
tgw(b,t+16,i,j,'_');
cod :
tgw(b,t+16,i,j,'_');
if i=y2 then
begin
repeat
ch:=readkey;
if ch=esc then name:='Vahid';
if ch=ent then goto fin;
if ch=#8 then goto del;
until (ch=ent)or(ch=esc)or(ch=#8);
end;
c:=ch;
ch:=readkey;
if ch=esc then
begin
for i:=y2 to y1 do
tgw(b,b,i,j,' ');
name:='Vahid';
goto fin;
end;
if ch=chr(0) then
begin
ch:=readkey;
goto cod;
end;
start:
if ord(ch)>=32 then
begin
if ch='_' then ch:='‹';
if ch='`' then ch:='•';
if ch='~' then ch:='”';
if ch='\' then ch:='¦';
if ch='|' then ch:='چ';
if ch='q' then ch:='®';
if ch='Q' then ch:='';
if ch='w' then ch:='¬';
if ch='W' then ch:='«';
if ch='e' then ch:='™';
if ch='E' then ch:='ک';
if ch='r' then ch:='ى';
if ch='R' then ch:='ë';
if ch='t' then ch:='ê';
if ch='T' then ch:='é';
if ch='y' then ch:='è';
if ch='Y' then ch:='ç';
if ch='u' then ch:='ن';
if ch='U' then ch:='م';
if ch='i' then ch:='û';
if ch='I' then ch:='ù';
if ch='o' then ch:='،';
if ch='O' then ch:=' ';
if ch='p' then ch:='ں';
if ch='P' then ch:='';
if ch='[' then ch:='›';
if ch='{' then ch:='ڑ';
if ch=']' then ch:='';
if ch='}' then ch:='œ';
if ch='a' then ch:='ھ';
if ch='A' then ch:='©';
if ch='s' then ch:='¨';
if ch='S' then ch:='§';
if ch='d' then ch:='';
if ch='D' then ch:='ü';
if ch='f' then ch:='“';
if ch='F' then ch:='’';
if ch='g' then ch:='َ';
if ch='G' then ch:='ٌ';
if ch='h' then ch:='گ';
if ch='H' then ch:='‘';
if ch='j' then ch:='—';
if ch='J' then ch:='–';
if ch='k' then ch:='÷';
if ch='K' then ch:='ِ';
if ch='l' then ch:='ُ';
if ch='L' then ch:='ô';
if ch=';' then ch:='î';
if ch=':' then ch:='ي';
if ch=chr(39) then ch:='ً';
if ch='"' then ch:='ï';
if ch='z' then ch:='à';
if ch='Z' then ch:='â';
if ch='x' then ch:='¯';
if ch='X' then ch:='ل';
if ch='c' then ch:='¥';
if ch='C' then ch:='و';
if ch='v' then ch:='¤';
if ch='V' then ch:='ه';
if ch='b' then ch:='£';
if ch='B' then ch:='£';
if ch='n' then ch:='¢';
if ch='N' then ch:='¢';
if ch='m' then ch:='ژ';
if ch='M' then ch:='ڈ';
if ch=',' then ch:='ّ';
if ch='<' then ch:='ّ';
if ch='.' then ch:='.';
if ch='>' then ch:='.';
if ch='/' then ch:='Œ';
if ch='?' then ch:='Œ';
if (ch=spac)and((c='“')or(c='•')or(c='—')or(c=' ™')or(c='›')or(c='')or
(c='ں')or(c='،')or(c='¨')or(c='ھ')or(c='¬')or (c='®')or(c='ê')or(c='ى')or
(c='î')or(c='ً')or(c='ُ')or(c='÷')) then
begin
ch:=chr(ord(c)-1);
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if ((ch='گ')or(ch='‘'))and((c='َ')or(c='ٌ')) then
begin
ch:='ٍ';
tgw(b,t,i+1,j,ch);
tgw(b,b,i-1,j,'_');
delete(name,1,1);
name:=ch+name;
goto cod;
end;
if (ch=spac)and(c='ژ') then
begin
ch:='ڈ';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
goto cod;
end;
if (ch=spac)and(c='ن') then
begin
ch:='ل';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch=spac)and(c='م') then
begin
ch:='â';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch=spac)and(c='è') then
begin
ch:='ه';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch=spac)and(c='ç') then
begin
ch:='و';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch=spac)and(c='َ') then
begin
ch:='ٌ';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch=spac)and(c='û') then
begin
ch:='ù';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch=spac)and(c='') then
begin
ch:='ü';
tgw(b,t,i+1,j,ch);
i:=i-1;
tgw(b,b,i+1,j,'_');
delete(name,1,1);
name:=ch+name;
insert(' ',name,1);
goto cod;
end;
if (ch='گ')and((c='“')or(c='•')or(c='—')or(c=' ™')or(c='›')or
(c='')or(c='ں')or(c='،')or(c='¨')or(c='ھ')o r(c='¬')or(c='®')or
(c='¯')or(c='à')or(c='م')or(c='ن')or(c='ç')or (c='è')or(c='ê')or
(c='ى')or(c='î')or(c='ً')or(c='َ')or(c='ُ')or (c='÷')or(c='û')or
(c='')or(c='ژ')or(c='‹'))then
begin
ch:='‘';
i:=i-1;
tgw(b,t,i+1,j,ch);
name:=ch+name;
goto cod;
end;
if (ch='ن')and((c='“')or(c='•')or(c='—')or(c=' ™')or(c='›')or
(c='')or(c='ں')or(c='،')or(c='¨')or(c='ھ')o r(c='¬')or(c='®')or
(c='¯')or(c='à')or(c='م')or(c='ن')or(c='ç')or (c='è')or(c='ê')or
(c='ى')or(c='î')or(c='ً')or(c='َ')or(c='ُ')or (c='÷')or(c='û')or
(c='')or(c='ژ'))then
begin
ch:='م';
i:=i-1;
tgw(b,t,i+1,j,ch);
name:=ch+name;
goto cod;
end;
if (ch='è')and((c='“')or(c='•')or(c='—')or(c=' ™')or(c='›')or
(c='')or(c='ں')or(c='،')or(c='¨')or(c='ھ')o r(c='¬')or(c='®')or
(c='¯')or(c='à')or(c='م')or(c='ن')or(c='ç')or (c='è')or(c='ê')or
(c='ى')or(c='î')or(c='ً')or(c='َ')or(c='ُ')or (c='÷')or(c='û')or
(c='')or(c='ژ'))then
begin
ch:='ç';
i:=i-1;
tgw(b,t,i+1,j,ch);
name:=ch+name;
goto cod;
end;
name:=ch+name;
tgw(b,t,i,j,ch);
i:=i-1;
end
else
begin
del :
if ch=#8 then
begin
if i=y1 then
begin
repeat
ch:=readkey;
if ch=esc then
begin
for i:=y2 to y1 do
tgw(b,b,i,j,' ');
name:='Vahid';
goto fin;
end;
if ch<>#8 then goto start;
until ch<>#8;
end;
i:=i+1;
tgw(b,b,i-1,j,' ');
delete(name,1,1);
end;
if ch=#8 then
begin
tgw(b,b,i,j,'');
end;
end;
if ch=ent then
begin
tgw(b,b,i,j,' ');
break;
end;
lpos:
if i=y2 then
begin
repeat
tgw(b,t+16,i,j,'_');
ch:=readkey;
if ch=#8 then goto del;
if ch=esc then
begin
for i:=y2 to y1 do
tgw(b,b,i,j,' ');
name:='Vahid';
goto fin;
end;
until (ch=ent)or(ch=esc);
end;
until i=y2;
fin:
tgw(b,b,i,j,'_');
end;
vBulletin® v4.2.5, Copyright ©2000-1403, Jelsoft Enterprises Ltd.