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.
|
- 1000 rem ------------------------------------------
- 1010 rem Filename: abs1.bas
- 1020 rem Purpose: Verify ABS()
- 1100 rem ------------------------------------------
- 1120 X = -1.23456789
- 1130 RESULT = ABS( X )
- 1140 print "The absolute value of "; X; " is"; RESULT
- 1150 if RESULT <> 1.23456789 then goto TestFailed
- 1160 print "*** TEST #1 PASSED ***"
- 1200 rem ------------------------------------------
- 1220 X = 1.23456789
- 1230 RESULT = ABS( X )
- 1240 print "The absolute value of "; X; " is"; RESULT
- 1250 if RESULT <> 1.23456789 then goto TestFailed
- 1260 print "*** TEST #2 PASSED ***"
- 8000 rem ------------------------------------------
- 8010 TestPassed:
- 8020 print "*** ALL TESTS PASSED ***"
- 8030 goto TheEnd
- 8500 rem ------------------------------------------
- 8510 TestFailed:
- 8520 print "*** TEST FAILED ***"
- 8530 goto TheEnd
- 9000 rem ------------------------------------------
- 9010 TheEnd:
- 9999 end
|