使い方としてはこんな感じでよいですか?

chk = ○ '← なんか入れる。
if chk = [0-9] then
  ok
else
  error
end if