Updated NEP 1 : Style Guide for Nimrod Code (markdown)

This commit is contained in:
Flaviu Tamas 2014-07-19 12:13:39 -07:00
parent 11631597d7
commit 9dc3982c23
1 changed files with 34 additions and 1 deletions

View File

@ -118,4 +118,37 @@ General
- Use of extra whitespace for alignment is discouraged. This is not
necessarily because such a alignment is bad, but because of the varying
support editors have for auto-alignment of text, and the fact that manual
alignment and re-alignment can be quite time consuming.
alignment and re-alignment can be quite time consuming.
Incorrect:
```nimrod
type
WORDBOOL* = int16 # XXX: not a bool
CALTYPE* = int
CALID* = int
CCHAR* = char
TCOLORREF* = COLORREF
WINT* = int32
PINTEGER* = ptr int32
PBOOL* = ptr WINBOOL
LONGLONG* = int64
PLONGLONG* = ptr LONGLONG
LPLONGLONG* = ptr LONGLONG
```
Correct:
```nimrod
type
WORDBOOL* = int16 # XXX: not a bool
CALTYPE* = int
CALID* = int
CCHAR* = char
TCOLORREF* = COLORREF
WINT* = int32
PINTEGER* = ptr int32
PBOOL* = ptr WINBOOL
LONGLONG* = int64
PLONGLONG* = ptr LONGLONG
LPLONGLONG* = ptr LONGLONG
```