|
h-tom です。
>・existfileに拡張パラメタ
existfile関数ですが、拡張パラメータを指定し、関数内で文字列結合すると、
結果がおかしいです。
windir = c:\winnt
winsysdir = c:\winnt\system32
という環境で、以下の変数を設定します。
$a = windir + "\\system32";
$b = "\\system32";
$c = windir;
で、existfile関数を実行すると、結果が違ってくる。
existfile(winsysdir,1) = 0x30
existfile($a,1) = 0x30
existfile(windir + "\\system32",1) = 0x0
existfile(windir + $b,1) = 0x0
existfile($c + $b,1) = 0x0
//マクロ ここから
debuginfo 1;
$a = windir + "\\system32";
$b = "\\system32";
$c = windir;
debuginfo "windir = " + windir + "\n";
debuginfo "winsysdir = " + winsysdir + "\n";
debuginfo "$a = " + $a + "\n";
debuginfo "$b = " + $b + "\n";
debuginfo "$c = " + $c + "\n";
debuginfo "windir + $b = " + windir + $b + "\n";
debuginfo "$c + $b = " + $c + $b + "\n";
debuginfo "((windir + $b) == winsysdir) = " +
hex(((windir + $b) == winsysdir)) + "\n";
debuginfo "((windir + $b) == $a) = " +
hex(((windir + $b) == $a)) + "\n";
debuginfo "(($c + $b) == winsysdir) = " +
hex((($c + $b) == winsysdir)) + "\n";
debuginfo "existfile(winsysdir,1) = 0x" +
hex(existfile(winsysdir,1)) + "\n";
debuginfo "existfile($a,1) = 0x" +
hex(existfile($a,1)) + "\n";
debuginfo "existfile(windir + \"\\\\system32\",1) = 0x" +
hex(existfile(windir + "\\system32",1)) + "\n";
debuginfo "existfile(windir + $b,1) = 0x" +
hex(existfile(windir + $b,1)) + "\n";
debuginfo "existfile($c + $b,1) = 0x" +
hex(existfile($c + $b,1)) + "\n";
endmacro;
//マクロ ここまで
|
|