REM แปลงสตริงเป็นการสร้างข้อมูล
FunctionTointeeger (str, num)
str = trim (str)
ifstr = "" ornotisnumeric (str) แล้ว
tointeger = num
อื่น
tointeger = clng (str)
endif
endfunction
REM แปลงสตริงเป็นข้อมูลความแม่นยำสองเท่า
FunctionTodouble (STR)
str = trim (str)
ifstr = "" ornotisnumeric (str) แล้ว
todouble = 0.0
อื่น
todouble = cdbl (str)
endif
endfunction
REM แปลงสตริงเป็นข้อมูลบูลีน
ฟังก์ชั่น toboolean (str)
str = lcase (trim (str))
ifstr = "true" orstr = "t" แล้ว
toboolean = true
elseifisnumeric (str) แล้ว
ifclng (str) <> 0thentoboolean = true
อื่น
toboolean = false
endif
endfunction