Updated Feature suggestions (markdown)
This commit is contained in:
parent
79485dde2e
commit
e0fb572dd0
|
@ -28,9 +28,10 @@ quickly).
|
||||||
- a ternary condition - like ?: in C, or iif()
|
- a ternary condition - like ?: in C, or iif()
|
||||||
- You can do: ``if cond: a else: b``, IIRC the ``?:`` won't make it into Nimrod.
|
- You can do: ``if cond: a else: b``, IIRC the ``?:`` won't make it into Nimrod.
|
||||||
|
|
||||||
- a simple way of indexing the last element of an array or sequence, to avoid long-hand code like arr[arr.len-1]
|
- a simple way of indexing the last element of an array or sequence, to avoid long-hand code like ``arr[arr.len-1]``
|
||||||
|
- You can do: ``arr[arr.high]`` or ``arr[arr.low]`` for indexing the last and first element or an array or sequence.
|
||||||
|
|
||||||
- a shorthand way of discarding the return value of a proc (to improve readability)
|
- a shorthand way of discarding the return value of a proc (to improve readability)
|
||||||
|
|
||||||
- a shorthand initialization of arrays or sequences, eg var x: array[0..25, int] = -1
|
- a shorthand initialization of arrays or sequences, eg var x: array[0..25, int] = -1
|
||||||
would initialize all elements of x to -1
|
would initialize all elements of x to -1
|
Loading…
Reference in New Issue