Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak » !SLIPdial/Resources/UK/Help/if
!SLIPdial/Resources/UK/Help/if
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/if |
Read OK: | ✔ |
File size: | 0102 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
if (<command>) <command> conditionally execute a command depending on status returned from another command. For example: if (?file $.lemming) exit exits the script if the file $.lemming exists. You can also negate the test: if (!?file $.lemming) exit
00000000 69 66 20 28 3c 63 6f 6d 6d 61 6e 64 3e 29 20 3c |if (<command>) <| 00000010 63 6f 6d 6d 61 6e 64 3e 0a 20 63 6f 6e 64 69 74 |command>. condit| 00000020 69 6f 6e 61 6c 6c 79 20 65 78 65 63 75 74 65 20 |ionally execute | 00000030 61 20 63 6f 6d 6d 61 6e 64 20 64 65 70 65 6e 64 |a command depend| 00000040 69 6e 67 20 6f 6e 20 73 74 61 74 75 73 20 72 65 |ing on status re| 00000050 74 75 72 6e 65 64 20 66 72 6f 6d 20 61 6e 6f 74 |turned from anot| 00000060 68 65 72 0a 20 63 6f 6d 6d 61 6e 64 2e 20 46 6f |her. command. Fo| 00000070 72 20 65 78 61 6d 70 6c 65 3a 0a 20 69 66 20 28 |r example:. if (| 00000080 3f 66 69 6c 65 20 24 2e 6c 65 6d 6d 69 6e 67 29 |?file $.lemming)| 00000090 20 65 78 69 74 0a 20 20 65 78 69 74 73 20 74 68 | exit. exits th| 000000a0 65 20 73 63 72 69 70 74 20 69 66 20 74 68 65 20 |e script if the | 000000b0 66 69 6c 65 20 24 2e 6c 65 6d 6d 69 6e 67 20 65 |file $.lemming e| 000000c0 78 69 73 74 73 2e 20 59 6f 75 20 63 61 6e 20 61 |xists. You can a| 000000d0 6c 73 6f 20 6e 65 67 61 74 65 20 74 68 65 20 74 |lso negate the t| 000000e0 65 73 74 3a 0a 20 20 69 66 20 28 21 3f 66 69 6c |est:. if (!?fil| 000000f0 65 20 24 2e 6c 65 6d 6d 69 6e 67 29 20 65 78 69 |e $.lemming) exi| 00000100 74 0a |t.| 00000102