Home » Archimedes archive » Archimedes World » AW-1995-02-Disc1.adf » Disk1Feb95 » !AWFeb95/Goodies/BasicComp/!BC/Examples/EVariable

!AWFeb95/Goodies/BasicComp/!BC/Examples/EVariable

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-02-Disc1.adf » Disk1Feb95
Filename: !AWFeb95/Goodies/BasicComp/!BC/Examples/EVariable
Read OK:
File size: 022A bytes
Load address: 0000
Exec address: 0000
File contents
    1REM  Compressing this file without `E' suppression will produce bad BASIC
    2REM  This is because there is a THEN missing
    3REM  If you are in the habit of omitting THEN statements then use this
    4REM  safeguard (Output->Reduce variable names->`E' suppression, or -EVariable
    5REM  if calling from CLI)
    6REM  Proper programmers (!), who always put in the THEN's, can enjoy the
    7REM  benefits of slightly better compressed variables
    8:
    9a% = 1
   10IF a%<>0 a% = 2
   11PRINT a%
   12:
   13REM  BASIC doesn't mind if "IFE%=0E%=2"!  Why?  What's different about "<>"?
K�  Compressing this file without `E' suppression will produce bad BASIC
.�  This is because there is a THEN missing
H�  If you are in the habit of omitting THEN statements then use this
O�  safeguard (Output->Reduce variable names->`E' suppression, or -EVariable
�  if calling from CLI)
J�  Proper programmers (!), who always put in the THEN's, can enjoy the
7�  benefits of slightly better compressed variables
:
	
a% = 1

� a%<>0 a% = 2
� a%
:

N�  BASIC doesn't mind if "IFE%=0E%=2"!  Why?  What's different about "<>"?
�
00000000  0d 00 01 4b f4 20 20 43  6f 6d 70 72 65 73 73 69  |...K.  Compressi|
00000010  6e 67 20 74 68 69 73 20  66 69 6c 65 20 77 69 74  |ng this file wit|
00000020  68 6f 75 74 20 60 45 27  20 73 75 70 70 72 65 73  |hout `E' suppres|
00000030  73 69 6f 6e 20 77 69 6c  6c 20 70 72 6f 64 75 63  |sion will produc|
00000040  65 20 62 61 64 20 42 41  53 49 43 0d 00 02 2e f4  |e bad BASIC.....|
00000050  20 20 54 68 69 73 20 69  73 20 62 65 63 61 75 73  |  This is becaus|
00000060  65 20 74 68 65 72 65 20  69 73 20 61 20 54 48 45  |e there is a THE|
00000070  4e 20 6d 69 73 73 69 6e  67 0d 00 03 48 f4 20 20  |N missing...H.  |
00000080  49 66 20 79 6f 75 20 61  72 65 20 69 6e 20 74 68  |If you are in th|
00000090  65 20 68 61 62 69 74 20  6f 66 20 6f 6d 69 74 74  |e habit of omitt|
000000a0  69 6e 67 20 54 48 45 4e  20 73 74 61 74 65 6d 65  |ing THEN stateme|
000000b0  6e 74 73 20 74 68 65 6e  20 75 73 65 20 74 68 69  |nts then use thi|
000000c0  73 0d 00 04 4f f4 20 20  73 61 66 65 67 75 61 72  |s...O.  safeguar|
000000d0  64 20 28 4f 75 74 70 75  74 2d 3e 52 65 64 75 63  |d (Output->Reduc|
000000e0  65 20 76 61 72 69 61 62  6c 65 20 6e 61 6d 65 73  |e variable names|
000000f0  2d 3e 60 45 27 20 73 75  70 70 72 65 73 73 69 6f  |->`E' suppressio|
00000100  6e 2c 20 6f 72 20 2d 45  56 61 72 69 61 62 6c 65  |n, or -EVariable|
00000110  0d 00 05 1b f4 20 20 69  66 20 63 61 6c 6c 69 6e  |.....  if callin|
00000120  67 20 66 72 6f 6d 20 43  4c 49 29 0d 00 06 4a f4  |g from CLI)...J.|
00000130  20 20 50 72 6f 70 65 72  20 70 72 6f 67 72 61 6d  |  Proper program|
00000140  6d 65 72 73 20 28 21 29  2c 20 77 68 6f 20 61 6c  |mers (!), who al|
00000150  77 61 79 73 20 70 75 74  20 69 6e 20 74 68 65 20  |ways put in the |
00000160  54 48 45 4e 27 73 2c 20  63 61 6e 20 65 6e 6a 6f  |THEN's, can enjo|
00000170  79 20 74 68 65 0d 00 07  37 f4 20 20 62 65 6e 65  |y the...7.  bene|
00000180  66 69 74 73 20 6f 66 20  73 6c 69 67 68 74 6c 79  |fits of slightly|
00000190  20 62 65 74 74 65 72 20  63 6f 6d 70 72 65 73 73  | better compress|
000001a0  65 64 20 76 61 72 69 61  62 6c 65 73 0d 00 08 05  |ed variables....|
000001b0  3a 0d 00 09 0a 61 25 20  3d 20 31 0d 00 0a 12 e7  |:....a% = 1.....|
000001c0  20 61 25 3c 3e 30 20 61  25 20 3d 20 32 0d 00 0b  | a%<>0 a% = 2...|
000001d0  08 f1 20 61 25 0d 00 0c  05 3a 0d 00 0d 4e f4 20  |.. a%....:...N. |
000001e0  20 42 41 53 49 43 20 64  6f 65 73 6e 27 74 20 6d  | BASIC doesn't m|
000001f0  69 6e 64 20 69 66 20 22  49 46 45 25 3d 30 45 25  |ind if "IFE%=0E%|
00000200  3d 32 22 21 20 20 57 68  79 3f 20 20 57 68 61 74  |=2"!  Why?  What|
00000210  27 73 20 64 69 66 66 65  72 65 6e 74 20 61 62 6f  |'s different abo|
00000220  75 74 20 22 3c 3e 22 3f  0d ff                    |ut "<>"?..|
0000022a