首页题目详情

下列代码中,哪一个是正确的函数定义语法?

题目配图
A.Function Add(a As Integer, b As Integer) As Integer
B.Function Add(a, b) As Integer
C.Func Add(a As Integer, b As Integer) As Integer
D.Sub Add(a As Integer, b As Integer) As Integer

优质解答

答案

A

解析

在Visual Basic中,函数定义使用Function,参数类型最好明确书写,函数返回类型也需指定,而Func不是Visual Basic的关键字。

查看答案和解析

支付 ¥0.1 即可查看此题答案和详细解析

低至 ¥0.1 起

Visual Basic语言程序设计单选题中等AI生成