把一个数值型对象x转换成字符型对象,下面那个语句是正确的()
A: as.integer(x)
B: is.character(x)
C: as.character(typeof(x))
D: is.integer(x)
A: as.integer(x)
B: is.character(x)
C: as.character(typeof(x))
D: is.integer(x)
举一反三
- 下面可以正确定义2个整形变量和一个字符型变量的语句是() A: Dim x%, y As Integer, n As String B: Dim x As Integer, y, n As String C: Dim x, y As Integer, n As String D: Dim x%, y$, n As String
- 下面哪些定义是类型正确的? A: f :: (Integer, Integer) - Floatf (x,y) =x / y B: f :: (Integer, Integer) - Floatf (x,y) = (fromInteger x) / (fromInteger y) C: f :: (Integer, Integer) - Floatf (x,y) = 3*x + y D: f :: (Integer, Integer) - Integerf (x, y) = 3*x + y
- 假定有一个模块,在其中定义一个公共变量,正确的是________。 A: Dim x as Integer B: Public Dim x as Integer C: Dim Public x as Integer D: Public x as Integer
- 要在窗体Form1中定义一个可以在窗体Form2中使用的整型变量X,可在Form1窗体的通用部分输入语句( )。 A: Dim X As Integer B: Static X As Integer C: Private X As Integer D: Public X As Integer
- 下面程序片段中有错误:Sub pric() Public x As Integer x = Array(1, 2, 3, 4, 5) ……End Sub为了避免出错,正确的修改方案是_______________。 A: 把Public x As Integer 改为Public x As Variant B: 把Public x As Integer 改为Dim x(5) C: 把Public x As Integer 改为Static x D: 把x = Array(1, 2, 3, 4, 5)改为x = Array(0, 1, 2, 3, 4)