Denso BHT-200QW Especificaciones Pagina 186

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 587
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 185
178
Description:
Description:Description:
Description:
Creating a user-defined function
DEF FN creates a user-defined function.
Definition of a user-defined function should appear preceding a calling statement of the
user-defined function in a source program.
You cannot make double definition to a same function name.
• The DEF FN statement should not be defined in the block-structured statements (DEF
FN ..END DEF, FOR ..NEXT, FUNCTION ..END FUNCTION,
IF ..THEN ...ELSE ..END IF, SELECT ..CASE ..END SELECT, SUB ..END SUB
and WHILE ..WEND), in the error-handling routine, event-handling routine, or in the
subroutines.
DEF FN functions cannot be recursive.
The type of functionname should match that of the function definition expression.
In defining a string function, you can specify the maximum stringlength for a return
value. If its specification is omitted, the default value of 40 characters takes effect.
dummyparameter, which corresponds to the variable having the same name in the
function definition expression, is a local variable valid only in that expression .
Therefore, if a variable having the same name as dummyparameter is used outside
DEF FN statement or used as a dummyparameter of any other function in the same
program, then it will be independently treated.
expression describes some operations for the user-defined function. It should be
within one program line including definition described left to the equal sign (=).
expression can call other user-defined functions. You can nest DEF FN statements to
a maximum of 10 levels.
If variables other than dummyparameter(s) are specified in expression, they will be
treated as global variables whose current values are available.
stringlength should be enclosed with a pair of square brackets [ ].
Calling a user-defined function
FN functionname calls a user-defined function.
The number of realparameters should be equal to that of dummyparameters, 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 realparameters are passed not by address but by value. (So called
"Call-by-value")
Vista de pagina 185
1 2 ... 181 182 183 184 185 186 187 188 189 190 191 ... 586 587

Comentarios a estos manuales

Sin comentarios