Conversions: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 27: | Line 27: | ||
'''Table 5: Conversion Functions''' | '''Table 5: Conversion Functions''' | ||
{| class="wikitable" | |||
|- | |||
! Header text !! Header text !! Header text | |||
|- | |||
| Example || Example || Example | |||
|- | |||
| Example || Example || Example | |||
|- | |||
| Example || Example || Example | |||
|} | |||
'''Example''' | '''Example''' |
Revision as of 14:48, 2 July 2012
Function
CBOOL(expression)
CBYTE(expression)
CCUR(expression)
CDATE(expression)
CDBL(expression)
CINT(expression)
CLNG(expression)
CSNG(expression)
CSTR(expression)
Description
The conversion functions return an expression that has been converted to the appropriate type. The required parameter, expression, is any valid expression.
If the return value lies outside the acceptable range of its return type, an error occurs.
Table 5: Conversion Functions
Header text | Header text | Header text |
---|---|---|
Example | Example | Example |
Example | Example | Example |
Example | Example | Example |
Example
REM Conversion Functions Example PRINT "CBYTE(99.44) = " & CBYTE(99.44) PRINT "CCUR(9283.066) = " & CCUR(9283.066) PRINT "CDATE(8/18/98) = " & CDATE("8/18/98") PRINT "CDBL(3.141593) = " & CDBL("3.141593") PRINT "CINT(3.141593) = " & CINT("3.141593") PRINT "CSNG(10) = " & CSNG(10) PRINT "CSTR(TRUE) = " & CSTR(TRUE)
Output
CBYTE(99.44) = 99 CCUR(9283.066) = 9283.066 CDATE(8/18/98) = 8/18/1998 CDBL(3.141593) = 3.141593 CINT(3.141593) = 3 CSNG(10) = 10 CSTR(TRUE) = True
Related Items'