REMは文字列を形成データに変換します
functiontointeger(str、num)
str =トリム(str)
ifstr = "" ornotisnumeric(str)then
tointeger = num
それ以外
tointeger = clng(str)
endif
エンド機能
REMは文字列を二重精度データに変換します
functionTodouble(str)
str =トリム(str)
ifstr = "" ornotisnumeric(str)then
dowble = 0.0
それ以外
dowble = cdbl(str)
endif
エンド機能
REMは文字列をブールデータに変換します
関数Toboolean(str)
str = lcase(trim(str))
ifstr = "true" orstr = "t" then
toboolean = true
elseifisnumeric(str)then
ifclng(str)<> 0thentoboolean = true
それ以外
toboolean = false
endif
エンド機能