1
私は配列を使用していたので、11個のボタンを出力するプログラムを作成しようとしています。これらのボタンを持つ唯一の変更は、名前ですはパスカルで配列に値を追加する - iIllegal修飾子」
私がしようとします。コンパイルするには、知っている、私はに非常に新しいですしてください私は
type
buttonName = array[0..11] of String;
procedure PopulateButton(const buttonName);
begin
buttonName[0] := 'Sequence';
buttonName[1] := 'Repetition';
buttonName[2]:= 'Modularisation';
buttonName[3]:= 'Function';
buttonName[4]:= 'Variable';
buttonName[5]:= 'Type';
buttonName[6]:= 'Program';
buttonName[7]:= 'If and case';
buttonName[8]:= 'Procedure';
buttonName[9]:= 'Constant';
buttonName[10]:= 'Array';
buttonName[11]:= 'For, while, repeat';
end;
。私の最初の配列の割り当てでのエラー「違法修飾子」を取得し、メインに私がループ
for i:=0 to High(buttonName) do
begin
DrawButton(x, y, buttonName[i]);
y:= y+70;
end;
のためにこれを使用しようとしていますこれと午前配列、パラメータ/定数などで私の知識があまりにも自信がない。
はPopulateButton()
のパラメータ定義が間違っているあなたに
メインパーツも変更してください。 –
ありがとうございました!すべてを修正しました。私は私のパラメータ定義をブラッシュアップする必要があります。 – denpa
おそらくタイピングについてもブラシアップする必要があります。パラメータに型がありませんでした。動的な型指定言語ではうまくいくが、Pascal/Delphiではそうではない。 –