Enterprise Style Guidelines
This article offers a set of guidelines
for creating documentation for Enterprise tools and libraries,
mostly related to the final HTML output.
A separate guide discusses
formatting Sage source files.
Identifiers, including the names of units, types, methods,
constants, and variables, should be indicated using monospace:
either with `...` or with
[m]...⁠[end].
Code samples should include a blank line before and after.
For example, like this…
Here is a typical for loop… for i := 0 to List.Count-1 do Writeln(List[i].Name); Note that List.Count is only evaluated once, before the loop begins.
Not like this…
Here is a typical for loop… for i := 0 to List.Count-1 do Writeln(List[i].Name); Note that List.Count is only evaluated once, before the loop begins.
Note: the horizontal bars above are to separate the examples; we wouldn't normally use them for code samples.
Here is a typical for loop… for i := 0 to List.Count-1 do Writeln(List[i].Name); Note that List.Count is only evaluated once, before the loop begins.
Not like this…
Here is a typical for loop… for i := 0 to List.Count-1 do Writeln(List[i].Name); Note that List.Count is only evaluated once, before the loop begins.
Note: the horizontal bars above are to separate the examples; we wouldn't normally use them for code samples.
In various Word docs, you may find a variety of styles for
code samples: different fonts, different indenting approaches,
some with boxes around the example, etc.
Ignore all that, and just write code samples like this…
Here is a typical `for` loop[...]
[.pas]
for i := 0 to List.Count-1 do
Writeln(List[i].Name);
[end]
Note that `List.Count` is only evaluated once, before the loop begins.
⏱ Last Modified: 11/17 12:39:43 pm