00072 98/06/28 14:09 これは仕様じゃないですよね(^^;;;;
投稿者 : 範子   コメントを投稿する

#line = "not changed"
#file ="c:\autoexec.bat"
openfile #file
readfile #file, #line ;comment
message "#line = " + #line
message "#line ;comment = " + #line ;comment
closefile #file
exit

ここの掲示板では、スペースやタブが取り除かれてしまうことがあるので
表現が難しいのです。
 4行目readfileの2番目の引数#lineの後ろには全角スペースが続いています。
 このように書いた場合、readfileは、ファイルを読んだ結果を変数
#lineではなくて、#line ;commentに格納しています。
また6行目で、文字列"#line ;comment = "に続いて表示されるのは
変数#line ;commentの中身です。


新規に投稿する