EasyManuals Logo

HP 4155A Programmer's Guide

HP 4155A
241 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #39 background imageLoading...
Page #39 background image
Using HP Instrument BASIC
Other Basic Features of IBASIC
Subprograms and COM Blocks
One of the most powerful constructs available is the subprogram. A
subprogram has its own \context" or state that is distinct from the
main program and all other subprograms. There are several benets of
subprograms.
The subprogram allows you to take advantage of the \top-down design"
method of programming.
You can remove all subtasks from the overall logic ow of the main
program.
You can debug the program by testing each subprogram independently
.
The subprograms can be used to reduce the overall size of the program.
Libraries of commonly used subprograms can be assembled for widespread
use.
Refer to the example program in the previous section. Line 180 calls a
subprogram to store data into a DOS le.
.
.
.
160 END IF
170 NEXT I
180 CALL Save_data
190 END
200 !
210 SUB Save_data
220 COM Data(*)
230 CREATE "data_file",1
240 ASSIGN @File TO "data_file";FORMAT ON
250 OUTPUT @File;Data(*)
260 ASSIGN @File TO *
270 SUBEND
1-22

Table of Contents

Other manuals for HP 4155A

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 4155A and is the answer not in the manual?

HP 4155A Specifications

General IconGeneral
BrandHP
Model4155A
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals