mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
Documentation prelude (#15377)
This commit is contained in:
29
doc/prelude.rst
Normal file
29
doc/prelude.rst
Normal file
@@ -0,0 +1,29 @@
|
||||
Prelude
|
||||
=======
|
||||
|
||||
This is an include file that simply imports common modules for your convenience:
|
||||
|
||||
.. code-block:: nim
|
||||
include prelude
|
||||
|
||||
Same as:
|
||||
|
||||
.. code-block:: nim
|
||||
import os, strutils, times, parseutils, parseopt, hashes, tables, sets
|
||||
|
||||
|
||||
Examples
|
||||
========
|
||||
|
||||
Get the basic most common imports ready to start coding using ``prelude``:
|
||||
|
||||
.. code-block:: nim
|
||||
include prelude
|
||||
|
||||
echo now()
|
||||
echo getCurrentDir()
|
||||
echo "Hello $1".format("World")
|
||||
|
||||
|
||||
See also:
|
||||
- `Sugar <sugar.html>`_
|
||||
Reference in New Issue
Block a user