Flashドキュメンテーション |
|||
| ActionScript 2.0 リファレンスガイド > ActionScript 言語エレメント > 演算子 > instanceof 演算子 | |||
object instanceof classConstructor
object が classConstructor のインスタンスまたは classConstructor のサブクラスであるかどうかをテストします。instanceof 演算子は、プリミティブタイプをラッパーオブジェクトに変換しません。たとえば、次のコードは true を返します。
new String("Hello") instanceof String;
一方、次のコードは false を返します。
"Hello" instanceof String;
使用できるバージョン : Flash Player 6、ActionScript 1.0
object : Object - ActionScript オブジェクト。
classConstructor : Function - String や Date などの ActionScript コンストラクタ関数への参照。
Boolean - object が classConstructor のインスタンスまたはサブクラスである場合、instanceof は true を返し、そうでない場合は false を返します。また、_global instanceof Object は false を返します。
このページに新しいコメントが追加された場合に、電子メールでの通知を希望する。 | コメントレポート
現在のページ: http://livedocs.adobe.com/flash/8_jp/main/00001831.html