Home » Archimedes archive » Archimedes World » AW-1993-11.adf » AWNov93 » !AWNov93/Goodies/RISC_OS/DeskApps/Function1

!AWNov93/Goodies/RISC_OS/DeskApps/Function1

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-1993-11.adf » AWNov93
Filename: !AWNov93/Goodies/RISC_OS/DeskApps/Function1
Read OK:
File size: 0435 bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
| This is a function file for dragging onto the application !Function
| which is used in conjunction with !TinyDirs (See Help file for !Function)

| N.B. Any line beginning with a vertical slash is a comment and will be
|      ignored by the program (as are blank lines)

| Purpose : To draw the graphs of a set of functions

          | The list of functions MUST be preceded by a screen command
          | E.g.
 
Screen -1,8*PI,-2,2

          | This can be interpreted as saying that the functions
          | y=f(x)  are to be drawn in the rectangle

          |              -1<x<8*PI , -2<y<2
          | of the (x,y) plane.

| Now the list of functions (in the variable "x" LOWER CASE)          

SINx

EXP(-x/10)*SINx

EXP(-x/10)

| The command SAVE causes a *SCREENSAVE, using name "Screen", to be
| made to the same directory as this file.

| Remove the comment slash before the word "SAVE" if you want this.

| SAVE

| N.B. Error detection in this program is not very good so if
|      departures are made from above instructions funny things may
|      happen.


00000000  0a 7c 20 54 68 69 73 20  69 73 20 61 20 66 75 6e  |.| This is a fun|
00000010  63 74 69 6f 6e 20 66 69  6c 65 20 66 6f 72 20 64  |ction file for d|
00000020  72 61 67 67 69 6e 67 20  6f 6e 74 6f 20 74 68 65  |ragging onto the|
00000030  20 61 70 70 6c 69 63 61  74 69 6f 6e 20 21 46 75  | application !Fu|
00000040  6e 63 74 69 6f 6e 0a 7c  20 77 68 69 63 68 20 69  |nction.| which i|
00000050  73 20 75 73 65 64 20 69  6e 20 63 6f 6e 6a 75 6e  |s used in conjun|
00000060  63 74 69 6f 6e 20 77 69  74 68 20 21 54 69 6e 79  |ction with !Tiny|
00000070  44 69 72 73 20 28 53 65  65 20 48 65 6c 70 20 66  |Dirs (See Help f|
00000080  69 6c 65 20 66 6f 72 20  21 46 75 6e 63 74 69 6f  |ile for !Functio|
00000090  6e 29 0a 0a 7c 20 4e 2e  42 2e 20 41 6e 79 20 6c  |n)..| N.B. Any l|
000000a0  69 6e 65 20 62 65 67 69  6e 6e 69 6e 67 20 77 69  |ine beginning wi|
000000b0  74 68 20 61 20 76 65 72  74 69 63 61 6c 20 73 6c  |th a vertical sl|
000000c0  61 73 68 20 69 73 20 61  20 63 6f 6d 6d 65 6e 74  |ash is a comment|
000000d0  20 61 6e 64 20 77 69 6c  6c 20 62 65 0a 7c 20 20  | and will be.|  |
000000e0  20 20 20 20 69 67 6e 6f  72 65 64 20 62 79 20 74  |    ignored by t|
000000f0  68 65 20 70 72 6f 67 72  61 6d 20 28 61 73 20 61  |he program (as a|
00000100  72 65 20 62 6c 61 6e 6b  20 6c 69 6e 65 73 29 0a  |re blank lines).|
00000110  0a 7c 20 50 75 72 70 6f  73 65 20 3a 20 54 6f 20  |.| Purpose : To |
00000120  64 72 61 77 20 74 68 65  20 67 72 61 70 68 73 20  |draw the graphs |
00000130  6f 66 20 61 20 73 65 74  20 6f 66 20 66 75 6e 63  |of a set of func|
00000140  74 69 6f 6e 73 0a 0a 20  20 20 20 20 20 20 20 20  |tions..         |
00000150  20 7c 20 54 68 65 20 6c  69 73 74 20 6f 66 20 66  | | The list of f|
00000160  75 6e 63 74 69 6f 6e 73  20 4d 55 53 54 20 62 65  |unctions MUST be|
00000170  20 70 72 65 63 65 64 65  64 20 62 79 20 61 20 73  | preceded by a s|
00000180  63 72 65 65 6e 20 63 6f  6d 6d 61 6e 64 0a 20 20  |creen command.  |
00000190  20 20 20 20 20 20 20 20  7c 20 45 2e 67 2e 0a 20  |        | E.g.. |
000001a0  0a 53 63 72 65 65 6e 20  2d 31 2c 38 2a 50 49 2c  |.Screen -1,8*PI,|
000001b0  2d 32 2c 32 0a 0a 20 20  20 20 20 20 20 20 20 20  |-2,2..          |
000001c0  7c 20 54 68 69 73 20 63  61 6e 20 62 65 20 69 6e  || This can be in|
000001d0  74 65 72 70 72 65 74 65  64 20 61 73 20 73 61 79  |terpreted as say|
000001e0  69 6e 67 20 74 68 61 74  20 74 68 65 20 66 75 6e  |ing that the fun|
000001f0  63 74 69 6f 6e 73 0a 20  20 20 20 20 20 20 20 20  |ctions.         |
00000200  20 7c 20 79 3d 66 28 78  29 20 20 61 72 65 20 74  | | y=f(x)  are t|
00000210  6f 20 62 65 20 64 72 61  77 6e 20 69 6e 20 74 68  |o be drawn in th|
00000220  65 20 72 65 63 74 61 6e  67 6c 65 0a 0a 20 20 20  |e rectangle..   |
00000230  20 20 20 20 20 20 20 7c  20 20 20 20 20 20 20 20  |       |        |
00000240  20 20 20 20 20 20 2d 31  3c 78 3c 38 2a 50 49 20  |      -1<x<8*PI |
00000250  2c 20 2d 32 3c 79 3c 32  0a 20 20 20 20 20 20 20  |, -2<y<2.       |
00000260  20 20 20 7c 20 6f 66 20  74 68 65 20 28 78 2c 79  |   | of the (x,y|
00000270  29 20 70 6c 61 6e 65 2e  0a 0a 7c 20 4e 6f 77 20  |) plane...| Now |
00000280  74 68 65 20 6c 69 73 74  20 6f 66 20 66 75 6e 63  |the list of func|
00000290  74 69 6f 6e 73 20 28 69  6e 20 74 68 65 20 76 61  |tions (in the va|
000002a0  72 69 61 62 6c 65 20 22  78 22 20 4c 4f 57 45 52  |riable "x" LOWER|
000002b0  20 43 41 53 45 29 20 20  20 20 20 20 20 20 20 20  | CASE)          |
000002c0  0a 0a 53 49 4e 78 0a 0a  45 58 50 28 2d 78 2f 31  |..SINx..EXP(-x/1|
000002d0  30 29 2a 53 49 4e 78 0a  0a 45 58 50 28 2d 78 2f  |0)*SINx..EXP(-x/|
000002e0  31 30 29 0a 0a 7c 20 54  68 65 20 63 6f 6d 6d 61  |10)..| The comma|
000002f0  6e 64 20 53 41 56 45 20  63 61 75 73 65 73 20 61  |nd SAVE causes a|
00000300  20 2a 53 43 52 45 45 4e  53 41 56 45 2c 20 75 73  | *SCREENSAVE, us|
00000310  69 6e 67 20 6e 61 6d 65  20 22 53 63 72 65 65 6e  |ing name "Screen|
00000320  22 2c 20 74 6f 20 62 65  0a 7c 20 6d 61 64 65 20  |", to be.| made |
00000330  74 6f 20 74 68 65 20 73  61 6d 65 20 64 69 72 65  |to the same dire|
00000340  63 74 6f 72 79 20 61 73  20 74 68 69 73 20 66 69  |ctory as this fi|
00000350  6c 65 2e 0a 0a 7c 20 52  65 6d 6f 76 65 20 74 68  |le...| Remove th|
00000360  65 20 63 6f 6d 6d 65 6e  74 20 73 6c 61 73 68 20  |e comment slash |
00000370  62 65 66 6f 72 65 20 74  68 65 20 77 6f 72 64 20  |before the word |
00000380  22 53 41 56 45 22 20 69  66 20 79 6f 75 20 77 61  |"SAVE" if you wa|
00000390  6e 74 20 74 68 69 73 2e  0a 0a 7c 20 53 41 56 45  |nt this...| SAVE|
000003a0  0a 0a 7c 20 4e 2e 42 2e  20 45 72 72 6f 72 20 64  |..| N.B. Error d|
000003b0  65 74 65 63 74 69 6f 6e  20 69 6e 20 74 68 69 73  |etection in this|
000003c0  20 70 72 6f 67 72 61 6d  20 69 73 20 6e 6f 74 20  | program is not |
000003d0  76 65 72 79 20 67 6f 6f  64 20 73 6f 20 69 66 0a  |very good so if.|
000003e0  7c 20 20 20 20 20 20 64  65 70 61 72 74 75 72 65  ||      departure|
000003f0  73 20 61 72 65 20 6d 61  64 65 20 66 72 6f 6d 20  |s are made from |
00000400  61 62 6f 76 65 20 69 6e  73 74 72 75 63 74 69 6f  |above instructio|
00000410  6e 73 20 66 75 6e 6e 79  20 74 68 69 6e 67 73 20  |ns funny things |
00000420  6d 61 79 0a 7c 20 20 20  20 20 20 68 61 70 70 65  |may.|      happe|
00000430  6e 2e 0a 0a 0a                                    |n....|
00000435