Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak » !SLIPdial/Resources/UK/Help/case
!SLIPdial/Resources/UK/Help/case
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 » Acorn User » AU 1995-04.adf » !Internet_StarterPak |
Filename: | !SLIPdial/Resources/UK/Help/case |
Read OK: | ✔ |
File size: | 0156 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
case <value|variable> starts a case...when...endcase structure. when <value> [<value> ... ] ; <commands> executes the remainder of the line if one of values matches the current "case" value. Note this only acts on the rest of the same line containing the "when" statement. endcase marks the end of a case...when...endcase structure.
00000000 63 61 73 65 20 3c 76 61 6c 75 65 7c 76 61 72 69 |case <value|vari| 00000010 61 62 6c 65 3e 0a 20 73 74 61 72 74 73 20 61 20 |able>. starts a | 00000020 63 61 73 65 2e 2e 2e 77 68 65 6e 2e 2e 2e 65 6e |case...when...en| 00000030 64 63 61 73 65 20 73 74 72 75 63 74 75 72 65 2e |dcase structure.| 00000040 0a 0a 77 68 65 6e 20 3c 76 61 6c 75 65 3e 20 5b |..when <value> [| 00000050 3c 76 61 6c 75 65 3e 20 2e 2e 2e 20 5d 20 3b 20 |<value> ... ] ; | 00000060 3c 63 6f 6d 6d 61 6e 64 73 3e 0a 20 65 78 65 63 |<commands>. exec| 00000070 75 74 65 73 20 74 68 65 20 72 65 6d 61 69 6e 64 |utes the remaind| 00000080 65 72 20 6f 66 20 74 68 65 20 6c 69 6e 65 20 69 |er of the line i| 00000090 66 20 6f 6e 65 20 6f 66 20 76 61 6c 75 65 73 20 |f one of values | 000000a0 6d 61 74 63 68 65 73 20 74 68 65 20 63 75 72 72 |matches the curr| 000000b0 65 6e 74 0a 20 20 22 63 61 73 65 22 20 76 61 6c |ent. "case" val| 000000c0 75 65 2e 20 4e 6f 74 65 20 74 68 69 73 20 6f 6e |ue. Note this on| 000000d0 6c 79 20 61 63 74 73 20 6f 6e 20 74 68 65 20 72 |ly acts on the r| 000000e0 65 73 74 20 6f 66 20 74 68 65 20 73 61 6d 65 20 |est of the same | 000000f0 6c 69 6e 65 20 63 6f 6e 74 61 69 6e 69 6e 67 0a |line containing.| 00000100 20 20 74 68 65 20 22 77 68 65 6e 22 20 73 74 61 | the "when" sta| 00000110 74 65 6d 65 6e 74 2e 0a 0a 65 6e 64 63 61 73 65 |tement...endcase| 00000120 0a 20 6d 61 72 6b 73 20 74 68 65 20 65 6e 64 20 |. marks the end | 00000130 6f 66 20 61 20 63 61 73 65 2e 2e 2e 77 68 65 6e |of a case...when| 00000140 2e 2e 2e 65 6e 64 63 61 73 65 20 73 74 72 75 63 |...endcase struc| 00000150 74 75 72 65 2e 0a |ture..| 00000156