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

!AWNov93/Goodies/RISC_OS/Examples/Example_6

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/Examples/Example_6
Read OK:
File size: 0236 bytes
Load address: 0000
Exec address: 0000
File contents
|  Archimedes World Guide to RISCOS_CLI      "VARIABLES"

|  Program : Example 6
   
|  Purpose : Illustrates the use of Aliases
|
|            N.B. vertical slash indicates a comment (like "REM" in BASIC)
 


Echo Alias checking takes place prior to commands in the kernel.
Echo DANGER! This means that the normal commands can be changed. Eg.
Echo
Echo Set Alias$Cat Echo Mieow!
Echo *Cat
Echo
Set Alias$Cat Echo Mieow!
Cat
Echo
Echo To ensure that the alias checking is skipped
Echo preface the command by a percent sign %   Eg.
Echo *%cat
Echo
%Cat



Unset Cat

00000000  7c 20 20 41 72 63 68 69  6d 65 64 65 73 20 57 6f  ||  Archimedes Wo|
00000010  72 6c 64 20 47 75 69 64  65 20 74 6f 20 52 49 53  |rld Guide to RIS|
00000020  43 4f 53 5f 43 4c 49 20  20 20 20 20 20 22 56 41  |COS_CLI      "VA|
00000030  52 49 41 42 4c 45 53 22  0a 0a 7c 20 20 50 72 6f  |RIABLES"..|  Pro|
00000040  67 72 61 6d 20 3a 20 45  78 61 6d 70 6c 65 20 36  |gram : Example 6|
00000050  0a 20 20 20 0a 7c 20 20  50 75 72 70 6f 73 65 20  |.   .|  Purpose |
00000060  3a 20 49 6c 6c 75 73 74  72 61 74 65 73 20 74 68  |: Illustrates th|
00000070  65 20 75 73 65 20 6f 66  20 41 6c 69 61 73 65 73  |e use of Aliases|
00000080  0a 7c 0a 7c 20 20 20 20  20 20 20 20 20 20 20 20  |.|.|            |
00000090  4e 2e 42 2e 20 76 65 72  74 69 63 61 6c 20 73 6c  |N.B. vertical sl|
000000a0  61 73 68 20 69 6e 64 69  63 61 74 65 73 20 61 20  |ash indicates a |
000000b0  63 6f 6d 6d 65 6e 74 20  28 6c 69 6b 65 20 22 52  |comment (like "R|
000000c0  45 4d 22 20 69 6e 20 42  41 53 49 43 29 0a 20 0a  |EM" in BASIC). .|
000000d0  0a 0a 45 63 68 6f 20 41  6c 69 61 73 20 63 68 65  |..Echo Alias che|
000000e0  63 6b 69 6e 67 20 74 61  6b 65 73 20 70 6c 61 63  |cking takes plac|
000000f0  65 20 70 72 69 6f 72 20  74 6f 20 63 6f 6d 6d 61  |e prior to comma|
00000100  6e 64 73 20 69 6e 20 74  68 65 20 6b 65 72 6e 65  |nds in the kerne|
00000110  6c 2e 0a 45 63 68 6f 20  44 41 4e 47 45 52 21 20  |l..Echo DANGER! |
00000120  54 68 69 73 20 6d 65 61  6e 73 20 74 68 61 74 20  |This means that |
00000130  74 68 65 20 6e 6f 72 6d  61 6c 20 63 6f 6d 6d 61  |the normal comma|
00000140  6e 64 73 20 63 61 6e 20  62 65 20 63 68 61 6e 67  |nds can be chang|
00000150  65 64 2e 20 45 67 2e 0a  45 63 68 6f 0a 45 63 68  |ed. Eg..Echo.Ech|
00000160  6f 20 53 65 74 20 41 6c  69 61 73 24 43 61 74 20  |o Set Alias$Cat |
00000170  45 63 68 6f 20 4d 69 65  6f 77 21 0a 45 63 68 6f  |Echo Mieow!.Echo|
00000180  20 2a 43 61 74 0a 45 63  68 6f 0a 53 65 74 20 41  | *Cat.Echo.Set A|
00000190  6c 69 61 73 24 43 61 74  20 45 63 68 6f 20 4d 69  |lias$Cat Echo Mi|
000001a0  65 6f 77 21 0a 43 61 74  0a 45 63 68 6f 0a 45 63  |eow!.Cat.Echo.Ec|
000001b0  68 6f 20 54 6f 20 65 6e  73 75 72 65 20 74 68 61  |ho To ensure tha|
000001c0  74 20 74 68 65 20 61 6c  69 61 73 20 63 68 65 63  |t the alias chec|
000001d0  6b 69 6e 67 20 69 73 20  73 6b 69 70 70 65 64 0a  |king is skipped.|
000001e0  45 63 68 6f 20 70 72 65  66 61 63 65 20 74 68 65  |Echo preface the|
000001f0  20 63 6f 6d 6d 61 6e 64  20 62 79 20 61 20 70 65  | command by a pe|
00000200  72 63 65 6e 74 20 73 69  67 6e 20 25 20 20 20 45  |rcent sign %   E|
00000210  67 2e 0a 45 63 68 6f 20  2a 25 63 61 74 0a 45 63  |g..Echo *%cat.Ec|
00000220  68 6f 0a 25 43 61 74 0a  0a 0a 0a 55 6e 73 65 74  |ho.%Cat....Unset|
00000230  20 43 61 74 0a 0a                                 | Cat..|
00000236