本ページには広告が含まれています。
Notice: Trying to access array offset on value of type null in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 27
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined offset: 1 in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined offset: 1 in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 47
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
Notice: Undefined variable: html in /home/uwsc/domains/uwsc.jp/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(663) : eval()'d code on line 25
与えられた変数がオブジェクト型か調べます。
- 構文
- Boolean = isObject( variable )
- 引数
- variable 省略可
- 型を調べる変数
- 戻り値
- TRUE
- 与えられた変数がオブジェクト型である
- FALSE
- 与えられた変数がオブジェクト型でない
プログラム
//////////////////////////////////////////////////
// 【引数】
// variable : 型を調べる変数
// 【戻り値】
// : TRUE : 与えられた変数がオブジェクト型である、
// FALSE : 与えられた変数がオブジェクト型でない、 :
//////////////////////////////////////////////////
FUNCTION isObject(variable)
RESULT = IIF(VARTYPE(variable) = VAR_DISPATCH, TRUE, FALSE)
FEND
//////////////////////////////////////////////////
// 【引数】
// expr : 評価する式
// truepart : 評価した式がTrueのときに返す値
// falsepart : 評価した式がFalseのときに返す値
// 【戻り値】
// truepart : 評価した式がTrueのとき、falsepart : 評価した式がFalseのとき
//////////////////////////////////////////////////
FUNCTION IIF(expr, truepart, falsepart)
IFB EVAL(expr) THEN
RESULT = truepart
ELSE
RESULT = falsepart
ENDIF
FEND関連記事
- VARTYPE関数 (スクリプト関数)
- 変数の型を取得もしくは設定します。
- isString関数 (自作関数)
- 与えられた変数の型が文字列型か調べる。
- isEmpty関数 (自作関数)
- 与えられた変数の型がEmpty型か調べる。
- isFloat関数 (自作関数)
- 与えられた変数の型が小数型か調べる。
- isArray関数 (自作関数)
- 与えられた変数の型が配列型か調べる。
- isAssociative関数 (自作関数)
- 与えられた変数の型が連想配列型か調べる。
