Home » Archimedes archive » Archimedes World » AW-1994-12-Disc1.adf » Disk1Dec94 » !AWDec94/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/BASICErr

!AWDec94/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/BASICErr

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1994-12-Disc1.adf » Disk1Dec94
Filename: !AWDec94/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/BASICErr
Read OK:
File size: 03DD bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 3 duplicate copies of this file in the archive:

File contents
    1REM -----------------------------------------------
    2REM
    3REM Demonstrates error throwback for BASIC programs
    4REM The following program line enables error throwback
    5REM
    6REM -----------------------------------------------
    7
    8ON ERROR ON ERROR OFF : CHAIN "Throwback:Error"
    9
   10
   11 n=100
   12 angle=0
   13 FOR i=1 To n
   14  r=SQR(angle)
   15  PRINT r
   16  angle+=2*PI/n
   17  NEXT
   18
   19
   20REM --------------------------------------------------------
   21REM N.B.
   22REM         Throwback Only works if the DrawBasic system is
   23REM          enabled
   24REM         The first command following an ON ERROR call
   25REM          should be "ON ERROR OFF" since any subsequent
   26REM          errors will place your system in a loop
   27REM          causing it to hang. (CTR-BREAK or Alt-BREAK
   28REM          to reset)
   29REM          If "Throwback:Error" can not be found the
   30REM          presence of "ON ERROR OFF" above prevents your
   31REM          system from hanging.
   32REM -----------------------------------------------------
5� -----------------------------------------------
�
5� Demonstrates error throwback for BASIC programs
8� The following program line enables error throwback
�
5� -----------------------------------------------

#� � � � � : � "Throwback:Error"
	



 n=100
 angle=0

 � i=1 To n
  r=�(angle)
	  � r
  angle+=2*�/n
  �


>� --------------------------------------------------------

� N.B.
=�         Throwback Only works if the DrawBasic system is
�          enabled
:�         The first command following an ON ERROR call
<�          should be "ON ERROR OFF" since any subsequent
6�          errors will place your system in a loop
:�          causing it to hang. (CTR-BREAK or Alt-BREAK
�          to reset)
8�          If "Throwback:Error" can not be found the
=�          presence of "ON ERROR OFF" above prevents your
#�          system from hanging.
 ;� -----------------------------------------------------
�
00000000  0d 00 01 35 f4 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |...5. ----------|
00000010  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000030  2d 2d 2d 2d 2d 0d 00 02  05 f4 0d 00 03 35 f4 20  |-----........5. |
00000040  44 65 6d 6f 6e 73 74 72  61 74 65 73 20 65 72 72  |Demonstrates err|
00000050  6f 72 20 74 68 72 6f 77  62 61 63 6b 20 66 6f 72  |or throwback for|
00000060  20 42 41 53 49 43 20 70  72 6f 67 72 61 6d 73 0d  | BASIC programs.|
00000070  00 04 38 f4 20 54 68 65  20 66 6f 6c 6c 6f 77 69  |..8. The followi|
00000080  6e 67 20 70 72 6f 67 72  61 6d 20 6c 69 6e 65 20  |ng program line |
00000090  65 6e 61 62 6c 65 73 20  65 72 72 6f 72 20 74 68  |enables error th|
000000a0  72 6f 77 62 61 63 6b 0d  00 05 05 f4 0d 00 06 35  |rowback........5|
000000b0  f4 20 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |. --------------|
000000c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000000e0  2d 0d 00 07 04 0d 00 08  23 ee 20 85 20 ee 20 85  |-.......#. . . .|
000000f0  20 87 20 3a 20 d7 20 22  54 68 72 6f 77 62 61 63  | . : . "Throwbac|
00000100  6b 3a 45 72 72 6f 72 22  0d 00 09 04 0d 00 0a 04  |k:Error"........|
00000110  0d 00 0b 0a 20 6e 3d 31  30 30 0d 00 0c 0c 20 61  |.... n=100.... a|
00000120  6e 67 6c 65 3d 30 0d 00  0d 0f 20 e3 20 69 3d 31  |ngle=0.... . i=1|
00000130  20 54 6f 20 6e 0d 00 0e  10 20 20 72 3d b6 28 61  | To n....  r=.(a|
00000140  6e 67 6c 65 29 0d 00 0f  09 20 20 f1 20 72 0d 00  |ngle)....  . r..|
00000150  10 12 20 20 61 6e 67 6c  65 2b 3d 32 2a af 2f 6e  |..  angle+=2*./n|
00000160  0d 00 11 07 20 20 ed 0d  00 12 04 0d 00 13 04 0d  |....  ..........|
00000170  00 14 3e f4 20 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..>. -----------|
00000180  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000001a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 00 15  |-------------...|
000001b0  0a f4 20 4e 2e 42 2e 0d  00 16 3d f4 20 20 20 20  |.. N.B....=.    |
000001c0  20 20 20 20 20 54 68 72  6f 77 62 61 63 6b 20 4f  |     Throwback O|
000001d0  6e 6c 79 20 77 6f 72 6b  73 20 69 66 20 74 68 65  |nly works if the|
000001e0  20 44 72 61 77 42 61 73  69 63 20 73 79 73 74 65  | DrawBasic syste|
000001f0  6d 20 69 73 0d 00 17 16  f4 20 20 20 20 20 20 20  |m is.....       |
00000200  20 20 20 65 6e 61 62 6c  65 64 0d 00 18 3a f4 20  |   enabled...:. |
00000210  20 20 20 20 20 20 20 20  54 68 65 20 66 69 72 73  |        The firs|
00000220  74 20 63 6f 6d 6d 61 6e  64 20 66 6f 6c 6c 6f 77  |t command follow|
00000230  69 6e 67 20 61 6e 20 4f  4e 20 45 52 52 4f 52 20  |ing an ON ERROR |
00000240  63 61 6c 6c 0d 00 19 3c  f4 20 20 20 20 20 20 20  |call...<.       |
00000250  20 20 20 73 68 6f 75 6c  64 20 62 65 20 22 4f 4e  |   should be "ON|
00000260  20 45 52 52 4f 52 20 4f  46 46 22 20 73 69 6e 63  | ERROR OFF" sinc|
00000270  65 20 61 6e 79 20 73 75  62 73 65 71 75 65 6e 74  |e any subsequent|
00000280  0d 00 1a 36 f4 20 20 20  20 20 20 20 20 20 20 65  |...6.          e|
00000290  72 72 6f 72 73 20 77 69  6c 6c 20 70 6c 61 63 65  |rrors will place|
000002a0  20 79 6f 75 72 20 73 79  73 74 65 6d 20 69 6e 20  | your system in |
000002b0  61 20 6c 6f 6f 70 0d 00  1b 3a f4 20 20 20 20 20  |a loop...:.     |
000002c0  20 20 20 20 20 63 61 75  73 69 6e 67 20 69 74 20  |     causing it |
000002d0  74 6f 20 68 61 6e 67 2e  20 28 43 54 52 2d 42 52  |to hang. (CTR-BR|
000002e0  45 41 4b 20 6f 72 20 41  6c 74 2d 42 52 45 41 4b  |EAK or Alt-BREAK|
000002f0  0d 00 1c 18 f4 20 20 20  20 20 20 20 20 20 20 74  |.....          t|
00000300  6f 20 72 65 73 65 74 29  0d 00 1d 38 f4 20 20 20  |o reset)...8.   |
00000310  20 20 20 20 20 20 20 49  66 20 22 54 68 72 6f 77  |       If "Throw|
00000320  62 61 63 6b 3a 45 72 72  6f 72 22 20 63 61 6e 20  |back:Error" can |
00000330  6e 6f 74 20 62 65 20 66  6f 75 6e 64 20 74 68 65  |not be found the|
00000340  0d 00 1e 3d f4 20 20 20  20 20 20 20 20 20 20 70  |...=.          p|
00000350  72 65 73 65 6e 63 65 20  6f 66 20 22 4f 4e 20 45  |resence of "ON E|
00000360  52 52 4f 52 20 4f 46 46  22 20 61 62 6f 76 65 20  |RROR OFF" above |
00000370  70 72 65 76 65 6e 74 73  20 79 6f 75 72 0d 00 1f  |prevents your...|
00000380  23 f4 20 20 20 20 20 20  20 20 20 20 73 79 73 74  |#.          syst|
00000390  65 6d 20 66 72 6f 6d 20  68 61 6e 67 69 6e 67 2e  |em from hanging.|
000003a0  0d 00 20 3b f4 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.. ;. ----------|
000003b0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000003d0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d ff           |-----------..|
000003dd