Home » Archimedes archive » Archimedes World » AW-1995-01-Disc1.adf » Disk1Jan95 » !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_5_12

!AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_5_12

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-1995-01-Disc1.adf » Disk1Jan95
Filename: !AWJan95/Goodies/DrawBasic/!DrawBasic/Library/Examples/Chapter/Ex_5_12
Read OK:
File size: 018C bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
REM Creates a user-defined pattern

�Width(10)
�Dash(�NewPattern)
�HLine(1,1,5)
�Quit

DEF �NewPattern
LOCAL pattern
pattern=�DashPattern(3)   : REM pattern has 3 elements
�DashLength(pattern,1,20) : REM 1st element (stroke) of length 20 points
�DashLength(pattern,2,10) : REM 2nd element (dash) of length 10 points
�DashLength(pattern,3,5)  : REM 3rd element (stroke) of length 5 points
=pattern
00000000  52 45 4d 20 43 72 65 61  74 65 73 20 61 20 75 73  |REM Creates a us|
00000010  65 72 2d 64 65 66 69 6e  65 64 20 70 61 74 74 65  |er-defined patte|
00000020  72 6e 0a 0a a0 57 69 64  74 68 28 31 30 29 0a a0  |rn...Width(10)..|
00000030  44 61 73 68 28 bb 4e 65  77 50 61 74 74 65 72 6e  |Dash(.NewPattern|
00000040  29 0a a0 48 4c 69 6e 65  28 31 2c 31 2c 35 29 0a  |)..HLine(1,1,5).|
00000050  a0 51 75 69 74 0a 0a 44  45 46 20 bb 4e 65 77 50  |.Quit..DEF .NewP|
00000060  61 74 74 65 72 6e 0a 4c  4f 43 41 4c 20 70 61 74  |attern.LOCAL pat|
00000070  74 65 72 6e 0a 70 61 74  74 65 72 6e 3d bb 44 61  |tern.pattern=.Da|
00000080  73 68 50 61 74 74 65 72  6e 28 33 29 20 20 20 3a  |shPattern(3)   :|
00000090  20 52 45 4d 20 70 61 74  74 65 72 6e 20 68 61 73  | REM pattern has|
000000a0  20 33 20 65 6c 65 6d 65  6e 74 73 0a a0 44 61 73  | 3 elements..Das|
000000b0  68 4c 65 6e 67 74 68 28  70 61 74 74 65 72 6e 2c  |hLength(pattern,|
000000c0  31 2c 32 30 29 20 3a 20  52 45 4d 20 31 73 74 20  |1,20) : REM 1st |
000000d0  65 6c 65 6d 65 6e 74 20  28 73 74 72 6f 6b 65 29  |element (stroke)|
000000e0  20 6f 66 20 6c 65 6e 67  74 68 20 32 30 20 70 6f  | of length 20 po|
000000f0  69 6e 74 73 0a a0 44 61  73 68 4c 65 6e 67 74 68  |ints..DashLength|
00000100  28 70 61 74 74 65 72 6e  2c 32 2c 31 30 29 20 3a  |(pattern,2,10) :|
00000110  20 52 45 4d 20 32 6e 64  20 65 6c 65 6d 65 6e 74  | REM 2nd element|
00000120  20 28 64 61 73 68 29 20  6f 66 20 6c 65 6e 67 74  | (dash) of lengt|
00000130  68 20 31 30 20 70 6f 69  6e 74 73 0a a0 44 61 73  |h 10 points..Das|
00000140  68 4c 65 6e 67 74 68 28  70 61 74 74 65 72 6e 2c  |hLength(pattern,|
00000150  33 2c 35 29 20 20 3a 20  52 45 4d 20 33 72 64 20  |3,5)  : REM 3rd |
00000160  65 6c 65 6d 65 6e 74 20  28 73 74 72 6f 6b 65 29  |element (stroke)|
00000170  20 6f 66 20 6c 65 6e 67  74 68 20 35 20 70 6f 69  | of length 5 poi|
00000180  6e 74 73 0a 3d 70 61 74  74 65 72 6e              |nts.=pattern|
0000018c