Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak » !SLIPdial/Resources/UK/Help/set

!SLIPdial/Resources/UK/Help/set

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/set
Read OK:
File size: 047F bytes
Load address: 0000
Exec address: 0000
File contents
set <variable> <value> [<variable> <value> ... ]
 assigns a value to a script variable. <value> should be quoted if it
 includes spaces. More than one variable/value pair may be set at once.
Some variables are defined automatically during script execution. These are:

$status
 contains values returned from script commands, often indicating success
 or failure, but can indicate more detailed results.

port
 contains driver and port in use (set by "port" command)

speed
 contains baud rate (set by "speed" command)

ipaddress
 contains IP address detected by "ipget" command. Setting this variable causes
 automatic recalculation of the variables ip1,ip2,ip3,ip4, and updates the
 "IP" address field in the status window.

ip1,ip2,ip3,ip4
 contain the four components of a detected IP address.

route
 set to %ip1.%ip2.%ip3.254 by "ipget", but you can of course alter it
 yourself.

p1 p2 p3 (etc)
 parameters passed to a subroutine. Note these are NOT preserved throughout
 the execution of the subroutine and will be destroyed by further calls to
 other routines. Transfer values to variables of your own if you want to
 keep them for later use.
00000000  73 65 74 20 3c 76 61 72  69 61 62 6c 65 3e 20 3c  |set <variable> <|
00000010  76 61 6c 75 65 3e 20 5b  3c 76 61 72 69 61 62 6c  |value> [<variabl|
00000020  65 3e 20 3c 76 61 6c 75  65 3e 20 2e 2e 2e 20 5d  |e> <value> ... ]|
00000030  0a 20 61 73 73 69 67 6e  73 20 61 20 76 61 6c 75  |. assigns a valu|
00000040  65 20 74 6f 20 61 20 73  63 72 69 70 74 20 76 61  |e to a script va|
00000050  72 69 61 62 6c 65 2e 20  3c 76 61 6c 75 65 3e 20  |riable. <value> |
00000060  73 68 6f 75 6c 64 20 62  65 20 71 75 6f 74 65 64  |should be quoted|
00000070  20 69 66 20 69 74 0a 20  69 6e 63 6c 75 64 65 73  | if it. includes|
00000080  20 73 70 61 63 65 73 2e  20 4d 6f 72 65 20 74 68  | spaces. More th|
00000090  61 6e 20 6f 6e 65 20 76  61 72 69 61 62 6c 65 2f  |an one variable/|
000000a0  76 61 6c 75 65 20 70 61  69 72 20 6d 61 79 20 62  |value pair may b|
000000b0  65 20 73 65 74 20 61 74  20 6f 6e 63 65 2e 0a 53  |e set at once..S|
000000c0  6f 6d 65 20 76 61 72 69  61 62 6c 65 73 20 61 72  |ome variables ar|
000000d0  65 20 64 65 66 69 6e 65  64 20 61 75 74 6f 6d 61  |e defined automa|
000000e0  74 69 63 61 6c 6c 79 20  64 75 72 69 6e 67 20 73  |tically during s|
000000f0  63 72 69 70 74 20 65 78  65 63 75 74 69 6f 6e 2e  |cript execution.|
00000100  20 54 68 65 73 65 20 61  72 65 3a 0a 0a 24 73 74  | These are:..$st|
00000110  61 74 75 73 0a 20 63 6f  6e 74 61 69 6e 73 20 76  |atus. contains v|
00000120  61 6c 75 65 73 20 72 65  74 75 72 6e 65 64 20 66  |alues returned f|
00000130  72 6f 6d 20 73 63 72 69  70 74 20 63 6f 6d 6d 61  |rom script comma|
00000140  6e 64 73 2c 20 6f 66 74  65 6e 20 69 6e 64 69 63  |nds, often indic|
00000150  61 74 69 6e 67 20 73 75  63 63 65 73 73 0a 20 6f  |ating success. o|
00000160  72 20 66 61 69 6c 75 72  65 2c 20 62 75 74 20 63  |r failure, but c|
00000170  61 6e 20 69 6e 64 69 63  61 74 65 20 6d 6f 72 65  |an indicate more|
00000180  20 64 65 74 61 69 6c 65  64 20 72 65 73 75 6c 74  | detailed result|
00000190  73 2e 0a 0a 70 6f 72 74  0a 20 63 6f 6e 74 61 69  |s...port. contai|
000001a0  6e 73 20 64 72 69 76 65  72 20 61 6e 64 20 70 6f  |ns driver and po|
000001b0  72 74 20 69 6e 20 75 73  65 20 28 73 65 74 20 62  |rt in use (set b|
000001c0  79 20 22 70 6f 72 74 22  20 63 6f 6d 6d 61 6e 64  |y "port" command|
000001d0  29 0a 0a 73 70 65 65 64  0a 20 63 6f 6e 74 61 69  |)..speed. contai|
000001e0  6e 73 20 62 61 75 64 20  72 61 74 65 20 28 73 65  |ns baud rate (se|
000001f0  74 20 62 79 20 22 73 70  65 65 64 22 20 63 6f 6d  |t by "speed" com|
00000200  6d 61 6e 64 29 0a 0a 69  70 61 64 64 72 65 73 73  |mand)..ipaddress|
00000210  0a 20 63 6f 6e 74 61 69  6e 73 20 49 50 20 61 64  |. contains IP ad|
00000220  64 72 65 73 73 20 64 65  74 65 63 74 65 64 20 62  |dress detected b|
00000230  79 20 22 69 70 67 65 74  22 20 63 6f 6d 6d 61 6e  |y "ipget" comman|
00000240  64 2e 20 53 65 74 74 69  6e 67 20 74 68 69 73 20  |d. Setting this |
00000250  76 61 72 69 61 62 6c 65  20 63 61 75 73 65 73 0a  |variable causes.|
00000260  20 61 75 74 6f 6d 61 74  69 63 20 72 65 63 61 6c  | automatic recal|
00000270  63 75 6c 61 74 69 6f 6e  20 6f 66 20 74 68 65 20  |culation of the |
00000280  76 61 72 69 61 62 6c 65  73 20 69 70 31 2c 69 70  |variables ip1,ip|
00000290  32 2c 69 70 33 2c 69 70  34 2c 20 61 6e 64 20 75  |2,ip3,ip4, and u|
000002a0  70 64 61 74 65 73 20 74  68 65 0a 20 22 49 50 22  |pdates the. "IP"|
000002b0  20 61 64 64 72 65 73 73  20 66 69 65 6c 64 20 69  | address field i|
000002c0  6e 20 74 68 65 20 73 74  61 74 75 73 20 77 69 6e  |n the status win|
000002d0  64 6f 77 2e 0a 0a 69 70  31 2c 69 70 32 2c 69 70  |dow...ip1,ip2,ip|
000002e0  33 2c 69 70 34 0a 20 63  6f 6e 74 61 69 6e 20 74  |3,ip4. contain t|
000002f0  68 65 20 66 6f 75 72 20  63 6f 6d 70 6f 6e 65 6e  |he four componen|
00000300  74 73 20 6f 66 20 61 20  64 65 74 65 63 74 65 64  |ts of a detected|
00000310  20 49 50 20 61 64 64 72  65 73 73 2e 0a 0a 72 6f  | IP address...ro|
00000320  75 74 65 0a 20 73 65 74  20 74 6f 20 25 69 70 31  |ute. set to %ip1|
00000330  2e 25 69 70 32 2e 25 69  70 33 2e 32 35 34 20 62  |.%ip2.%ip3.254 b|
00000340  79 20 22 69 70 67 65 74  22 2c 20 62 75 74 20 79  |y "ipget", but y|
00000350  6f 75 20 63 61 6e 20 6f  66 20 63 6f 75 72 73 65  |ou can of course|
00000360  20 61 6c 74 65 72 20 69  74 0a 20 79 6f 75 72 73  | alter it. yours|
00000370  65 6c 66 2e 0a 0a 70 31  20 70 32 20 70 33 20 28  |elf...p1 p2 p3 (|
00000380  65 74 63 29 0a 20 70 61  72 61 6d 65 74 65 72 73  |etc). parameters|
00000390  20 70 61 73 73 65 64 20  74 6f 20 61 20 73 75 62  | passed to a sub|
000003a0  72 6f 75 74 69 6e 65 2e  20 4e 6f 74 65 20 74 68  |routine. Note th|
000003b0  65 73 65 20 61 72 65 20  4e 4f 54 20 70 72 65 73  |ese are NOT pres|
000003c0  65 72 76 65 64 20 74 68  72 6f 75 67 68 6f 75 74  |erved throughout|
000003d0  0a 20 74 68 65 20 65 78  65 63 75 74 69 6f 6e 20  |. the execution |
000003e0  6f 66 20 74 68 65 20 73  75 62 72 6f 75 74 69 6e  |of the subroutin|
000003f0  65 20 61 6e 64 20 77 69  6c 6c 20 62 65 20 64 65  |e and will be de|
00000400  73 74 72 6f 79 65 64 20  62 79 20 66 75 72 74 68  |stroyed by furth|
00000410  65 72 20 63 61 6c 6c 73  20 74 6f 0a 20 6f 74 68  |er calls to. oth|
00000420  65 72 20 72 6f 75 74 69  6e 65 73 2e 20 54 72 61  |er routines. Tra|
00000430  6e 73 66 65 72 20 76 61  6c 75 65 73 20 74 6f 20  |nsfer values to |
00000440  76 61 72 69 61 62 6c 65  73 20 6f 66 20 79 6f 75  |variables of you|
00000450  72 20 6f 77 6e 20 69 66  20 79 6f 75 20 77 61 6e  |r own if you wan|
00000460  74 20 74 6f 0a 20 6b 65  65 70 20 74 68 65 6d 20  |t to. keep them |
00000470  66 6f 72 20 6c 61 74 65  72 20 75 73 65 2e 0a     |for later use..|
0000047f