A-code styles

## Difference between A-code styles ## Sorry, this section is still under construction! ## Contents
Introduction to A-code styles From Style 1 to Style 2 From Style 1 to Style 10 From Style 10 to Style 11/12
### Introduction to A-code styles The notion of A-code styles came relatively late, when I decided to teach myself C by re-implementing the A-code engine using the translate/compile architecture, in place of Platt's original munge/interpret one. I wanted the new implementation to support both Platt's Adv550 and my own Adv660 (a merger of Luckett's and Pike's Adv440 with Adv550). Because there were some incompatibilities between A-code of Adv550 and that of Adv660 (most notably text switch components being counted from 1 or from 0 respectively), it became necessary for a game's code to signal how it is to be treated. Logically enough, Platt's A-code was designated as Style 1. Remembering the many changes my form of Platt's munger/executive underwent before Adv660 was made generally available on the Net, I arbitrarily assigned Style 10 to the final version of Adv660. (Luckily it was not Style 2, because years later it was convenient to assign Style 2 to the re-discovered Goetz's Adv580.) Thus the STYLE major directive, to fix the style of an A-code game. As things stand, style numbers are assigned as follows: Style 1 – the style of Platt's A-code source of Adv550. Style 2 – the style of Goetz's A-code source of Adv580. Styles 3 to 9 – lost in the mists of time, having existed briefly in the process of my merging of Adv440 and Adv550 into Adv660. Style 10 – the style of my A-code source of Adv660. Style 11 – the initial style of my Adv770. Style 12 – the current A-code style. Taking Platt's A-code as the base, let's look at changes brought in by different styles, bearing in mind that only the style 1 to style 10 transition is of historical significance. ### From Style 1 to Style 2 The style of Goetz's Adv580 A-code differs very little from Style 1. It relaxes in-line comment convention. While Style 1 in-line comments must start with the open brace character '{', Style 2 also permits square '[' and round '(' brackets as in-line text delimiters. It introduces CIF and CENDIF major directives in order to use selectively normal or "bowdlerised" versions of some texts. ### From Style 1 to Style 10 Text switch modification and generalisation: Switch components are counted from zero rather than from one. Switches are permitted in all texts, including object and place descriptions. Multiple long object/place descriptions (%) deprecated - replaced by text switches. Major directive changes: Deprecated LIST, NOLOST and XREF. Added NOISE (and preferred) as a synonym to NULLWORD. Added PROC (and preferred) as a synonym to LABEL. Added FRAGMENT. Deprecated SYNONYM in favour of OBJECT name list. Minor directive changes: Added DOALL and FLUSH for handling GET/DROP ALL. Added IFHERE, IFINRANGE and IFIS. Added ITERATE, QUIP and RANDOMISE. Deprecated ITLIST (synonym of ITOBJ). Deprecated AT, HAVE and NEAR. Deprecated EOF, EOI, EOR (subsumed into FIN). Deprecated NAME (subsumed into SAY). Player interface All player vocabulary words automatically abbreviated to the minimal unambiguous length. GET/DROP ALL enabled. AGAIN enabled. Object detailed description category (&). ### From Style 10 to Style 11/12 Since enhancements that came in under style 12 are also retrospectively available in style 11, it makes sense to lump 11 and 12 ogether for the purposes of compaing the to style 10. The change from 11 to 12 was dictated by a major surgery on the acdc A-code to C translator to make it operate in two passes instead of one. The pupose was to allow game entities to be referred to by game code before the relevant entity declarations. This is particularlly handy in debugging via "wizard mode" code optionally included in game source via the INCLUDE? major directive. See a separate document on debugging A-code games. (New major directives: ARRAY, STATE, CONSTANT, FLAGS.) (ITOBJ takes flag and state supplementary arguments.) (Yet more new minor directives, ANYOF and KEYWORD deprecated.) (Argument ellipsis IFAT, IFIS, IFLOC) (In-line texts.) (CGI mode.) (Library mode.) (Local variables, and procedure arguments.) (Context and undo mechanisms.) (Compound commands, typo correction, output word scanning.) (Internationalisation.) (Ellipsis for FLAG, UNFLAG.) (Adds Style 2 CIF and CENDIF.)