我这样做并且它的工作稍微好一点,现在我得到错误:45 / 44 matric.pas 致命:语法错误,)预期但发现 const char 这很可能是因为我使用的是帕斯卡图。
program MatrixArray;
Uses wincrt,graph;
Var
GraphicsDriver, GraphicsMode: Smallint;
Xaxis: array[1..10] of string;
Yaxis: array[1..10] of string;
Matrix: array[1..10,1..10] of string;
x:integer;
y:integer;
{two var's are needed for initialisation}
Begin
Writeln('Loading Game Graphics...');
GraphicsDriver := Detect;
InitGraph(GraphicsDriver, GraphicsMode,'');
ClearViewPort;
声明数组
Xaxis[1] :='A';
Xaxis[1] :='B';
Xaxis[1] :='C';
Xaxis[1] :='D';
Xaxis[1] :='E';
Xaxis[1] :='F';
Xaxis[1] :='G';
Xaxis[1] :='H';
Xaxis[1] :='I';
Xaxis[1] :='J';
Yaxis[1] :='1';
Yaxis[1] :='2';
Yaxis[1] :='3';
Yaxis[1] :='4';
Yaxis[1] :='6';
Yaxis[1] :='7';
Yaxis[1] :='8';
Yaxis[1] :='9';
Yaxis[1] :='10';
for x := 1 to 10 do
for y := 1 to 10 do
Matrix[x,y] := Xaxis[x] + Yaxis[y];
For x := 1 to 10 do
for y := 1 to 10 do
outtextxy 就像 writeln(); http://pascal-programming.info/lesson8.php
OutTextXY(0,0, Matrix[x,y]' ');
End.