私はクラスのためのプログラムを書こうとしています。仕様では、タスクには手続きや関数がありません。タスクにアクセスするには、パッケージ名を使用する必要があります。これをやり遂げるにはどうすればいいですか? package hello is
task sample is...
end sample;
end hello;
私はAdaを使いました。 私はこのquestionを見ましたが、私のは少し異なります。 type A is record
x : integer;
y : integer;
end record;
procedure P1 is
temp : A;
begin
temp.x := 100;
P2(temp)
配列をループし、現在の配列インデックスが列挙型の値であるかどうかをチェックしたいと思います。配列と同様に列挙は、次のように定義されています type Option is (None, A, B, C, D);
type Votes is array(Option) of Natural;
Zero_Option_Distribution: constant Votes := (others
私は次のレコードを持っている: type Items is
record
Feature_A : Type_Feature_A;
Feature_B : Type_Feature_B;
Feature_C : Type_Feature_C;
Feature_D : Type_Feature_D;
end record;
typ