mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-06 13:07:48 +00:00
docs: tiny style improvements
This commit is contained in:
@@ -252,6 +252,7 @@ the imperative (command) form. That is, between:
|
||||
proc hello*(): string =
|
||||
## Return "hello"
|
||||
result = "hello"
|
||||
|
||||
or
|
||||
|
||||
.. code-block:: nim
|
||||
|
||||
@@ -4140,7 +4140,7 @@ A custom exception is a custom type:
|
||||
.. code-block:: nim
|
||||
type
|
||||
LoadError* = object of Exception
|
||||
|
||||
|
||||
Ending the custom exception's name with ``Error`` is recommended.
|
||||
|
||||
Custom exceptions can be raised like any others, e.g.:
|
||||
@@ -6504,7 +6504,7 @@ alignment requirement of the type are ignored.
|
||||
|
||||
type
|
||||
sseType = object
|
||||
sseData {.align(16).}: array[4,float32]
|
||||
sseData {.align(16).}: array[4, float32]
|
||||
|
||||
# every object will be aligned to 128-byte boundary
|
||||
Data = object
|
||||
|
||||
Reference in New Issue
Block a user