📄 d4r30.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5250
ClientLeft = 60
ClientTop = 345
ClientWidth = 5205
LinkTopic = "Form1"
ScaleHeight = 5250
ScaleWidth = 5205
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 375
Left = 3120
TabIndex = 0
Top = 4320
Width = 1455
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
'PROGRAM D4R30
'Driver for routine ASS
Open "D:\VB常用数值算法集\DATA\FNCVAL.DAT" For Input As #1
Do
Line Input #1, Text$
Loop While Text$ <> "Exponential Integral Ass"
Line Input #1, NVAL$
NVAL = Val(NVAL$)
Print Text$
Print
Print " N B Actual ASS(N,B)"
For I = 1 To NVAL
Line Input #1, DUM$
N = Val(Mid(DUM$, 1, 7))
B = Val(Mid(DUM$, 8, 8))
ACTUAL = Val(Mid(DUM$, 16))
Print Tab(4); Format$(N, "#0.##");
Print Tab(10); Format$(B, "#0.##");
Print Tab(16); Format$(ACTUAL, ".0000000E+00");
Print Tab(32); Format$(ASS(N, B), ".0000000E+00")
Next I
Close #1
End Sub
Function ASS(N, B)
Dim A(15)
A(1) = Exp(-B) / B
If N = 1 Then GoTo 11
DB = 1# / B
For I = 2 To N
A(I) = A(1) + DB * (I - 1) * A(I - 1)
Next I
11 ASS = A(N)
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -