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.
 
 
 
 
 
 

34 lines
1.1 KiB

  1. 00100 REM ----------------------------------------------------
  2. 00110 REM FILENAME: ceil1.bas
  3. 00120 REM PURPOSE: Verify CEIL()
  4. 00130 REM AUTHOR: Howard Wulf AF5NE
  5. 00140 REM DATE: October 15th, 2014
  6. 00150 REM ----------------------------------------------------
  7. 01000 REM ----------------------------------------------------
  8. 01010 REM TEST POSITIVE VALUE
  9. 01020 REM ----------------------------------------------------
  10. 01100 let a = 2.1
  11. 01110 let c = ceil( a )
  12. 01120 print c
  13. 01130 if c <> 3 then goto TestFailed
  14. 01140 print "*** TEST #1 PASSED ***"
  15. 02000 REM ----------------------------------------------------
  16. 02010 REM TEST NEGATIVE VALUE
  17. 02020 REM ----------------------------------------------------
  18. 02100 let a = -2.1
  19. 02110 let c = ceil( a )
  20. 02120 print c
  21. 02130 if c <> -2 then goto TestFailed
  22. 02140 print "*** TEST #2 PASSED ***"
  23. 8000 rem ------------------------------------------
  24. 8010 TestPassed:
  25. 8020 print "*** ALL TESTS PASSED ***"
  26. 8030 goto TheEnd
  27. 8500 rem ------------------------------------------
  28. 8510 TestFailed:
  29. 8520 print "*** TEST FAILED ***"
  30. 8530 goto TheEnd
  31. 9000 rem ------------------------------------------
  32. 9010 TheEnd:
  33. 9999 end