ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

33 lines
891 B

  1. rem ----------------------------------------------------
  2. rem CallSub.BAS
  3. rem ----------------------------------------------------
  4. Print "CallSub.BAS -- Test BASIC Call and Sub Statements"
  5. Print "The next printed line should be from the Subroutine."
  6. Print
  7. testvar = 17
  8. Call TestSub( 5, "Hello", testvar)
  9. Print
  10. Print "This is back at the main program. "
  11. Print "The value of variable <testvar> is now "; testvar
  12. Print "Did it work?"
  13. End
  14. rem ----------------------------------------------------
  15. rem Subroutine TestSub
  16. rem ----------------------------------------------------
  17. Sub TestSub( xarg, yarg$, tvar )
  18. Print "This is written from the Subroutine."
  19. Print "The value of variable <xarg> is"; xarg
  20. Print "The value of variable <yarg$> is "; yarg$
  21. Print "The value of variable <tvar> is "; tvar
  22. tvar = 99
  23. Print "The value of variable <tvar> is reset to "; tvar
  24. End Sub