1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <!-- Favicon -->
- <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
- <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
- <!-- Google fonts -->
- <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
- <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
- <!-- CSS -->
- <title>testproject</title>
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css">
- <script type="text/javascript" src="dochack.js"></script>
- <script type="text/javascript">
- function main() {
- var pragmaDots = document.getElementsByClassName("pragmadots");
- for (var i = 0; i < pragmaDots.length; i++) {
- pragmaDots[i].onclick = function(event) {
- // Hide tease
- event.target.parentNode.style.display = "none";
- // Show actual
- event.target.parentNode.nextElementSibling.style.display = "inline";
- }
- }
- const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
- function switchTheme(e) {
- if (e.target.checked) {
- document.documentElement.setAttribute('data-theme', 'dark');
- localStorage.setItem('theme', 'dark');
- } else {
- document.documentElement.setAttribute('data-theme', 'light');
- localStorage.setItem('theme', 'light');
- }
- }
- toggleSwitch.addEventListener('change', switchTheme, false);
- const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
- if (currentTheme) {
- document.documentElement.setAttribute('data-theme', currentTheme);
- if (currentTheme === 'dark') {
- toggleSwitch.checked = true;
- }
- }
- }
- window.addEventListener('DOMContentLoaded', main);
- </script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">testproject</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-switch-wrapper">
- <label class="theme-switch" for="checkbox">
- <input type="checkbox" id="checkbox" />
- <div class="slider round"></div>
- </label>
- <em>Dark Mode</em>
- </div>
- <div id="global-links">
- <ul class="simple">
- <li>
- <a href="theindex.html">Index</a>
- </li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="text" id="searchInput"
- onkeyup="search()" />
- </div>
- <div>
- Group by:
- <select onchange="groupBy(this.value)">
- <option value="section">Section</option>
- <option value="type">Type</option>
- </select>
- </div>
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- <ul class="simple simple-toc-section">
-
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#7" id="57">Types</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#A"
- title="A {.inject.} = enum
- aA">A</a></li>
- <li><a class="reference" href="#B"
- title="B {.inject.} = enum
- bB">B</a></li>
- <li><a class="reference" href="#Foo"
- title="Foo = enum
- enumValueA2">Foo</a></li>
- <li><a class="reference" href="#Shapes"
- title="Shapes = enum
- Circle, ## A circle
- Triangle, ## A three-sided shape
- Rectangle ## A four-sided shape">Shapes</a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#8" id="58">Vars</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#someVariable"
- title="someVariable: bool">someVariable</a></li>
- <li><a class="reference" href="#aVariable"
- title="aVariable: array[1, int]">aVariable</a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#10" id="60">Consts</a>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#C_A"
- title="C_A = 0x7FF0000000000000'f64">C_A</a></li>
- <li><a class="reference" href="#C_B"
- title="C_B = 0o377'i8">C_B</a></li>
- <li><a class="reference" href="#C_C"
- title="C_C = 0o277'i8">C_C</a></li>
- <li><a class="reference" href="#C_D"
- title="C_D = 0o177777'i16">C_D</a></li>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#12" id="62">Procs</a>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">z10
- <li><a class="reference" href="#z10"
- title="z10()">z10()</a></li>
- </ul>
- <ul class="simple nested-toc-section">tripleStrLitTest
- <li><a class="reference" href="#tripleStrLitTest"
- title="tripleStrLitTest()">tripleStrLitTest()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z17
- <li><a class="reference" href="#z17"
- title="z17()">z17()</a></li>
- </ul>
- <ul class="simple nested-toc-section">asyncFun3
- <li><a class="reference" href="#asyncFun3"
- title="asyncFun3(): owned(Future[void])">asyncFun3(): owned(Future[void])</a></li>
- </ul>
- <ul class="simple nested-toc-section">z2
- <li><a class="reference" href="#z2"
- title="z2()">z2()</a></li>
- </ul>
- <ul class="simple nested-toc-section">bar
- <li><a class="reference" href="#bar%2CT%2CT"
- title="bar[T](a, b: T): T">bar[T](a, b: T): T</a></li>
- </ul>
- <ul class="simple nested-toc-section">fromUtils3
- <li><a class="reference" href="#fromUtils3"
- title="fromUtils3()">fromUtils3()</a></li>
- </ul>
- <ul class="simple nested-toc-section">isValid
- <li><a class="reference" href="#isValid%2CT"
- title="isValid[T](x: T): bool">isValid[T](x: T): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">z6
- <li><a class="reference" href="#z6"
- title="z6(): int">z6(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">anything
- <li><a class="reference" href="#anything"
- title="anything()">anything()</a></li>
- </ul>
- <ul class="simple nested-toc-section">low
- <li><a class="reference" href="#low%2CT"
- title="low[T: Ordinal | enum | range](x: T): T">low[T: Ordinal | enum | range](x: T): T</a></li>
- </ul>
- <ul class="simple nested-toc-section">p1
- <li><a class="reference" href="#p1"
- title="p1()">p1()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z11
- <li><a class="reference" href="#z11"
- title="z11()">z11()</a></li>
- </ul>
- <ul class="simple nested-toc-section">buzz
- <li><a class="reference" href="#buzz%2CT%2CT"
- title="buzz[T](a, b: T): T">buzz[T](a, b: T): T</a></li>
- </ul>
- <ul class="simple nested-toc-section">low2
- <li><a class="reference" href="#low2%2CT"
- title="low2[T: Ordinal | enum | range](x: T): T">low2[T: Ordinal | enum | range](x: T): T</a></li>
- </ul>
- <ul class="simple nested-toc-section">z7
- <li><a class="reference" href="#z7"
- title="z7(): int">z7(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">z13
- <li><a class="reference" href="#z13"
- title="z13()">z13()</a></li>
- </ul>
- <ul class="simple nested-toc-section">baz
- <li><a class="reference" href="#baz%2CT%2CT"
- title="baz[T](a, b: T): T">baz[T](a, b: T): T</a></li>
- <li><a class="reference" href="#baz"
- title="baz()">baz()</a></li>
- </ul>
- <ul class="simple nested-toc-section">addfBug14485
- <li><a class="reference" href="#addfBug14485"
- title="addfBug14485()">addfBug14485()</a></li>
- </ul>
- <ul class="simple nested-toc-section">c_printf
- <li><a class="reference" href="#c_printf%2Ccstring"
- title="c_printf(frmt: cstring): cint">c_printf(frmt: cstring): cint</a></li>
- </ul>
- <ul class="simple nested-toc-section">z12
- <li><a class="reference" href="#z12"
- title="z12(): int">z12(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">z3
- <li><a class="reference" href="#z3"
- title="z3()">z3()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z9
- <li><a class="reference" href="#z9"
- title="z9()">z9()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z4
- <li><a class="reference" href="#z4"
- title="z4()">z4()</a></li>
- </ul>
- <ul class="simple nested-toc-section">someFunc
- <li><a class="reference" href="#someFunc"
- title="someFunc()">someFunc()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z8
- <li><a class="reference" href="#z8"
- title="z8(): int">z8(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">z1
- <li><a class="reference" href="#z1"
- title="z1(): Foo">z1(): Foo</a></li>
- </ul>
- <ul class="simple nested-toc-section">z5
- <li><a class="reference" href="#z5"
- title="z5(): int">z5(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">asyncFun2
- <li><a class="reference" href="#asyncFun2"
- title="asyncFun2(): owned(Future[void])">asyncFun2(): owned(Future[void])</a></li>
- </ul>
- <ul class="simple nested-toc-section">c_nonexistant
- <li><a class="reference" href="#c_nonexistant%2Ccstring"
- title="c_nonexistant(frmt: cstring): cint">c_nonexistant(frmt: cstring): cint</a></li>
- </ul>
- <ul class="simple nested-toc-section">asyncFun1
- <li><a class="reference" href="#asyncFun1"
- title="asyncFun1(): Future[int]">asyncFun1(): Future[int]</a></li>
- </ul>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#14" id="64">Methods</a>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">method2
- <li><a class="reference" href="#method2.e%2CMoo"
- title="method2(self: Moo): int">method2(self: Moo): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">method3
- <li><a class="reference" href="#method3.e%2CMoo"
- title="method3(self: Moo): int">method3(self: Moo): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">method1
- <li><a class="reference" href="#method1.e%2CMoo"
- title="method1(self: Moo)">method1(self: Moo)</a></li>
- </ul>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#15" id="65">Iterators</a>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">iter2
- <li><a class="reference" href="#iter2.i%2Cint"
- title="iter2(n: int): int">iter2(n: int): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">fromUtils1
- <li><a class="reference" href="#fromUtils1.i"
- title="fromUtils1(): int">fromUtils1(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">iter1
- <li><a class="reference" href="#iter1.i%2Cint"
- title="iter1(n: int): int">iter1(n: int): int</a></li>
- </ul>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#17" id="67">Macros</a>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">bar
- <li><a class="reference" href="#bar.m"
- title="bar(): untyped">bar(): untyped</a></li>
- </ul>
- <ul class="simple nested-toc-section">z18
- <li><a class="reference" href="#z18.m"
- title="z18(): int">z18(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">z16
- <li><a class="reference" href="#z16.m"
- title="z16()">z16()</a></li>
- </ul>
- </ul>
- </li>
- <li>
- <a class="reference reference-toplevel" href="#18" id="68">Templates</a>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">fromUtils2
- <li><a class="reference" href="#fromUtils2.t"
- title="fromUtils2()">fromUtils2()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z6t
- <li><a class="reference" href="#z6t.t"
- title="z6t(): int">z6t(): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">z14
- <li><a class="reference" href="#z14.t"
- title="z14()">z14()</a></li>
- </ul>
- <ul class="simple nested-toc-section">z15
- <li><a class="reference" href="#z15.t"
- title="z15()">z15()</a></li>
- </ul>
- <ul class="simple nested-toc-section">foo
- <li><a class="reference" href="#foo.t%2CSomeType%2CSomeType"
- title="foo(a, b: SomeType)">foo(a, b: SomeType)</a></li>
- </ul>
- <ul class="simple nested-toc-section">myfn
- <li><a class="reference" href="#myfn.t"
- title="myfn()">myfn()</a></li>
- </ul>
- <ul class="simple nested-toc-section">testNimDocTrailingExample
- <li><a class="reference" href="#testNimDocTrailingExample.t"
- title="testNimDocTrailingExample()">testNimDocTrailingExample()</a></li>
- </ul>
- </ul>
- </li>
- </ul>
- </div>
-
- <div class="nine columns" id="content">
- <div id="tocRoot"></div>
-
- <p class="module-desc">This is the top level module.
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span><span class="Whitespace"> </span><span class="Identifier">testproject</span><span class="Whitespace">
- </span><span class="Keyword">import</span><span class="Whitespace"> </span><span class="Identifier">subdir</span><span class="Whitespace"> </span><span class="Operator">/</span><span class="Whitespace"> </span><span class="Identifier">subdir_b</span><span class="Whitespace"> </span><span class="Operator">/</span><span class="Whitespace"> </span><span class="Identifier">utils</span><span class="Whitespace">
- </span><span class="Identifier">doAssert</span><span class="Whitespace"> </span><span class="Identifier">bar</span><span class="Punctuation">(</span><span class="DecNumber">3</span><span class="Punctuation">,</span><span class="Whitespace"> </span><span class="DecNumber">4</span><span class="Punctuation">)</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">7</span><span class="Whitespace">
- </span><span class="Identifier">foo</span><span class="Punctuation">(</span><span class="Identifier">enumValueA</span><span class="Punctuation">,</span><span class="Whitespace"> </span><span class="Identifier">enumValueB</span><span class="Punctuation">)</span><span class="Whitespace">
- </span><span class="Comment"># bug #11078</span><span class="Whitespace">
- </span><span class="Keyword">for</span><span class="Whitespace"> </span><span class="Identifier">x</span><span class="Whitespace"> </span><span class="Keyword">in</span><span class="Whitespace"> </span><span class="StringLit">"xx"</span><span class="Punctuation">:</span><span class="Whitespace"> </span><span class="Keyword">discard</span></pre>top2
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span><span class="Whitespace"> </span><span class="Identifier">testproject</span><span class="Whitespace">
- </span><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="StringLit">"in top2"</span></pre>top2 after
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span><span class="Whitespace"> </span><span class="Identifier">testproject</span><span class="Whitespace">
- </span><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="StringLit">"in top3"</span></pre>top3 after
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span><span class="Whitespace"> </span><span class="Identifier">testproject</span><span class="Whitespace">
- </span><span class="Identifier">assert</span><span class="Whitespace"> </span><span class="DecNumber">3</span><span class="Operator">*</span><span class="DecNumber">2</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">6</span></pre></p>
- <div class="section" id="6">
- <h1><a class="toc-backref" href="#6">Imports</a></h1>
- <dl class="item">
- <a class="reference external" href="subdir/subdir_b/utils.html">subdir/subdir_b/utils</a>
- </dl></div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <a id="A"></a>
- <dt><pre><a href="testproject.html#A"><span class="Identifier">A</span></a> {.<span class="Identifier">inject</span>.} <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">aA</span></pre></dt>
- <dd>
- The enum A.
- </dd>
- <a id="B"></a>
- <dt><pre><a href="testproject.html#B"><span class="Identifier">B</span></a> {.<span class="Identifier">inject</span>.} <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">bB</span></pre></dt>
- <dd>
- The enum B.
- </dd>
- <a id="Foo"></a>
- <dt><pre><a href="testproject.html#Foo"><span class="Identifier">Foo</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">enumValueA2</span></pre></dt>
- <dd>
- </dd>
- <a id="Shapes"></a>
- <dt><pre><a href="testproject.html#Shapes"><span class="Identifier">Shapes</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">Circle</span><span class="Other">,</span> <span class="Comment">## A circle</span>
- <span class="Identifier">Triangle</span><span class="Other">,</span> <span class="Comment">## A three-sided shape</span>
- <span class="Identifier">Rectangle</span> <span class="Comment">## A four-sided shape</span></pre></dt>
- <dd>
- Some shapes.
- </dd>
- </dl></div>
- <div class="section" id="8">
- <h1><a class="toc-backref" href="#8">Vars</a></h1>
- <dl class="item">
- <a id="someVariable"></a>
- <dt><pre><a href="testproject.html#someVariable"><span class="Identifier">someVariable</span></a><span class="Other">:</span> <span class="Identifier">bool</span></pre></dt>
- <dd>
- This should be visible.
- </dd>
- <a id="aVariable"></a>
- <dt><pre><a href="testproject.html#aVariable"><span class="Identifier">aVariable</span></a><span class="Other">:</span> <span class="Identifier">array</span><span class="Other">[</span><span class="DecNumber">1</span><span class="Other">,</span> <span class="Identifier">int</span><span class="Other">]</span></pre></dt>
- <dd>
- </dd>
- </dl></div>
- <div class="section" id="10">
- <h1><a class="toc-backref" href="#10">Consts</a></h1>
- <dl class="item">
- <a id="C_A"></a>
- <dt><pre><a href="testproject.html#C_A"><span class="Identifier">C_A</span></a> <span class="Other">=</span> <span class="FloatNumber">0x7FF0000000000000'f64</span></pre></dt>
- <dd>
- </dd>
- <a id="C_B"></a>
- <dt><pre><a href="testproject.html#C_B"><span class="Identifier">C_B</span></a> <span class="Other">=</span> <span class="DecNumber">0o377'i8</span></pre></dt>
- <dd>
- </dd>
- <a id="C_C"></a>
- <dt><pre><a href="testproject.html#C_C"><span class="Identifier">C_C</span></a> <span class="Other">=</span> <span class="DecNumber">0o277'i8</span></pre></dt>
- <dd>
- </dd>
- <a id="C_D"></a>
- <dt><pre><a href="testproject.html#C_D"><span class="Identifier">C_D</span></a> <span class="Other">=</span> <span class="DecNumber">0o177777'i16</span></pre></dt>
- <dd>
- </dd>
- </dl></div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <a id="bar,T,T"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#bar%2CT%2CT"><span class="Identifier">bar</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span></pre></dt>
- <dd>
- </dd>
- <a id="baz,T,T"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#baz%2CT%2CT"><span class="Identifier">baz</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span class="Identifier">deprecated</span>.}</pre></dt>
- <dd>
- <div class="deprecation-message">
- <b>Deprecated</b>
- </div>
- This is deprecated without message.
- </dd>
- <a id="buzz,T,T"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#buzz%2CT%2CT"><span class="Identifier">buzz</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">"since v0.20"</span>.}</pre></dt>
- <dd>
- <div class="deprecation-message">
- <b>Deprecated:</b> since v0.20
- </div>
- This is deprecated with a message.
- </dd>
- <a id="someFunc"></a>
- <dt><pre><span class="Keyword">func</span> <a href="#someFunc"><span class="Identifier">someFunc</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- My someFunc. Stuff in <tt class="docutils literal"><span class="pre"><span class="Identifier">quotes</span></span></tt> here. <a class="reference external" href="https://nim-lang.org">Some link</a>
- </dd>
- <a id="fromUtils3"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#fromUtils3"><span class="Identifier">fromUtils3</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- came form utils but should be shown where <tt class="docutils literal"><span class="pre"><span class="Identifier">fromUtilsGen</span></span></tt> is called
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>
- </dd>
- <a id="isValid,T"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#isValid%2CT"><span class="Identifier">isValid</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">bool</span></pre></dt>
- <dd>
- </dd>
- <a id="z1"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z1"><span class="Identifier">z1</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="testproject.html#Foo"><span class="Identifier">Foo</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz1
- </dd>
- <a id="z2"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z2"><span class="Identifier">z2</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz2
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="StringLit">"in cz2"</span></pre>
- </dd>
- <a id="z3"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z3"><span class="Identifier">z3</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz3
- </dd>
- <a id="z4"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z4"><span class="Identifier">z4</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz4
- </dd>
- <a id="z5"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z5"><span class="Identifier">z5</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz5
- </dd>
- <a id="z6"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z6"><span class="Identifier">z6</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz6
- </dd>
- <a id="z7"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z7"><span class="Identifier">z7</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz7
- </dd>
- <a id="z8"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z8"><span class="Identifier">z8</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz8
- </dd>
- <a id="z9"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z9"><span class="Identifier">z9</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Identifier">doAssert</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace"> </span><span class="Operator">+</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">2</span></pre>
- </dd>
- <a id="z10"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z10"><span class="Identifier">z10</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example: cmd: -d:foobar</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>cz10
- </dd>
- <a id="z11"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z11"><span class="Identifier">z11</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>
- </dd>
- <a id="z12"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z12"><span class="Identifier">z12</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>
- </dd>
- <a id="z13"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z13"><span class="Identifier">z13</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz13
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span></pre>
- </dd>
- <a id="baz"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#baz"><span class="Identifier">baz</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- </dd>
- <a id="z17"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#z17"><span class="Identifier">z17</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cz17 rest
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>rest
- </dd>
- <a id="p1"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#p1"><span class="Identifier">p1</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- cp1
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Identifier">doAssert</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace"> </span><span class="Comment"># regular comments work here</span></pre>c4
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Comment"># c5 regular comments before 1st token work</span><span class="Whitespace">
- </span><span class="Comment"># regular comment</span><span class="Whitespace">
- </span><span class="LongComment">#[
- nested regular comment
- ]#</span><span class="Whitespace">
- </span><span class="Identifier">doAssert</span><span class="Whitespace"> </span><span class="DecNumber">2</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">2</span><span class="Whitespace"> </span><span class="Comment"># c8</span><span class="Whitespace">
- </span><span class="Comment">## this is a non-nested doc comment</span><span class="Whitespace">
- </span><span class="LongComment">##[
- this is a nested doc comment
- ]##</span><span class="Whitespace">
- </span><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="StringLit">"c9"</span><span class="Whitespace">
- </span><span class="Comment"># also work after</span></pre>
- </dd>
- <a id="addfBug14485"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#addfBug14485"><span class="Identifier">addfBug14485</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- Some proc
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="StringLit">"foo() = "</span><span class="Whitespace"> </span><span class="Operator">&</span><span class="Whitespace"> </span><span class="Operator">$</span><span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">]</span><span class="Whitespace">
- </span><span class="LongComment">#[
- 0: let's also add some broken html to make sure this won't break in future
- 1: </span>
- 2: </span>
- 3: </span
- 4: </script>
- 5: </script
- 6: </script
- 7: end of broken html
- ]#</span></pre>
- </dd>
- <a id="c_printf,cstring"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#c_printf%2Ccstring"><span class="Identifier">c_printf</span></a><span class="Other">(</span><span class="Identifier">frmt</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"printf"</span><span class="Other">,</span> <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<stdio.h>"</span><span class="Other">,</span>
- <span class="Identifier">varargs</span><span class="Other">,</span> <span class="Identifier">discardable</span>.}</pre></dt>
- <dd>
- the c printf. etc.
- </dd>
- <a id="c_nonexistant,cstring"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#c_nonexistant%2Ccstring"><span class="Identifier">c_nonexistant</span></a><span class="Other">(</span><span class="Identifier">frmt</span><span class="Other">:</span> <span class="Identifier">cstring</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">cint</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">"nonexistant"</span><span class="Other">,</span>
- <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">"<stdio.h>"</span><span class="Other">,</span> <span class="Identifier">varargs</span><span class="Other">,</span> <span class="Identifier">discardable</span>.}</pre></dt>
- <dd>
- </dd>
- <a id="low,T"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#low%2CT"><span class="Identifier">low</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">Ordinal</span> <span class="Operator">|</span> <span class="Keyword">enum</span> <span class="Operator">|</span> <span class="Identifier">range</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span class="Identifier">magic</span><span class="Other">:</span> <span class="StringLit">"Low"</span><span class="Other">,</span> <span class="Identifier">noSideEffect</span>.}</pre></dt>
- <dd>
- <p>Returns the lowest possible value of an ordinal value <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. As a special semantic rule, <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> may also be a type identifier.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference external" href="#low2,T">low2(T)</a></li>
- </ul>
- <pre class="listing"><span class="Identifier">low</span><span class="Punctuation">(</span><span class="DecNumber">2</span><span class="Punctuation">)</span> <span class="Comment"># => -9223372036854775808</span></pre>
- </dd>
- <a id="low2,T"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#low2%2CT"><span class="Identifier">low2</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">:</span> <span class="Identifier">Ordinal</span> <span class="Operator">|</span> <span class="Keyword">enum</span> <span class="Operator">|</span> <span class="Identifier">range</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span> {.<span class="Identifier">magic</span><span class="Other">:</span> <span class="StringLit">"Low"</span><span class="Other">,</span> <span class="Identifier">noSideEffect</span>.}</pre></dt>
- <dd>
- <p>Returns the lowest possible value of an ordinal value <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. As a special semantic rule, <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> may also be a type identifier.</p>
- <p>See also:</p>
- <ul class="simple"><li><a class="reference external" href="#low,T">low(T)</a></li>
- </ul>
- <pre class="listing"><span class="Identifier">low2</span><span class="Punctuation">(</span><span class="DecNumber">2</span><span class="Punctuation">)</span> <span class="Comment"># => -9223372036854775808</span></pre>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="StringLit">"in low2"</span></pre>
- </dd>
- <a id="tripleStrLitTest"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#tripleStrLitTest"><span class="Identifier">tripleStrLitTest</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Comment">## mullitline string litterals are tricky as their indentation can span</span><span class="Whitespace">
- </span><span class="Comment">## below that of the runnableExamples</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s1a</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">"""
- should appear at indent 0
- at indent 2
- at indent 0
- """</span><span class="Whitespace">
- </span><span class="Comment"># make sure this works too</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s1b</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">"""start at same line
- at indent 2
- at indent 0
- """</span><span class="Whitespace"> </span><span class="Comment"># comment after</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s2</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">"""sandwich """</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s3</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">""""""</span><span class="Whitespace">
- </span><span class="Keyword">when</span><span class="Whitespace"> </span><span class="Identifier">false</span><span class="Punctuation">:</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s5</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">"""
- in s5 """</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s3b</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="Punctuation">[</span><span class="LongStringLit">"""
- %!? #[...] # inside a multiline ...
- """</span><span class="Punctuation">,</span><span class="Whitespace"> </span><span class="StringLit">"foo"</span><span class="Punctuation">]</span><span class="Whitespace">
- </span><span class="Comment">## make sure handles trailing spaces</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s4</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">"""
- """</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s5</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">""" x
- """</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s6</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">""" ""
- """</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s7</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="LongStringLit">""""""""""</span><span class="Whitespace">
- </span><span class="Keyword">let</span><span class="Whitespace"> </span><span class="Identifier">s8</span><span class="Whitespace"> </span><span class="Operator">=</span><span class="Whitespace"> </span><span class="Punctuation">[</span><span class="LongStringLit">""""""""""</span><span class="Punctuation">,</span><span class="Whitespace"> </span><span class="LongStringLit">"""
- """</span><span class="Whitespace"> </span><span class="Punctuation">]</span><span class="Whitespace">
- </span><span class="Keyword">discard</span><span class="Whitespace">
- </span><span class="Comment"># should be in</span></pre>
- </dd>
- <a id="asyncFun1"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#asyncFun1"><span class="Identifier">asyncFun1</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">Future</span><span class="Other">[</span><span class="Identifier">int</span><span class="Other">]</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">ValueError</span><span class="Other">]</span><span class="Other">,</span>
- <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- ok1
- </dd>
- <a id="asyncFun2"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#asyncFun2"><span class="Identifier">asyncFun2</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">owned</span><span class="Other">(</span><span class="Identifier">Future</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- </dd>
- <a id="asyncFun3"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#asyncFun3"><span class="Identifier">asyncFun3</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">owned</span><span class="Other">(</span><span class="Identifier">Future</span><span class="Other">[</span><span class="Identifier">void</span><span class="Other">]</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span></pre>ok1
- </dd>
- <a id="anything"></a>
- <dt><pre><span class="Keyword">proc</span> <a href="#anything"><span class="Identifier">anything</span></a><span class="Other">(</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- There is no block quote after blank lines at the beginning.
- </dd>
- </dl></div>
- <div class="section" id="14">
- <h1><a class="toc-backref" href="#14">Methods</a></h1>
- <dl class="item">
- <a id="method1.e,Moo"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#method1.e%2CMoo"><span class="Identifier">method1</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <span class="Identifier">Moo</span><span class="Other">)</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- foo1
- </dd>
- <a id="method2.e,Moo"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#method2.e%2CMoo"><span class="Identifier">method2</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <span class="Identifier">Moo</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- foo2
- </dd>
- <a id="method3.e,Moo"></a>
- <dt><pre><span class="Keyword">method</span> <a href="#method3.e%2CMoo"><span class="Identifier">method3</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <span class="Identifier">Moo</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- foo3
- </dd>
- </dl></div>
- <div class="section" id="15">
- <h1><a class="toc-backref" href="#15">Iterators</a></h1>
- <dl class="item">
- <a id="fromUtils1.i"></a>
- <dt><pre><span class="Keyword">iterator</span> <a href="#fromUtils1.i"><span class="Identifier">fromUtils1</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Comment"># ok1</span><span class="Whitespace">
- </span><span class="Identifier">assert</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace">
- </span><span class="Comment"># ok2</span></pre>
- </dd>
- <a id="iter1.i,int"></a>
- <dt><pre><span class="Keyword">iterator</span> <a href="#iter1.i%2Cint"><span class="Identifier">iter1</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- foo1
- </dd>
- <a id="iter2.i,int"></a>
- <dt><pre><span class="Keyword">iterator</span> <a href="#iter2.i%2Cint"><span class="Identifier">iter2</span></a><span class="Other">(</span><span class="Identifier">n</span><span class="Other">:</span> <span class="Identifier">int</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
- <dd>
- foo2
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="Comment"># bar</span></pre>
- </dd>
- </dl></div>
- <div class="section" id="17">
- <h1><a class="toc-backref" href="#17">Macros</a></h1>
- <dl class="item">
- <a id="bar.m"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#bar.m"><span class="Identifier">bar</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
- <dd>
- </dd>
- <a id="z16.m"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#z16.m"><span class="Identifier">z16</span></a><span class="Other">(</span><span class="Other">)</span></pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>cz16 after
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Identifier">doAssert</span><span class="Whitespace"> </span><span class="DecNumber">2</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">1</span><span class="Whitespace"> </span><span class="Operator">+</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>
- </dd>
- <a id="z18.m"></a>
- <dt><pre><span class="Keyword">macro</span> <a href="#z18.m"><span class="Identifier">z18</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span></pre></dt>
- <dd>
- cz18
- </dd>
- </dl></div>
- <div class="section" id="18">
- <h1><a class="toc-backref" href="#18">Templates</a></h1>
- <dl class="item">
- <a id="fromUtils2.t"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#fromUtils2.t"><span class="Identifier">fromUtils2</span></a><span class="Other">(</span><span class="Other">)</span></pre></dt>
- <dd>
- ok3
- </dd>
- <a id="z6t.t"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#z6t.t"><span class="Identifier">z6t</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span></pre></dt>
- <dd>
- cz6t
- </dd>
- <a id="foo.t,SomeType,SomeType"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#foo.t%2CSomeType%2CSomeType"><span class="Identifier">foo</span></a><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="subdir/subdir_b/utils.html#SomeType"><span class="Identifier">SomeType</span></a><span class="Other">)</span></pre></dt>
- <dd>
- This does nothing
- </dd>
- <a id="myfn.t"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#myfn.t"><span class="Identifier">myfn</span></a><span class="Other">(</span><span class="Other">)</span></pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span><span class="Whitespace"> </span><span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">strutils</span><span class="Whitespace">
- </span><span class="Comment">## issue #8871 preserve formatting</span><span class="Whitespace">
- </span><span class="Comment">## line doc comment</span><span class="Whitespace">
- </span><span class="Comment"># bar</span><span class="Whitespace">
- </span><span class="Identifier">doAssert</span><span class="Whitespace"> </span><span class="StringLit">"'foo"</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="StringLit">"'foo"</span><span class="Whitespace">
- </span><span class="LongComment">##[
- foo
- bar
- ]##</span><span class="Whitespace">
- </span><span class="Identifier">doAssert</span><span class="Punctuation">:</span><span class="Whitespace"> </span><span class="Keyword">not</span><span class="Whitespace"> </span><span class="StringLit">"foo"</span><span class="Operator">.</span><span class="Identifier">startsWith</span><span class="Whitespace"> </span><span class="StringLit">"ba"</span><span class="Whitespace">
- </span><span class="Keyword">block</span><span class="Punctuation">:</span><span class="Whitespace">
- </span><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="HexNumber">0xff</span><span class="Whitespace"> </span><span class="Comment"># elu par cette crapule</span><span class="Whitespace">
- </span><span class="Comment"># should be in</span></pre>should be still in
- </dd>
- <a id="z14.t"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#z14.t"><span class="Identifier">z14</span></a><span class="Other">(</span><span class="Other">)</span></pre></dt>
- <dd>
- cz14
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span></pre>
- </dd>
- <a id="z15.t"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#z15.t"><span class="Identifier">z15</span></a><span class="Other">(</span><span class="Other">)</span></pre></dt>
- <dd>
- cz15
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span></pre>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">3</span></pre>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">4</span></pre>ok5 ok5b
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Identifier">assert</span><span class="Whitespace"> </span><span class="Identifier">true</span></pre>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">1</span></pre>in or out?
- </dd>
- <a id="testNimDocTrailingExample.t"></a>
- <dt><pre><span class="Keyword">template</span> <a href="#testNimDocTrailingExample.t"><span class="Identifier">testNimDocTrailingExample</span></a><span class="Other">(</span><span class="Other">)</span></pre></dt>
- <dd>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">discard</span><span class="Whitespace"> </span><span class="DecNumber">2</span></pre>
- </dd>
- </dl></div>
- </div>
- </div>
- <div class="row">
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br/>
- <small style="color: var(--hint);">Made with Nim. Generated: 1970-01-02 03:46:40 UTC</small>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
|