2012-01-23 5 views
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; 

私はエラーを取得します

何が悪いと思いますか?

答えて

4

あなたが明示的にアクセスタイプを逆参照する必要があります:D:

abort send.all; 
+0

おかげで、これはそれであります – thim