prog.c:2:1: error: unknown type name ‘function’
function Playfair_Crypt(s,key:string):string;
^~~~~~~~
prog.c:2:30: error: expected ‘)’ before ‘:’ token
function Playfair_Crypt(s,key:string):string;
^
prog.c:5:3: warning: type defaults to ‘int’ in declaration of ‘MaxX’ [-Wimplicit-int]
MaxX = 6;//столбцы
^~~~
prog.c:6:3: warning: data definition has no type or storage class
MaxY = 5;//строки
^~~~
prog.c:6:3: warning: type defaults to ‘int’ in declaration of ‘MaxY’ [-Wimplicit-int]
prog.c:9:3: warning: data definition has no type or storage class
URusA = 'абвгдежзиклмнопрстуфхцчшщъыэюя';
^~~~~
prog.c:9:3: warning: type defaults to ‘int’ in declaration of ‘URusA’ [-Wimplicit-int]
prog.c:9:11: warning: character constant too long for its type
URusA = 'абвгдежзиклмнопрстуфхцчшщъыэюя';
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:11:1: error: unknown type name ‘var’
var i,j,t,x1,x2,y1,y2 :integer;
^~~
prog.c:11:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
var i,j,t,x1,x2,y1,y2 :integer;
^
prog.c:12:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
M : array[1..MaxY,1..MaxX]of char; //ключевая матрица
^
prog.c:12:15: error: too many decimal points in number
M : array[1..MaxY,1..MaxX]of char; //ключевая матрица
^~~~~~~
prog.c:12:23: error: too many decimal points in number
M : array[1..MaxY,1..MaxX]of char; //ключевая матрица
^~~~~~~
prog.c:13:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp :string;
^
prog.c:17:3: error: unknown type name ‘Procedure’
Procedure SimbolPos(c:char;var x,y:integer);
^~~~~~~~~
prog.c:17:24: error: expected ‘)’ before ‘:’ token
Procedure SimbolPos(c:char;var x,y:integer);
^
prog.c:18:3: error: unknown type name ‘var’
var i,j:integer;
^~~
prog.c:18:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
var i,j:integer;
^
prog.c:19:3: error: unknown type name ‘begin’
begin
^~~~~
prog.c:20:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
x:=0;
^
prog.c:21:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
y:=0;
^
prog.c:22:3: error: expected identifier or ‘(’ before ‘for’
for i := 1 to MaxY do
^~~
prog.c:27:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
y:=i;
^
prog.c:28:9: warning: data definition has no type or storage class
exit;
^~~~
prog.c:28:9: warning: type defaults to ‘int’ in declaration of ‘exit’ [-Wimplicit-int]
prog.c:28:9: warning: built-in function ‘exit’ declared as non-function
prog.c:29:9: warning: data definition has no type or storage class
end;
^~~
prog.c:29:9: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:30:3: warning: data definition has no type or storage class
end;
^~~
prog.c:30:3: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:32:1: error: unknown type name ‘label’
label M1;
^~~~~
prog.c:33:1: error: unknown type name ‘begin’
begin
^~~~~
prog.c:35:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
key:=AnsiLowerCase(key);
^
prog.c:36:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
s:=AnsiLowerCase(s);
^
prog.c:38:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:='';
^
prog.c:38:7: error: empty character constant
temp:='';
^~
prog.c:39:1: error: expected identifier or ‘(’ before ‘for’
for i := 1 to length(s) do if pos(s[i],URusA)<>0 then temp:=temp+s[i];
^~~
prog.c:40:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
s:=temp;
^
prog.c:42:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:='';
^
prog.c:42:7: error: empty character constant
temp:='';
^~
prog.c:43:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to length(key) do
^~~
prog.c:45:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to length(URusA) do
^~~
prog.c:47:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
t:=0;
^
prog.c:48:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to 5 do
^~~
prog.c:52:5: error: expected ‘]’ before ‘,’ token
M[i,j]:=temp[t];
^
prog.c:53:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘.’ token
form1.StringGrid1.Cells[j,i]:=temp[t];
^
prog.c:54:2: warning: data definition has no type or storage class
end;
^~~
prog.c:54:2: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:59:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
M1:
^
prog.c:64:12: warning: multi-character character constant [-Wmultichar]
insert('ъ',s,2*i);
^~~~
prog.c:65:5: error: expected identifier or ‘(’ before ‘goto’
goto M1;
^~~~
prog.c:66:5: warning: data definition has no type or storage class
end;
^~~
prog.c:66:5: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:67:3: warning: data definition has no type or storage class
end;
^~~
prog.c:67:3: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:69:1: error: expected identifier or ‘(’ before ‘if’
if length(s) MOD 2 = 1 then if s[length(s)]<>'ъ' then s:=s+'ъ'
^~
prog.c:69:46: warning: multi-character character constant [-Wmultichar]
if length(s) MOD 2 = 1 then if s[length(s)]<>'ъ' then s:=s+'ъ'
^~~~
prog.c:69:61: warning: multi-character character constant [-Wmultichar]
if length(s) MOD 2 = 1 then if s[length(s)]<>'ъ' then s:=s+'ъ'
^~~~
prog.c:70:60: warning: multi-character character constant [-Wmultichar]
else s:=s+'я';
^~~~
prog.c:71:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:='';
^
prog.c:71:7: error: empty character constant
temp:='';
^~
prog.c:72:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to length(s)div 2 do
^~~
prog.c:75:13: error: unknown type name ‘s’
SimbolPos(s[2*i],x2,y2);
^
prog.c:75:20: error: expected declaration specifiers or ‘...’ before ‘x2’
SimbolPos(s[2*i],x2,y2);
^~
prog.c:75:23: error: unknown type name ‘y2’
SimbolPos(s[2*i],x2,y2);
^~
prog.c:77:3: error: expected identifier or ‘(’ before ‘if’
if y1 = y2 then
^~
prog.c:79:14: warning: data definition has no type or storage class
inc(x1); inc(x2);
^~~
prog.c:79:14: warning: type defaults to ‘int’ in declaration of ‘inc’ [-Wimplicit-int]
prog.c:79:5: warning: parameter names (without types) in function declaration
inc(x1); inc(x2);
^~~
prog.c:80:5: error: expected identifier or ‘(’ before ‘if’
if x1 > MaxX then x1:=x1-MaxX;
^~
prog.c:81:5: error: expected identifier or ‘(’ before ‘if’
if x2 > MaxX then x2:=x2-MaxX;
^~
prog.c:82:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:=temp+M[y1,x1]+M[y2,x2];
^
prog.c:83:5: warning: data definition has no type or storage class
end;
^~~
prog.c:83:5: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:85:3: error: expected identifier or ‘(’ before ‘if’
if x1 = x2 then
^~
prog.c:87:14: warning: data definition has no type or storage class
inc(y1); inc(y2);
^~~
prog.c:87:14: warning: type defaults to ‘int’ in declaration of ‘inc’ [-Wimplicit-int]
prog.c:87:5: warning: parameter names (without types) in function declaration
inc(y1); inc(y2);
^~~
prog.c:88:5: error: expected identifier or ‘(’ before ‘if’
if y1 > MaxY then y1:=y1-MaxY;
^~
prog.c:89:5: error: expected identifier or ‘(’ before ‘if’
if y2 > MaxY then y2:=y2-MaxY;
^~
prog.c:90:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:=temp+M[y1,x1]+M[y2,x2];
^
prog.c:91:5: warning: data definition has no type or storage class
end;
^~~
prog.c:91:5: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:93:3: error: expected identifier or ‘(’ before ‘if’
if (x1<>x2) and (y1<>y2) then temp:=temp+M[y1,x2]+M[y2,x1];
^~
prog.c:94:3: warning: data definition has no type or storage class
end;
^~~
prog.c:94:3: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:95:15: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
Playfair_Crypt:=temp;
^
prog.c:96:1: warning: data definition has no type or storage class
end;
^~~
prog.c:96:1: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:99:1: error: unknown type name ‘function’
function Playfair_DeCrypt(s,key:string):string;
^~~~~~~~
prog.c:99:32: error: expected ‘)’ before ‘:’ token
function Playfair_DeCrypt(s,key:string):string;
^
prog.c:102:3: warning: type defaults to ‘int’ in declaration of ‘MaxX’ [-Wimplicit-int]
MaxX = 6;//столбцы
^~~~
prog.c:102:3: error: redefinition of ‘MaxX’
prog.c:5:3: note: previous definition of ‘MaxX’ was here
MaxX = 6;//столбцы
^~~~
prog.c:103:3: warning: data definition has no type or storage class
MaxY = 5;//строки
^~~~
prog.c:103:3: warning: type defaults to ‘int’ in declaration of ‘MaxY’ [-Wimplicit-int]
prog.c:103:3: error: redefinition of ‘MaxY’
prog.c:6:3: note: previous definition of ‘MaxY’ was here
MaxY = 5;//строки
^~~~
prog.c:106:3: warning: data definition has no type or storage class
URusA = 'абвгдежзиклмнопрстуфхцчшщъыэюя';
^~~~~
prog.c:106:3: warning: type defaults to ‘int’ in declaration of ‘URusA’ [-Wimplicit-int]
prog.c:106:3: error: redefinition of ‘URusA’
prog.c:9:3: note: previous definition of ‘URusA’ was here
URusA = 'абвгдежзиклмнопрстуфхцчшщъыэюя';
^~~~~
prog.c:106:11: warning: character constant too long for its type
URusA = 'абвгдежзиклмнопрстуфхцчшщъыэюя';
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.c:108:1: error: unknown type name ‘var’
var i,j,t,x1,x2,y1,y2 :integer;
^~~
prog.c:108:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
var i,j,t,x1,x2,y1,y2 :integer;
^
prog.c:109:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
M : array[1..MaxY,1..MaxX]of char; //ключевая матрица
^
prog.c:109:15: error: too many decimal points in number
M : array[1..MaxY,1..MaxX]of char; //ключевая матрица
^~~~~~~
prog.c:109:23: error: too many decimal points in number
M : array[1..MaxY,1..MaxX]of char; //ключевая матрица
^~~~~~~
prog.c:110:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp :string;
^
prog.c:114:3: error: unknown type name ‘Procedure’
Procedure SimbolPos(c:char;var x,y:integer);
^~~~~~~~~
prog.c:114:24: error: expected ‘)’ before ‘:’ token
Procedure SimbolPos(c:char;var x,y:integer);
^
prog.c:115:3: error: unknown type name ‘var’
var i,j:integer;
^~~
prog.c:115:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
var i,j:integer;
^
prog.c:116:3: error: unknown type name ‘begin’
begin
^~~~~
prog.c:117:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
x:=0;
^
prog.c:118:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
y:=0;
^
prog.c:119:3: error: expected identifier or ‘(’ before ‘for’
for i := 1 to MaxY do
^~~
prog.c:124:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
y:=i;
^
prog.c:125:9: warning: data definition has no type or storage class
exit;
^~~~
prog.c:125:9: warning: type defaults to ‘int’ in declaration of ‘exit’ [-Wimplicit-int]
prog.c:126:9: warning: data definition has no type or storage class
end;
^~~
prog.c:126:9: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:127:3: warning: data definition has no type or storage class
end;
^~~
prog.c:127:3: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:129:1: error: unknown type name ‘label’
label M1;
^~~~~
prog.c:130:1: error: unknown type name ‘begin’
begin
^~~~~
prog.c:132:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
key:=AnsiLowerCase(key);
^
prog.c:133:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
s:=AnsiLowerCase(s);
^
prog.c:135:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:='';
^
prog.c:135:7: error: empty character constant
temp:='';
^~
prog.c:136:1: error: expected identifier or ‘(’ before ‘for’
for i := 1 to length(s) do
^~~
prog.c:139:3: warning: data definition has no type or storage class
end;
^~~
prog.c:139:3: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:140:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
s:=temp;
^
prog.c:142:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:='';
^
prog.c:142:7: error: empty character constant
temp:='';
^~
prog.c:143:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to length(key) do
^~~
prog.c:145:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to length(URusA) do
^~~
prog.c:147:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
t:=0;
^
prog.c:148:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to 5 do
^~~
prog.c:152:5: error: expected ‘]’ before ‘,’ token
M[i,j]:=temp[t];
^
prog.c:153:2: warning: data definition has no type or storage class
end;
^~~
prog.c:153:2: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:155:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:='';
^
prog.c:155:7: error: empty character constant
temp:='';
^~
prog.c:156:1: error: expected identifier or ‘(’ before ‘for’
for i:=1 to length(s)div 2 do
^~~
prog.c:159:13: error: unknown type name ‘s’
SimbolPos(s[2*i],x2,y2);
^
prog.c:159:20: error: expected declaration specifiers or ‘...’ before ‘x2’
SimbolPos(s[2*i],x2,y2);
^~
prog.c:159:23: error: unknown type name ‘y2’
SimbolPos(s[2*i],x2,y2);
^~
prog.c:161:3: error: expected identifier or ‘(’ before ‘if’
if y1 = y2 then
^~
prog.c:163:14: warning: data definition has no type or storage class
dec(x1); dec(x2);
^~~
prog.c:163:14: warning: type defaults to ‘int’ in declaration of ‘dec’ [-Wimplicit-int]
prog.c:163:5: warning: parameter names (without types) in function declaration
dec(x1); dec(x2);
^~~
prog.c:164:5: error: expected identifier or ‘(’ before ‘if’
if x1 <= 0 then x1:=x1+MaxX;
^~
prog.c:165:5: error: expected identifier or ‘(’ before ‘if’
if x2 <= 0 then x2:=x2+MaxX;
^~
prog.c:166:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:=temp+M[y1,x1]+M[y2,x2];
^
prog.c:167:5: warning: data definition has no type or storage class
end;
^~~
prog.c:167:5: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:169:3: error: expected identifier or ‘(’ before ‘if’
if x1 = x2 then
^~
prog.c:171:14: warning: data definition has no type or storage class
dec(y1); dec(y2);
^~~
prog.c:171:14: warning: type defaults to ‘int’ in declaration of ‘dec’ [-Wimplicit-int]
prog.c:171:5: warning: parameter names (without types) in function declaration
dec(y1); dec(y2);
^~~
prog.c:172:5: error: expected identifier or ‘(’ before ‘if’
if y1 <= 0 then y1:=y1+MaxY;
^~
prog.c:173:5: error: expected identifier or ‘(’ before ‘if’
if y2 <= 0 then y2:=y2+MaxY;
^~
prog.c:174:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
temp:=temp+M[y1,x1]+M[y2,x2];
^
prog.c:175:5: warning: data definition has no type or storage class
end;
^~~
prog.c:175:5: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:177:3: error: expected identifier or ‘(’ before ‘if’
if (x1<>x2) and (y1<>y2) then temp:=temp+M[y1,x2]+M[y2,x1];
^~
prog.c:178:3: warning: data definition has no type or storage class
end;
^~~
prog.c:178:3: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]
prog.c:179:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
Playfair_DeCrypt:=temp;
^
prog.c:180:1: warning: data definition has no type or storage class
end;
^~~
prog.c:180:1: warning: type defaults to ‘int’ in declaration of ‘end’ [-Wimplicit-int]