Modular Programming in Qbasic
Modular Programming in Qbasic
A function is the same as a subroutine, except it returns a value. To return a value, set a
variable with the same name as the function.
Sample FUNCTION:
PRINT Add(10, 7)
FUNCTION Add (num1, num2)
Add = num1 + num2
END FUNCTION