CALL
Action

Call and execute a subroutine.

Syntax

CALL Test [(var1, var-n)]

Remarks

var1 Any BASCOM variable or constant..
var-n Any BASCOM variable or constant.
Test Name of the subroutine. In this case Test
With the CALL statement you can call a procedure or subroutine.
As much as 10 parameters can be passed but you can also call a subroutine without parameters.
For example : Call Test2

The call statement enables you to implement your own statements.

You don't have to use the CALL statement :
Test2 will also call subroutine test2

When you don't supply the CALL statement, you must leave out the parenthesis.
So Call Routine(x,y,z) must be written as Routine x,y,x

See also
DECLARE, SUB

Example


Dim a as byte, b as byte
Declare Sub Test(b1 as byte)
a = 65
Call test (a) 'call test with parameter A
test a 'alternative call
End

SUB Test(b1 as byte) 'use the same variable as the declared one
LCD b 'put it on the LCD
Lowerline
LCD BCD(b1)
End SUB