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.
 
 
 
 
 
 

27 lines
900 B

  1. 1000 rem ------------------------------------------
  2. 1010 rem Filename: abs1.bas
  3. 1020 rem Purpose: Verify ABS()
  4. 1100 rem ------------------------------------------
  5. 1120 X = -1.23456789
  6. 1130 RESULT = ABS( X )
  7. 1140 print "The absolute value of "; X; " is"; RESULT
  8. 1150 if RESULT <> 1.23456789 then goto TestFailed
  9. 1160 print "*** TEST #1 PASSED ***"
  10. 1200 rem ------------------------------------------
  11. 1220 X = 1.23456789
  12. 1230 RESULT = ABS( X )
  13. 1240 print "The absolute value of "; X; " is"; RESULT
  14. 1250 if RESULT <> 1.23456789 then goto TestFailed
  15. 1260 print "*** TEST #2 PASSED ***"
  16. 8000 rem ------------------------------------------
  17. 8010 TestPassed:
  18. 8020 print "*** ALL TESTS PASSED ***"
  19. 8030 goto TheEnd
  20. 8500 rem ------------------------------------------
  21. 8510 TestFailed:
  22. 8520 print "*** TEST FAILED ***"
  23. 8530 goto TheEnd
  24. 9000 rem ------------------------------------------
  25. 9010 TheEnd:
  26. 9999 end