Specifications

Chapter 8 185
Save and Recall Files
Example Programs for Saving/Recalling a File
8. Save and Recall Files
2180 PRINT
2190 PRINT "1: 1 Port"
2200 PRINT "2: 2 Port Series"
2210 PRINT "3: 2 Port Shunt"
2220 PRINT
2230 INPUT "Select the CITIfile model type [1-3]",Model
2240 !
2250 Input_name:!
2260 INPUT "Input CITIfile name without extension you wish to
save.",File$
2270 File$=""""&File$&""""
2280 PRINT "file name : "&File$
2290 PRINT
2300 INPUT "Do you want to change file name again?
[Y/N]",Inp_chr$
2310 IF UPC$(Inp_chr$)="N" THEN
2320 OUTPUT @Agte4991a;"MMEM:STOR:CITI"&VAL$(Model)&" "&File$
2330 OUTPUT @Agte4991a;"SYST:ERR?"
2340 ENTER @Agte4991a;Err_no,Err_mes$
2350 IF Err_no<>0 THEN
2360 BEEP
2370 PRINT Err_mes$&" occured"
2380 PRINT
2390 GOTO Input_name
2400 ELSE
2410 PRINT "save done"
2420 PRINT
2430 END IF
2440 ELSE
2450 GOTO Input_name
2460 END IF
2470 SUBEND
2480 !
2490 SUB Save_graphics(@Agte4991a)
2500 DIM File$[256],Inp_chr$[30],File_type$[30],Err_mes$[50]
2510 INTEGER Err_no
2520 !
2530 PRINT "Select the File Type, BMP or JPEG"
2540 PRINT
2550 INPUT "Input the first letter of a word [B/J]",File_type$
2560 !
2570 Input_name:!
2580 INPUT "Input data file name without extension you wish to
save.",File$
2590 File$=""""&File$&""""
2600 PRINT "file name : "&File$
2610 PRINT
2620 INPUT "Do you want to change file name again?
[Y/N]",Inp_chr$
2630 IF UPC$(Inp_chr$)="N" THEN
2640 IF UPC$(Inp_chr$[1,1])="B" THEN
2650 OUTPUT @Agte4991a;"MMEM:STOR:GRAP:BMP "&File$
2660 ELSE
2670 OUTPUT @Agte4991a;"MMEM:STOR:GRAP "&File$
2680 END IF
2690 OUTPUT @Agte4991a;"SYST:ERR?"
2700 ENTER @Agte4991a;Err_no,Err_mes$
2710 IF Err_no<>0 THEN