Home » Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_9_14b

!AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_9_14b

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-1995-02-Disc1.adf » Disk1Feb95
Filename: !AWFeb95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_9_14b
Read OK:
File size: 00DB bytes
Load address: 0000
Exec address: 0000
File contents
�ScreenL(-10,5,-2,2)
�Graph("FNf(x)",400)
�Quit

DEF FNf(x)
REM --------------------------------------
REM
REM This function is undefined for -5<x<0
REM
REM -------------------------------------
IF x<-5 THEN =1 ELSE=LNx
00000000  a0 53 63 72 65 65 6e 4c  28 2d 31 30 2c 35 2c 2d  |.ScreenL(-10,5,-|
00000010  32 2c 32 29 0a a0 47 72  61 70 68 28 22 46 4e 66  |2,2)..Graph("FNf|
00000020  28 78 29 22 2c 34 30 30  29 0a a0 51 75 69 74 0a  |(x)",400)..Quit.|
00000030  0a 44 45 46 20 46 4e 66  28 78 29 0a 52 45 4d 20  |.DEF FNf(x).REM |
00000040  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000060  2d 2d 2d 2d 2d 2d 0a 52  45 4d 0a 52 45 4d 20 54  |------.REM.REM T|
00000070  68 69 73 20 66 75 6e 63  74 69 6f 6e 20 69 73 20  |his function is |
00000080  75 6e 64 65 66 69 6e 65  64 20 66 6f 72 20 2d 35  |undefined for -5|
00000090  3c 78 3c 30 0a 52 45 4d  0a 52 45 4d 20 2d 2d 2d  |<x<0.REM.REM ---|
000000a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000000c0  2d 2d 0a 49 46 20 78 3c  2d 35 20 54 48 45 4e 20  |--.IF x<-5 THEN |
000000d0  3d 31 20 45 4c 53 45 3d  4c 4e 78                 |=1 ELSE=LNx|
000000db