CWTA Issue 32 - August 1987 - Type-Ins

From CPCWiki - THE Amstrad CPC encyclopedia!
Jump to: navigation, search

The following listings were published in the August 1987 issue of Computing_with_the_Amstrad:


  • Ascii File Compacter (Ian Sharpe)
  • Hungry Snappers (Dak Long Lau)
  • Ripple (Sid Barnes)
  • Rebounder (Robert Surridge)
  • Xor (Jordi Domenech)
  • Anagrams (Andrew Rahaman)
  • Xfile (Julian Hustwitt)
  • Dragon Curve II (John Hulbert)


  • The Postbag had an improvement by Alan Iwi to Robin Nixon's Procedures that sets up RSX |STARTP to allow the passing of integer variables to procedures. This was followed by a listing demonstrating a recursive program, Towers of Hanoi.
  • There was a Postbag listing for Pythagorean Triples by Geoffrey Edge (included on dsk image)
  • The Postbag also published corrections for the Amstrad Rom, Disc Catalogue and Fractal Technique listings.

Text file compacter

The program compact.bas sets up two new commands - |COMPACT,@f1$,@f2$ and |EXPAND,@f1$,@f2$. With |COMPACT, f1$ is the text file to be compacted and f2$ is the name to call the compacted file. So if you [464 users] want to compact a file called "bigfile" and call it "tinyfile" you would use

  • f1$="bigfile"
  • f2$="tinyfile"
  • |COMPACT,@f1$,@f2$

CPC664/6128 users can use |COMPACT,"bigfile","tinyfile"

Exapnding a file with |EXPAND is the reverse process, so f1$ would be the name of the compacted file and f2$ the expanded file.

The only limitation is that your source file should not contain characters above 128 which means special control codes and the pound sign. These will be converted into a legal character below 128 but not converted back when you expand the file. The pound is converted to hash (£ > #).