Share this entry

Share this page

14 Science, mathematics, and computing

14.5 Computing

14.5.1 Terminology

The influence of the US on the computing field has resulted in US spelling being adopted for much of the standard vocabulary, such as analog, disk, and program rather than analogue, disc, programme (but note compact disc, digital versatile disc). Phrases such as object-oriented should not be changed to British usage (orientated). Other spellings not forming part of computing terminology should be normalized to British spelling for texts intended wholly or mostly for the UK market.

In the main, the names of programming languages, including acronyms, are styled in upper and lower case (Unix (trademark UNIX), Java, Python, Lisp); capitals are used for abbreviations (PHP, SQL). The plus signs in C++ are styled on the line, not superscripted, and C# (pronounced C sharp) uses a hash on the line, not a sharp sign. While it is acceptable to style different language names differently, ensure that the same style is adopted for the same language throughout a work. Styling of programming language names and many of the other computing abbreviations and terms can be found in the New Oxford Dictionary for Scientific Writers and Editors or the New Oxford Dictionary for Writers and Editors.

Data storage is measured in bytes (symbol B), which is usually defined as 8 bits (b); multiples may appear to use the same prefixes as the SI, including K (not k) for kilo-, M for mega-, G for giga-, T for tera-, but they are in fact binary so a kilobyte (1 KB) is 1024 bytes, a megabyte (1 MB) is 1024 × 1024 bytes, and so on. Note that this usage is confined to data storage—other measurements such as data transmission rates take the standard SI prefixes. Linux and open-source communities often use the International Electrotechnical Commission standard, which uses the prefixes

kibi- (Ki) =

mebi- (Mi) =

gibi- (Gi) =

tebi- (Ti) =

pebi- (Pi) =

210

220

230

240

250

14.5.2 Representation

The text of a computer program or textual data file such as an XML file may be presented in a work in several ways: in whole or in part, displayed or run into text. Not being a prose extract in the traditional sense, any such material is treated rather like an equation, with no minimum size and no small type needed for display.

Where the features of the program or mark-up language require character-literal syntax and precise line breaks, display, indentation, spacing, or special sorts, these must be reproduced exactly. It is wise to insert any lengthy code directly from the source rather than retype it, which can introduce error. It is useful to set any selected material in a distinctive typeface—a sans-serif font, or a monospace typeface such as Courier—one advantage of the latter being that fixed-width fonts preserve alignment of code elements, such as end-of-line comments, as they would appear on-screen in a text editor.

<body bgcolor = "#000033" text = "#000033"link = "#FF0000" vlink = "#66CC33" alink = "#FFFF00" onLoad = "MM_displayStatusMsg('welcome'); return document:MM_returnValue">

If the font chosen to indicate programming or mark-up language text is sufficiently different from the font used for normal text, it is unnecessary to delimit it further by quotation marks, even when run into text. If, however, quotation marks are needed, note that computing practice matches standard British usage in the relative placement of punctuation and quotation marks. The punctuation falls outside the closing quotation mark, so that in citing parts of

x=0;

for (i-0;i++;i < n)

x+=V[i];

in text, the punctuation does not interfere with the syntax: ‘x = 0;’, and ‘x += V[i]’. This style, which would be imposed naturally in British publishing, should also be imposed in US computing texts, though not extended to normal quotations. US computing books can also reserve British-style single quotation marks for programming and mark-up language text, using double quotes for normal quotations.

In-text or displayed formulas and equations are best described and set so far as possible according to the rules governing mathematics. Any visual representations of structures or hierarchical classifications (use-case and activity diagrams, screen shots, tree grammars, Venn diagrams) will be treated as artwork (see Chapter 16).

14.5.3 Computing symbols

Mathematical material in computing contexts is usually treated in the same way as in other texts, although the sense of, for example, some logic symbols may differ from standard practice. In programming, the different types of bracket have various specific uses and order, depending on the language. In computing, the slash (/) is used as a separator, as with URLs for example. When a backslash (\) separator is used, the slash can be called a forward slash to differentiate it further.

Code tags in SGML-based languages are enclosed by angle brackets < >: note that the narrow angle brackets 〈 〉 generally employed in technical contexts should not be used here (see 14.6.5 for mathematical brackets).

Other symbols have various context-specific functions: the asterisk, for example, is a Kleene star in BNF, a multiplication operator in C, and a wildcard character in various command-line shells. In some computing languages multi-symbol operators are used—for example, a combined colon and equals sign := is used as the assignment symbol (‘gets’ or ‘becomes’); in others ::= means ‘is defined as’ and :- means ‘if’. These symbols constitute a single unit and are set close up, with space either side:

{A[x] := y, B[u, v] := w}.
〈decimal fraction〉 ∷= 〈unsigned integer〉
but not all languages require space around operators. It is important to be aware of the specific rules regarding spaces, indentation, commenting, spelling and capitalization, and the meanings of symbols used alone or in combinations in programming and mark-up languages—if working in an unfamiliar language, find out the rules online or raise a query with the originator.

Share this entry

Share this page


Obtenga más de Oxford Dictionaries

Suscribirse para eliminar anuncios y acceder a los recursos premium

New Hart's Rules

Contents

Preface Editorial team Proofreading marks Glossary of printing and publishing terms