AnsweredAssumed Answered

allocating an array in iBASIC

Question asked by dorielle on Oct 18, 2007
I am writing a FOR loop that takes compensation data and puts it into an array "Temp" and "Open".  Each loop corresponds to 50 data points that will be placed into the array. The first loop should place data into array slots 1-50, the second loop should place data into array slots 51-100, etc.

Does anyone know how to allocate an array to accommodate this?
The sample program ("SCANNER") in the Agilent programming manual uses:
ALLOCATE Open(1:Point(Max_chan+1),1:2),Temp(1:Point(Max_chan+1),1:2); however ALLOCATE is not compatible with the Hp4294a Analyzer. I am unable to use variables when I define the array as: INTEGER Open(...)

Below is an excerpt from the program:

752 Point(0)=0
753 FOR I=1 TO Max_chan
754 Point(I)=Point(I-1)+50
756 NEXT I

850 FOR I=1 TO Max_chan
860 PRINT "Channel "&VAL$(I)&" is activated."
870 Result=FNFixt_comp(@Hp4294a,Scode,"Open")
880 IF Result<>0 THEN Prog_end
890 OUTPUT @Hp4294a;"OUTPCOMC1?"
900 ENTER @Hp4294a USING "#,8A";Header$
910 ENTER @Binary;Temp(*)
920 ENTER @Hp4294a USING "#,1A";Buff$
930 FOR J=Point(I-1)+1 TO Point(I)
940 Open(J,1)=Temp(J,1)
950 Open(J,2)=Temp(J,2)
960 NEXT J
980 NEXT I