DECLARE SUB add (a,b)
CLS
INPUT "Enter first number"; x
INPUT "Enter second number"; y
CALL add (x,y)
END
SUB add (a,b)
c = a+b
PRINT "The sum is ";c
END
CLS
INPUT "Enter first number"; x
INPUT "Enter second number"; y
CALL add (x,y)
END
SUB add (a,b)
c = a+b
PRINT "The sum is ";c
END
- Here, 'add' is the name of sub procedure. a and b are parameters.
- Here CALL statement calls the sub module or sub procedure 'add' with the answer. x and y are arguments.