1

ada プログラムでタスクを中止しようとしていますが、コンパイル中に次のエラーが発生します。

expect task name or task interface class-wide object for "abort"

コードは次のようになります。

task type Sending_Message;
type Send_Message is access Sending_Message;

declare
    send    : Send_Message;
begin
    send := new Sending_Message;
    ...
    abort send;   -- this line throws error
end;

そして、次のような行を試すと、次のようになります。

abort Sending_Message;

エラーが発生します:

invalid use of subtype mark in expression or call

何が間違っているのですか?

4

1 に答える 1