I am a 'newbie' to VB5. My last programming was about 10 years ago. I wrote a program then in QBASIC to help out in my work. I am now trying to rewrite it in VB5 but I am having problems.

Can anyone help out ?

The part of my rewrite I am having difficulty with is an interpolation routine. The routine needs to read in several items of data in a two-dimension array.

I.e.
0.01 5 10 15 20 25 30 35
0.611 0.872 1.227 1.704 2.337 3.166 4.241 5.622

The number in the top row is temperature and the number in the bottom row is vapour pressure at the temperature above. The two lines of data are therefore related.

I cannot see how to rewrite this in VB as data, which the routine can access, and then use for the calculation.

A simplified interpolation routine is below which is in BASIC.

The data here is arranged thus on the same principle:

1 2 3 4 6
1 2 3 4 6

DEMONSTRATION INTERPOLATION ROUTINE


LIST

10 PRINT “LAGRANGIAN INTERPOLATION FOR H GIVEN T”
11 PRINT
12 DIM T (5), H (5)
13 FOR N = 0 TO 4
14 READ T (N), H (N)
15 NEXT N
16 PRINT “ WHAT IS VALUE OF T FOR INTERPOLATION?”
17 INPUT A
18 B=0
19 FOR J = 0 TO 4
20 X=1
21 FOR N = 0 TO 4
22 IF N = J THEN GOTO
23 X=X (A-T (N))/(T (J))-T (N))
24 NEXT N
25 B=B+X*H (J)
26 NEXT J
27 PRINT “ RESULT AT THE GIVEN VALUE OF T, Y = “: B
28 REM DATA FOR INTERPOLATION
29 DATA 1, 1
30 DATA 2, 2
31 DATA 3, 3
32 DATA 4, 4
33 DATA 6, 6
34 END


‘SCREEN DUMP RESULTS’


RUN
LAGRANGIAN INTERPOLATION FOR H GIVEN T

WHAT IS THE VALUE OF T FOR INTERPOLATION?
? 5
RESULT AT THE GIVEN VALUE OF T, Y = 5

STOP AT 34