Marking up

From BeebWiki
Revision as of 20:05, 29 November 2010 by Jgharston (talk) (Settled on 'bold code' for inline code examples.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Page titles

Use initial capital letter then lower case for page titles and headings, only capitalising those items that are natually capitalised. For example, "Marking up", "What BASIC is running", "Econet over IP"; not "Marking Up", "What BASIC Is Running", "Econet Over IP".

Headings

If the following standard headings are used, they should be used in this order, as second-level heading (surrounded by two '='s):

  • See also
  • External links
  • References

Numbers

Write numbers in the way that BASIC would understand them, for instance prefix with & for hex, no prefix for decimal, prefix with % for binary. This applies to page titles and the contents of pages. For instance:

  • OSWORD 10 reads a character definition
  • OSWORD &10 transmits a network packet

BASIC code

Where BASIC or machine code is used within blocks of text it should be marked up as bold code. The following markup:

<code>'''CLOSE#chn'''</code> calls OSFIND 0. <code>'''LDA #0'''</code> sets the zero flag.

gives the following text:

CLOSE#chn calls OSFIND 0. LDA #0 sets the zero flag.

Star commands

Mark up star commands and examples as bold typewriter text. The following markup:

<tt>'''*BBCtoBMP Jarre -mode 1 Jarre/bmp'''</tt>

gives the following text:

*BBCtoBMP Jarre -mode 1 Jarre/bmp

Blocks of code

Blocks of code should be marked up as a block of code by indenting each line with at least one space. To give a consistant layout between pages use four spaces. The following markup:

(space)(space)(space)(space)DEFFNf_date(d%,m%,y%):y%=y%-1981:=d%+m%*256+(y%AND15)*4096+(y%DIV16)*32
(space)(space)(space)(space)DEFFNf_time(h%,m%,s%):=h%+m%*256+s%*65536

gives the following text:

   DEFFNf_date(d%,m%,y%):y%=y%-1981:=d%+m%*256+(y%AND15)*4096+(y%DIV16)*32
   DEFFNf_time(h%,m%,s%):=h%+m%*256+s%*65536

Others notes

It's BBC BASIC and BASIC, not BBC Basic or Basic. Basic refers to the generic language.