为了账号安全,请及时绑定邮箱和手机立即绑定

请问该怎么测试,oracle function函数?

请问该怎么测试,oracle function函数?

不负相思意 2019-07-09 10:06:36
怎么测试,oracle function函数
查看完整描述

5 回答

?
明月笑刀无情

TA贡献1828条经验 获得超4个赞

怎么测试,oracle function函数
比如你定义了一个函数:
create FUNCTION y2
(inx2 number)
return number is
Result number(2);
begin

Result := inx2*inx2;

return(Result);
end y2;

查看完整回答
反对 回复 2019-07-14
?
慕容708150

TA贡献1831条经验 获得超4个赞

Private Sub Command1_Click()
n = CInt(InputBox("N="))
y = fac(n)
MsgBox n & "!=" & y
End Sub

Function fac(n)
If n = 0 Or n = 1 Then fac = 1 Else fac = n * fac(n - 1)
End Function



查看完整回答
反对 回复 2019-07-14
?
慕森卡

TA贡献1806条经验 获得超8个赞

Private Sub Command1_Click()

  a = CInt(Text1.Text)

  b = CInt(Text2.Text)

  x = 0

  gcd a, b, x

  Label1.Caption = "Gcd(" & a & "," & b & ")=" & x

  

End Sub


Private Sub Form_Load()

  Label1.Caption = ""

  Text1.Text = ""

  Text2.Text = ""

End Sub


Sub gcd(a, b, x)

  If a Mod b = 0 Then

    x = b

  Else

    gcd b, a Mod b, x

  End If

End Sub



查看完整回答
反对 回复 2019-07-14
?
RISEBY

TA贡献1856条经验 获得超5个赞

1

2

3

4

5

6

7

8

Function Factorial(n As Integer) As Double

If Factorial = 0 Then Factorial = 1

If n > 1 Then Factorial = n * Factorial(n - 1)

End Function

 

Private Sub Form_Click() '点击窗体运行

MsgBox "阶乘计算结果为 " & Factorial(Val(InputBox("请输入一个整数,不要太大")))

End Sub


查看完整回答
反对 回复 2019-07-14
?
青春有我

TA贡献1784条经验 获得超8个赞

Private Function Factorial1(intN As Integer) As Integer
If intN = 0 Then
Factorial1 = 1
Else
Factorial1 = Factorial1(intN - 1) * intN
End If
End Function

查看完整回答
反对 回复 2019-07-14
  • 5 回答
  • 0 关注
  • 1187 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信