Change stdlib imports to use std prefix in most examples (#17202)

This commit is contained in:
Danil Yarantsev 2021-03-01 00:17:19 +03:00 • committed by GitHub
commit 56461c280f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 127 additions and 127 deletions

View file

@ -29,7 +29,7 @@ To install SDL2 you can use ``nimble install sdl2``.
import sdl2
#*** import the hotcodereloading stdlib module ***
import hotcodereloading
import std/hotcodereloading
var runGame*: bool = true
var window: WindowPtr

View file

@ -5941,7 +5941,7 @@ imported:
:test: "nim c $1"
:status: 1
import strutils except `%`, toUpperAscii
import std/strutils except `%`, toUpperAscii
# doesn't work then:
echo "$1" % "abc".toUpperAscii
@ -5984,7 +5984,7 @@ Module names in imports
A module alias can be introduced via the ``as`` keyword:
.. code-block:: nim
import strutils as su, sequtils as qu
import std/strutils as su, std/sequtils as qu
echo su.format("$1", "lalelu")
@ -6048,7 +6048,7 @@ full qualification:
.. code-block:: nim
:test: "nim c $1"
from strutils import `%`
from std/strutils import `%`
echo "$1" % "abc"
# always possible: full qualification:

View file

@ -29,7 +29,7 @@ the passed expression on the thread pool and returns a `data flow variable`:idx:
variables at the same time:
.. code-block:: nim
import threadpool, ...
import std/threadpool, ...
# wait until 2 out of 3 servers received the update:
proc main =
@ -56,7 +56,7 @@ Example:
.. code-block:: nim
# Compute PI in an inefficient way
import strutils, math, threadpool
import std/[strutils, math, threadpool]
proc term(k: float): float = 4 * math.pow(-1, k) / (2*k + 1)