
179
■
Calling a user-defined function (
SUB
function)
This statement calls a user-defined function specified by
functionname
. You
may omit
CALL
when calling a
SUB
function.
•
functionname
should be a user-defined function defined by
SUB
...
END
SUB
statement.
• The number of
realparameter
s should be equal to that of
dummyparame-
ter
s, and the types of the corresponding variables used in those parameters
should be identical.
• If you specify a global variable in
realparameter
when calling a user-defined
function, the user-defined function cannot update the value of the global variable.
This is because all
realparameter
s are passed not by address but by value.
(So called "Call-by-value")
Syntax errors:
NOTE
Before any call to a
SUB
function, you need to place definition of the
SUB
function or declaration of the
SUB
function by using the
DECLARE
state-
ment in your source program.
Error code and message
Meaning
error 3: ’"’ missing
No double quote precedes or follows
[drivename:]filename
.
error 68: Mismatch
• The number of real parameters is not
equal to that of the dummy parameters.
•
dummyparameter
was an integer
variable in defining a function, but
realparameter
is a real type in call-
ing the function. (If a dummy parameter
was a real variable in defining a function
and
realparameter
is an integer
type in calling, then no error occurs.)
error 71: Syntax error
•
[drivename:]filename
is not
enclosed in double quotes.
• The function specified by
function-
name
has not been defined.
Содержание BHT-BASIC 100 SERIES
Страница 1: ......
Страница 161: ...153 Chapter 10 Sleep Function CONTENTS 10 1 Sleep Function 154...
Страница 163: ...155 Chapter 11 Resume Function CONTENTS 11 1 Resume Function 156...
Страница 173: ...165 Chapter 13 Backlight Function CONTENTS 13 1 Backlight Function 166...
Страница 192: ...Chapter 14 Statement Reference 184 Example OPEN master Dat AS 1 FIELD 1 20 AS bar 10 AS ky CLFILE 1 CLOSE 1...
Страница 249: ...241 Example CLOSE IF kyIn Y THEN KILL Master Dat END IF Reference Statements CLFILE...
Страница 349: ...341 Run time errors Error code Meaning 05h Parameter out of the range checktype is out of the range...
Страница 383: ...375 Run time errors Reference Error code Meaning 05h Parameter out of the range Functions LEFT LEN and RIGHT...