Re: Dr. Jim's BASIC dumping ground
Posted: Thu Aug 20, 2020 10:07 pm
This is a program I've had kicking around since at least 2002, and I've occasionally added to it since then (though not since 2006). It generates UK number plates, in white and yellow.
So I picked it up again (after watching a lot of HubNut videos, if you must know), and over the last couple of days I streamlined the BASIC - cleaning up variables, subroutines and the like that were a bit of a mess - and got that working with very few visual changes to what it was 14 years ago. Here's what it generates:
- 2001-present style plates up to the "20" series (i.e. AB20CDE)
- 1963-1983 suffix plates (i.e. ABC123A) and 1983-2001 prefix plates (i.e. A123ABC), including Q prefixes for kit cars
- Basic Northern Ireland plates with the most recent three letters, four numbers combination (e.g. ABZ1234, AIB1234)
The screenshot above is what I did today, making as good an approximation as I can get of the Charles Wright Narrow font that fits into two character squares. Letters are defined using capitals for the top half and lower case for the bottom half, numbers use their standard character for the top half and "CODE minus 176" (space to closed bracket) for the bottom half, most of which correspond to SYMBOL SHIFT plus the number.
There are a few "quirks and features", as Doug DeMuro would say, where I've done as much as I think I can to make the plates realistic:
- Plates up to a J suffix (31 July 1971) always appear as white on black.
- The Doovla specifies "undesirable" three-letter combinations that it will never issue (e.g. SEX, GOD, JEW and some odd ones like ABF) that I've held in a DATA statement - these are excluded, and so are the Manx three-letter combinations MAN and *MN.
- Likewise, "undesirable" two-letter combinations in 2001 plates (e.g. FU, NF) or others set aside for special use (e.g. GO, DR) as well as the J*, T*, U* and XG-XY combinations that were not assigned to regions have been excluded.
- Also excluded were the number combinations from prefix plates that were set aside for special use (i.e. 1-20, and all multiples of 10, 11, 100 and 111). Such numbers on suffix plates are fine, as the Doovla hadn't yet worked out there was money to be made that way.
- There are other oddities such as the abolition of X* as regional identifiers in the 1963-2001 plates after 1974 (and some had already been scrapped in 1964). I've taken this into account in a compromised way, in that *X* combinations can only occur on a black plate. Hence, you'll never see Richard's Rover SD3 from early episodes of Keeping Up Appearances (D541EXL, which is invalid), but you might see its replacement when the BBC realised their mistake (D541EFL) or the 1966 reverse version (EXL541D, which is valid and would appear white on black).
- Some regional identifiers were scrapped (e.g. *SY) or never used, but even though a table of these is available it's far too much hassle to implement it correctly so I haven't bothered. Plus it would slow down the program far too much more than it already is.
- Northern Ireland plates only show regional identifiers that have been used in Northern Ireland with the current system (three letters, four numbers) - so it's not just a random I or Z thrown into the second or third letter. For example: Belfast uses or has used *OI, *XI, *AZ, *CZ, *EZ, *FZ and *GZ as the second and third of the three letters; reverse combinations with a Z in the middle, for instance, were all used in the Republic of Ireland before the 1987 reform and are not included here. There's no way of knowing how far the current registrations have progressed, so I've allowed any combination from the current series (i.e. anything from AGZ1001, which is almost certain to have been issued, through to YGZ9998, which has not). The only recent combination I missed out was *YZ, used in County Londonderry (careful now) since January 2020, so there are barely any of them out there.
It's unlikely anyone will want to see this program in action, and besides I've got a bigger plan for it, so I'm not putting it on general release just yet, unless anyone wants to ask for a copy.