コードを実行し、実行中に例外がスローされても、開いているファイルを必ず閉じます。
構文
説明
注意事項
例
| 例 | |
{CommandButton
label = "Open file",
{on e:Action do
let buf:StringBuf = {StringBuf}
{if-non-null from = {choose-file} then
{with-open-streams in = {read-open from} do
{in.read-one-string buf = buf}
{if not buf.empty? then
{error "File is not empty!"}
}
}
}
}
}
|