testproject.html 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <!-- This file is generated by Nim. -->
  4. <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>testproject</title>
  9. <!-- Favicon -->
  10. <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=="/>
  11. <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=">
  12. <!-- CSS -->
  13. <link rel="stylesheet" type="text/css" href="nimdoc.out.css">
  14. <!-- JS -->
  15. <script type="text/javascript" src="dochack.js"></script>
  16. </head>
  17. <body>
  18. <div class="document" id="documentId">
  19. <div class="container">
  20. <h1 class="title">testproject</h1>
  21. <div class="row">
  22. <div class="three columns">
  23. <div class="theme-select-wrapper">
  24. <label for="theme-select">Theme:&nbsp;</label>
  25. <select id="theme-select" onchange="setTheme(this.value)">
  26. <option value="auto">🌗 Match OS</option>
  27. <option value="dark">🌑 Dark</option>
  28. <option value="light">🌕 Light</option>
  29. </select>
  30. </div>
  31. <div id="global-links">
  32. <ul class="simple">
  33. <li><a id="indexLink" href="theindex.html">Index</a></li>
  34. </ul>
  35. </div>
  36. <div id="searchInputDiv">
  37. Search: <input type="search" id="searchInput" oninput="search()"/>
  38. </div>
  39. <div>
  40. Group by:
  41. <select onchange="groupBy(this.value)">
  42. <option value="section">Section</option>
  43. <option value="type">Type</option>
  44. </select>
  45. </div>
  46. <ul class="simple simple-toc" id="toc-list">
  47. <li>
  48. <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
  49. </li>
  50. <li>
  51. <details open>
  52. <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
  53. <ul class="simple simple-toc-section">
  54. <li><a class="reference" href="#A" title="A {.inject.} = enum
  55. aA">A</a></li>
  56. <li><a class="reference" href="#AnotherObject" title="AnotherObject = object
  57. case x*: bool
  58. of true:
  59. y*: proc (x: string)
  60. of false:">AnotherObject</a></li>
  61. <li><a class="reference" href="#B" title="B {.inject.} = enum
  62. bB">B</a></li>
  63. <li><a class="reference" href="#Foo" title="Foo = enum
  64. enumValueA2">Foo</a></li>
  65. <li><a class="reference" href="#FooBuzz" title="FooBuzz {.deprecated: &quot;FooBuzz msg&quot;.} = int">FooBuzz</a></li>
  66. <li><a class="reference" href="#MyObject" title="MyObject = object
  67. someString*: string ## This is a string
  68. annotated* {.somePragma.}: string ## This is an annotated string">MyObject</a></li>
  69. <li><a class="reference" href="#Shapes" title="Shapes = enum
  70. Circle, ## A circle
  71. Triangle, ## A three-sided shape
  72. Rectangle ## A four-sided shape">Shapes</a></li>
  73. <li><a class="reference" href="#T19396" title="T19396 = object
  74. a*: int">T19396</a></li>
  75. </ul>
  76. </details>
  77. </li>
  78. <li>
  79. <details open>
  80. <summary><a class="reference reference-toplevel" href="#8" id="58">Vars</a></summary>
  81. <ul class="simple simple-toc-section">
  82. <li><a class="reference" href="#aVariable" title="aVariable: array[1, int]">aVariable</a></li>
  83. <li><a class="reference" href="#someVariable" title="someVariable: bool">someVariable</a></li>
  84. </ul>
  85. </details>
  86. </li>
  87. <li>
  88. <details open>
  89. <summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
  90. <ul class="simple simple-toc-section">
  91. <li><a class="reference" href="#C_A" title="C_A = 0x7FF0000000000000'f64">C_A</a></li>
  92. <li><a class="reference" href="#C_B" title="C_B = 0o377'i8">C_B</a></li>
  93. <li><a class="reference" href="#C_C" title="C_C = 0o277'i8">C_C</a></li>
  94. <li><a class="reference" href="#C_D" title="C_D = 0o177777'i16">C_D</a></li>
  95. </ul>
  96. </details>
  97. </li>
  98. <li>
  99. <details open>
  100. <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
  101. <ul class="simple simple-toc-section">
  102. <ul class="simple nested-toc-section">addfBug14485
  103. <li><a class="reference" href="#addfBug14485" title="addfBug14485()">addfBug14485()</a></li>
  104. </ul>
  105. <ul class="simple nested-toc-section">anything
  106. <li><a class="reference" href="#anything" title="anything()">anything()</a></li>
  107. </ul>
  108. <ul class="simple nested-toc-section">asyncFun1
  109. <li><a class="reference" href="#asyncFun1" title="asyncFun1(): Future[int]">asyncFun1(): Future[int]</a></li>
  110. </ul>
  111. <ul class="simple nested-toc-section">asyncFun2
  112. <li><a class="reference" href="#asyncFun2" title="asyncFun2(): owned(Future[void])">asyncFun2(): owned(Future[void])</a></li>
  113. </ul>
  114. <ul class="simple nested-toc-section">asyncFun3
  115. <li><a class="reference" href="#asyncFun3" title="asyncFun3(): owned(Future[void])">asyncFun3(): owned(Future[void])</a></li>
  116. </ul>
  117. <ul class="simple nested-toc-section">bar
  118. <li><a class="reference" href="#bar" title="bar(f: FooBuzz)">bar(f: FooBuzz)</a></li>
  119. <li><a class="reference" href="#bar%2CT%2CT" title="bar[T](a, b: T): T">bar[T](a, b: T): T</a></li>
  120. </ul>
  121. <ul class="simple nested-toc-section">baz
  122. <li><a class="reference" href="#baz" title="baz()">baz()</a></li>
  123. <li><a class="reference" href="#baz%2CT%2CT" title="baz[T](a, b: T): T">baz[T](a, b: T): T</a></li>
  124. </ul>
  125. <ul class="simple nested-toc-section">buzz
  126. <li><a class="reference" href="#buzz%2CT%2CT" title="buzz[T](a, b: T): T">buzz[T](a, b: T): T</a></li>
  127. </ul>
  128. <ul class="simple nested-toc-section">c_nonexistent
  129. <li><a class="reference" href="#c_nonexistent%2Ccstring" title="c_nonexistent(frmt: cstring): cint">c_nonexistent(frmt: cstring): cint</a></li>
  130. </ul>
  131. <ul class="simple nested-toc-section">c_printf
  132. <li><a class="reference" href="#c_printf%2Ccstring" title="c_printf(frmt: cstring): cint">c_printf(frmt: cstring): cint</a></li>
  133. </ul>
  134. <ul class="simple nested-toc-section">fromUtils3
  135. <li><a class="reference" href="#fromUtils3" title="fromUtils3()">fromUtils3()</a></li>
  136. </ul>
  137. <ul class="simple nested-toc-section">isValid
  138. <li><a class="reference" href="#isValid%2CT" title="isValid[T](x: T): bool">isValid[T](x: T): bool</a></li>
  139. </ul>
  140. <ul class="simple nested-toc-section">low
  141. <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>
  142. </ul>
  143. <ul class="simple nested-toc-section">low2
  144. <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>
  145. </ul>
  146. <ul class="simple nested-toc-section">p1
  147. <li><a class="reference" href="#p1" title="p1()">p1()</a></li>
  148. </ul>
  149. <ul class="simple nested-toc-section">someFunc
  150. <li><a class="reference" href="#someFunc" title="someFunc()">someFunc()</a></li>
  151. </ul>
  152. <ul class="simple nested-toc-section">tripleStrLitTest
  153. <li><a class="reference" href="#tripleStrLitTest" title="tripleStrLitTest()">tripleStrLitTest()</a></li>
  154. </ul>
  155. <ul class="simple nested-toc-section">z1
  156. <li><a class="reference" href="#z1" title="z1(): Foo">z1(): Foo</a></li>
  157. </ul>
  158. <ul class="simple nested-toc-section">z2
  159. <li><a class="reference" href="#z2" title="z2()">z2()</a></li>
  160. </ul>
  161. <ul class="simple nested-toc-section">z3
  162. <li><a class="reference" href="#z3" title="z3()">z3()</a></li>
  163. </ul>
  164. <ul class="simple nested-toc-section">z4
  165. <li><a class="reference" href="#z4" title="z4()">z4()</a></li>
  166. </ul>
  167. <ul class="simple nested-toc-section">z5
  168. <li><a class="reference" href="#z5" title="z5(): int">z5(): int</a></li>
  169. </ul>
  170. <ul class="simple nested-toc-section">z6
  171. <li><a class="reference" href="#z6" title="z6(): int">z6(): int</a></li>
  172. </ul>
  173. <ul class="simple nested-toc-section">z7
  174. <li><a class="reference" href="#z7" title="z7(): int">z7(): int</a></li>
  175. </ul>
  176. <ul class="simple nested-toc-section">z8
  177. <li><a class="reference" href="#z8" title="z8(): int">z8(): int</a></li>
  178. </ul>
  179. <ul class="simple nested-toc-section">z9
  180. <li><a class="reference" href="#z9" title="z9()">z9()</a></li>
  181. </ul>
  182. <ul class="simple nested-toc-section">z10
  183. <li><a class="reference" href="#z10" title="z10()">z10()</a></li>
  184. </ul>
  185. <ul class="simple nested-toc-section">z11
  186. <li><a class="reference" href="#z11" title="z11()">z11()</a></li>
  187. </ul>
  188. <ul class="simple nested-toc-section">z12
  189. <li><a class="reference" href="#z12" title="z12(): int">z12(): int</a></li>
  190. </ul>
  191. <ul class="simple nested-toc-section">z13
  192. <li><a class="reference" href="#z13" title="z13()">z13()</a></li>
  193. </ul>
  194. <ul class="simple nested-toc-section">z17
  195. <li><a class="reference" href="#z17" title="z17()">z17()</a></li>
  196. </ul>
  197. </ul>
  198. </details>
  199. </li>
  200. <li>
  201. <details open>
  202. <summary><a class="reference reference-toplevel" href="#14" id="64">Methods</a></summary>
  203. <ul class="simple simple-toc-section">
  204. <ul class="simple nested-toc-section">method1
  205. <li><a class="reference" href="#method1.e%2CMoo" title="method1(self: Moo)">method1(self: Moo)</a></li>
  206. </ul>
  207. <ul class="simple nested-toc-section">method2
  208. <li><a class="reference" href="#method2.e%2CMoo" title="method2(self: Moo): int">method2(self: Moo): int</a></li>
  209. </ul>
  210. <ul class="simple nested-toc-section">method3
  211. <li><a class="reference" href="#method3.e%2CMoo" title="method3(self: Moo): int">method3(self: Moo): int</a></li>
  212. </ul>
  213. </ul>
  214. </details>
  215. </li>
  216. <li>
  217. <details open>
  218. <summary><a class="reference reference-toplevel" href="#15" id="65">Iterators</a></summary>
  219. <ul class="simple simple-toc-section">
  220. <ul class="simple nested-toc-section">fromUtils1
  221. <li><a class="reference" href="#fromUtils1.i" title="fromUtils1(): int">fromUtils1(): int</a></li>
  222. </ul>
  223. <ul class="simple nested-toc-section">iter1
  224. <li><a class="reference" href="#iter1.i%2Cint" title="iter1(n: int): int">iter1(n: int): int</a></li>
  225. </ul>
  226. <ul class="simple nested-toc-section">iter2
  227. <li><a class="reference" href="#iter2.i%2Cint" title="iter2(n: int): int">iter2(n: int): int</a></li>
  228. </ul>
  229. </ul>
  230. </details>
  231. </li>
  232. <li>
  233. <details open>
  234. <summary><a class="reference reference-toplevel" href="#17" id="67">Macros</a></summary>
  235. <ul class="simple simple-toc-section">
  236. <ul class="simple nested-toc-section">bar
  237. <li><a class="reference" href="#bar.m" title="bar(): untyped">bar(): untyped</a></li>
  238. </ul>
  239. <ul class="simple nested-toc-section">z16
  240. <li><a class="reference" href="#z16.m" title="z16()">z16()</a></li>
  241. </ul>
  242. <ul class="simple nested-toc-section">z18
  243. <li><a class="reference" href="#z18.m" title="z18(): int">z18(): int</a></li>
  244. </ul>
  245. </ul>
  246. </details>
  247. </li>
  248. <li>
  249. <details open>
  250. <summary><a class="reference reference-toplevel" href="#18" id="68">Templates</a></summary>
  251. <ul class="simple simple-toc-section">
  252. <ul class="simple nested-toc-section">foo
  253. <li><a class="reference" href="#foo.t%2CSomeType%2CSomeType" title="foo(a, b: SomeType)">foo(a, b: SomeType)</a></li>
  254. </ul>
  255. <ul class="simple nested-toc-section">fromUtils2
  256. <li><a class="reference" href="#fromUtils2.t" title="fromUtils2()">fromUtils2()</a></li>
  257. </ul>
  258. <ul class="simple nested-toc-section">myfn
  259. <li><a class="reference" href="#myfn.t" title="myfn()">myfn()</a></li>
  260. </ul>
  261. <ul class="simple nested-toc-section">somePragma
  262. <li><a class="reference" href="#somePragma.t" title="somePragma()">somePragma()</a></li>
  263. </ul>
  264. <ul class="simple nested-toc-section">testNimDocTrailingExample
  265. <li><a class="reference" href="#testNimDocTrailingExample.t" title="testNimDocTrailingExample()">testNimDocTrailingExample()</a></li>
  266. </ul>
  267. <ul class="simple nested-toc-section">z6t
  268. <li><a class="reference" href="#z6t.t" title="z6t(): int">z6t(): int</a></li>
  269. </ul>
  270. <ul class="simple nested-toc-section">z14
  271. <li><a class="reference" href="#z14.t" title="z14()">z14()</a></li>
  272. </ul>
  273. <ul class="simple nested-toc-section">z15
  274. <li><a class="reference" href="#z15.t" title="z15()">z15()</a></li>
  275. </ul>
  276. </ul>
  277. </details>
  278. </li>
  279. </ul>
  280. </div>
  281. <div class="nine columns" id="content">
  282. <div id="tocRoot"></div>
  283. <p class="module-desc">This is the top level module.
  284. <p><strong class="examples_text">Example:</strong></p>
  285. <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">testproject</span>
  286. <span class="Keyword">import</span> <span class="Identifier">subdir</span> <span class="Operator">/</span> <span class="Identifier">subdir_b</span> <span class="Operator">/</span> <span class="Identifier">utils</span>
  287. <span class="Identifier">doAssert</span> <span class="Identifier">bar</span><span class="Punctuation">(</span><span class="DecNumber">3</span><span class="Punctuation">,</span> <span class="DecNumber">4</span><span class="Punctuation">)</span> <span class="Operator">==</span> <span class="DecNumber">7</span>
  288. <span class="Identifier">foo</span><span class="Punctuation">(</span><span class="Identifier">enumValueA</span><span class="Punctuation">,</span> <span class="Identifier">enumValueB</span><span class="Punctuation">)</span>
  289. <span class="Comment"># bug #11078</span>
  290. <span class="Keyword">for</span> <span class="Identifier">x</span> <span class="Keyword">in</span> <span class="StringLit">&quot;xx&quot;</span><span class="Punctuation">:</span> <span class="Keyword">discard</span></pre>top2
  291. <p><strong class="examples_text">Example:</strong></p>
  292. <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">testproject</span>
  293. <span class="Keyword">discard</span> <span class="StringLit">&quot;in top2&quot;</span></pre>top2 after
  294. <p><strong class="examples_text">Example:</strong></p>
  295. <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">testproject</span>
  296. <span class="Keyword">discard</span> <span class="StringLit">&quot;in top3&quot;</span></pre>top3 after</p>
  297. <div class="section" id="6">
  298. <h1><a class="toc-backref" href="#6">Imports</a></h1>
  299. <dl class="item">
  300. <a class="reference external" href="subdir/subdir_b/utils.html">subdir/subdir_b/utils</a>
  301. </dl>
  302. </div>
  303. <div class="section" id="7">
  304. <h1><a class="toc-backref" href="#7">Types</a></h1>
  305. <dl class="item">
  306. <div id="A">
  307. <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>
  308. <span class="Identifier">aA</span></pre></dt>
  309. <dd>
  310. The enum A.
  311. </dd>
  312. </div>
  313. <div id="AnotherObject">
  314. <dt><pre><a href="testproject.html#AnotherObject"><span class="Identifier">AnotherObject</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
  315. <span class="Keyword">case</span> <span class="Identifier">x</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">bool</span>
  316. <span class="Keyword">of</span> <span class="Identifier">true</span><span class="Other">:</span>
  317. <span class="Identifier">y</span><span class="Operator">*</span><span class="Other">:</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">string</span><span class="Other">)</span>
  318. <span class="Keyword">of</span> <span class="Identifier">false</span><span class="Other">:</span>
  319. </pre></dt>
  320. <dd>
  321. </dd>
  322. </div>
  323. <div id="B">
  324. <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>
  325. <span class="Identifier">bB</span></pre></dt>
  326. <dd>
  327. The enum B.
  328. </dd>
  329. </div>
  330. <div id="Foo">
  331. <dt><pre><a href="testproject.html#Foo"><span class="Identifier">Foo</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
  332. <span class="Identifier">enumValueA2</span></pre></dt>
  333. <dd>
  334. </dd>
  335. </div>
  336. <div id="FooBuzz">
  337. <dt><pre><a href="testproject.html#FooBuzz"><span class="Identifier">FooBuzz</span></a> {.<span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;FooBuzz msg&quot;</span></span>.} <span class="Other">=</span> <span class="Identifier">int</span></pre></dt>
  338. <dd>
  339. <div class="deprecation-message">
  340. <b>Deprecated:</b> FooBuzz msg
  341. </div>
  342. </dd>
  343. </div>
  344. <div id="MyObject">
  345. <dt><pre><a href="testproject.html#MyObject"><span class="Identifier">MyObject</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
  346. <span class="Identifier">someString</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">string</span> <span class="Comment">## This is a string</span>
  347. <span class="Identifier">annotated</span><span class="Operator">*</span> {.<span class="Identifier">somePragma</span>.}<span class="Other">:</span> <span class="Identifier">string</span> <span class="Comment">## This is an annotated string</span>
  348. </pre></dt>
  349. <dd>
  350. </dd>
  351. </div>
  352. <div id="Shapes">
  353. <dt><pre><a href="testproject.html#Shapes"><span class="Identifier">Shapes</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
  354. <span class="Identifier">Circle</span><span class="Other">,</span> <span class="Comment">## A circle</span>
  355. <span class="Identifier">Triangle</span><span class="Other">,</span> <span class="Comment">## A three-sided shape</span>
  356. <span class="Identifier">Rectangle</span> <span class="Comment">## A four-sided shape</span></pre></dt>
  357. <dd>
  358. Some shapes.
  359. </dd>
  360. </div>
  361. <div id="T19396">
  362. <dt><pre><a href="testproject.html#T19396"><span class="Identifier">T19396</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
  363. <span class="Identifier">a</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span>
  364. </pre></dt>
  365. <dd>
  366. </dd>
  367. </div>
  368. </dl>
  369. </div>
  370. <div class="section" id="8">
  371. <h1><a class="toc-backref" href="#8">Vars</a></h1>
  372. <dl class="item">
  373. <div id="aVariable">
  374. <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>
  375. <dd>
  376. </dd>
  377. </div>
  378. <div id="someVariable">
  379. <dt><pre><a href="testproject.html#someVariable"><span class="Identifier">someVariable</span></a><span class="Other">:</span> <span class="Identifier">bool</span></pre></dt>
  380. <dd>
  381. This should be visible.
  382. </dd>
  383. </div>
  384. </dl>
  385. </div>
  386. <div class="section" id="10">
  387. <h1><a class="toc-backref" href="#10">Consts</a></h1>
  388. <dl class="item">
  389. <div id="C_A">
  390. <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>
  391. <dd>
  392. </dd>
  393. </div>
  394. <div id="C_B">
  395. <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>
  396. <dd>
  397. </dd>
  398. </div>
  399. <div id="C_C">
  400. <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>
  401. <dd>
  402. </dd>
  403. </div>
  404. <div id="C_D">
  405. <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>
  406. <dd>
  407. </dd>
  408. </div>
  409. </dl>
  410. </div>
  411. <div class="section" id="12">
  412. <h1><a class="toc-backref" href="#12">Procs</a></h1>
  413. <dl class="item">
  414. <div id="addfBug14485-procs-all">
  415. <div id="addfBug14485">
  416. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  417. <dd>
  418. Some proc
  419. <p><strong class="examples_text">Example:</strong></p>
  420. <pre class="listing"><span class="Keyword">discard</span> <span class="StringLit">&quot;foo() = &quot;</span> <span class="Operator">&amp;</span> <span class="Operator">$</span><span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">]</span>
  421. <span class="LongComment">#[
  422. 0: let's also add some broken html to make sure this won't break in future
  423. 1: &lt;/span&gt;
  424. 2: &lt;/span&gt;
  425. 3: &lt;/span
  426. 4: &lt;/script&gt;
  427. 5: &lt;/script
  428. 6: &lt;/script
  429. 7: end of broken html
  430. ]#</span></pre>
  431. </dd>
  432. </div>
  433. </div>
  434. <div id="anything-procs-all">
  435. <div id="anything">
  436. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  437. <dd>
  438. There is no block quote after blank lines at the beginning.
  439. </dd>
  440. </div>
  441. </div>
  442. <div id="asyncFun1-procs-all">
  443. <div id="asyncFun1">
  444. <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">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</span><span class="Other">,</span>
  445. <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>
  446. <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  447. <dd>
  448. ok1
  449. </dd>
  450. </div>
  451. </div>
  452. <div id="asyncFun2-procs-all">
  453. <div id="asyncFun2">
  454. <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">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</span><span class="Other">,</span> <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>
  455. <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  456. <dd>
  457. </dd>
  458. </div>
  459. </div>
  460. <div id="asyncFun3-procs-all">
  461. <div id="asyncFun3">
  462. <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">stackTrace</span><span class="Other">:</span> <span class="DecNumber">false</span><span class="Other">,</span> <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>
  463. <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">RootEffect</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  464. <dd>
  465. <p><strong class="examples_text">Example:</strong></p>
  466. <pre class="listing"><span class="Keyword">discard</span></pre>ok1
  467. </dd>
  468. </div>
  469. </div>
  470. <div id="bar-procs-all">
  471. <div id="bar">
  472. <dt><pre><span class="Keyword">proc</span> <a href="#bar"><span class="Identifier">bar</span></a><span class="Other">(</span><span class="Identifier">f</span><span class="Other">:</span> <a href="testproject.html#FooBuzz"><span class="Identifier">FooBuzz</span></a><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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  473. <dd>
  474. </dd>
  475. </div>
  476. <div id="bar,T,T">
  477. <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>
  478. <dd>
  479. </dd>
  480. </div>
  481. </div>
  482. <div id="baz-procs-all">
  483. <div id="baz">
  484. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  485. <dd>
  486. </dd>
  487. </div>
  488. <div id="baz,T,T">
  489. <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><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span></span>.}</pre></dt>
  490. <dd>
  491. <div class="deprecation-message">
  492. <b>Deprecated</b>
  493. </div>
  494. This is deprecated without message.
  495. </dd>
  496. </div>
  497. </div>
  498. <div id="buzz-procs-all">
  499. <div id="buzz,T,T">
  500. <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><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">deprecated</span><span class="Other">:</span> <span class="StringLit">&quot;since v0.20&quot;</span></span>.}</pre></dt>
  501. <dd>
  502. <div class="deprecation-message">
  503. <b>Deprecated:</b> since v0.20
  504. </div>
  505. This is deprecated with a message.
  506. </dd>
  507. </div>
  508. </div>
  509. <div id="c_nonexistent-procs-all">
  510. <div id="c_nonexistent,cstring">
  511. <dt><pre><span class="Keyword">proc</span> <a href="#c_nonexistent%2Ccstring"><span class="Identifier">c_nonexistent</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">&quot;nonexistent&quot;</span><span class="Other">,</span>
  512. <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">&quot;&lt;stdio.h&gt;&quot;</span><span class="Other">,</span> <span class="Identifier">varargs</span><span class="Other">,</span> <span class="Identifier">discardable</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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  513. <dd>
  514. </dd>
  515. </div>
  516. </div>
  517. <div id="c_printf-procs-all">
  518. <div id="c_printf,cstring">
  519. <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">&quot;printf&quot;</span><span class="Other">,</span> <span class="Identifier">header</span><span class="Other">:</span> <span class="StringLit">&quot;&lt;stdio.h&gt;&quot;</span><span class="Other">,</span>
  520. <span class="Identifier">varargs</span><span class="Other">,</span> <span class="Identifier">discardable</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 class="Other">,</span>
  521. <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  522. <dd>
  523. the c printf. etc.
  524. </dd>
  525. </div>
  526. </div>
  527. <div id="fromUtils3-procs-all">
  528. <div id="fromUtils3">
  529. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  530. <dd>
  531. came form utils but should be shown where <tt class="docutils literal"><span class="pre"><span class="Identifier">fromUtilsGen</span></span></tt> is called
  532. <p><strong class="examples_text">Example:</strong></p>
  533. <pre class="listing"><span class="Keyword">discard</span> <span class="LongStringLit">&quot;&quot;&quot;should be shown as examples for fromUtils3
  534. in module calling fromUtilsGen&quot;&quot;&quot;</span></pre>
  535. </dd>
  536. </div>
  537. </div>
  538. <div id="isValid-procs-all">
  539. <div id="isValid,T">
  540. <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>
  541. <dd>
  542. </dd>
  543. </div>
  544. </div>
  545. <div id="low-procs-all">
  546. <div id="low,T">
  547. <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">&quot;Low&quot;</span><span class="Other">,</span> <span class="Identifier">noSideEffect</span><span class="Other">,</span>
  548. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  549. <dd>
  550. <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>
  551. <p>See also:</p>
  552. <ul class="simple"><li><a class="reference external" href="#low2,T">low2(T)</a></li>
  553. </ul>
  554. <pre class="listing"><span class="Identifier">low</span><span class="Punctuation">(</span><span class="DecNumber">2</span><span class="Punctuation">)</span> <span class="Comment"># =&gt; -9223372036854775808</span></pre>
  555. </dd>
  556. </div>
  557. </div>
  558. <div id="low2-procs-all">
  559. <div id="low2,T">
  560. <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">&quot;Low&quot;</span><span class="Other">,</span> <span class="Identifier">noSideEffect</span><span class="Other">,</span>
  561. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  562. <dd>
  563. <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>
  564. <p>See also:</p>
  565. <ul class="simple"><li><a class="reference external" href="#low,T">low(T)</a></li>
  566. </ul>
  567. <pre class="listing"><span class="Identifier">low2</span><span class="Punctuation">(</span><span class="DecNumber">2</span><span class="Punctuation">)</span> <span class="Comment"># =&gt; -9223372036854775808</span></pre>
  568. <p><strong class="examples_text">Example:</strong></p>
  569. <pre class="listing"><span class="Keyword">discard</span> <span class="StringLit">&quot;in low2&quot;</span></pre>
  570. </dd>
  571. </div>
  572. </div>
  573. <div id="p1-procs-all">
  574. <div id="p1">
  575. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  576. <dd>
  577. cp1
  578. <p><strong class="examples_text">Example:</strong></p>
  579. <pre class="listing"><span class="Identifier">doAssert</span> <span class="DecNumber">1</span> <span class="Operator">==</span> <span class="DecNumber">1</span> <span class="Comment"># regular comments work here</span></pre>c4
  580. <p><strong class="examples_text">Example:</strong></p>
  581. <pre class="listing"><span class="Comment"># c5 regular comments before 1st token work</span>
  582. <span class="Comment"># regular comment</span>
  583. <span class="LongComment">#[
  584. nested regular comment
  585. ]#</span>
  586. <span class="Identifier">doAssert</span> <span class="DecNumber">2</span> <span class="Operator">==</span> <span class="DecNumber">2</span> <span class="Comment"># c8</span>
  587. <span class="Comment">## this is a non-nested doc comment</span>
  588. <span class="LongComment">##[
  589. this is a nested doc comment
  590. ]##</span>
  591. <span class="Keyword">discard</span> <span class="StringLit">&quot;c9&quot;</span>
  592. <span class="Comment"># also work after</span></pre>
  593. </dd>
  594. </div>
  595. </div>
  596. <div id="someFunc-procs-all">
  597. <div id="someFunc">
  598. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  599. <dd>
  600. 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>
  601. </dd>
  602. </div>
  603. </div>
  604. <div id="tripleStrLitTest-procs-all">
  605. <div id="tripleStrLitTest">
  606. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  607. <dd>
  608. <p><strong class="examples_text">Example: cmd: --hint:XDeclaredButNotUsed:off</strong></p>
  609. <pre class="listing"><span class="Comment">## mullitline string litterals are tricky as their indentation can span</span>
  610. <span class="Comment">## below that of the runnableExamples</span>
  611. <span class="Keyword">let</span> <span class="Identifier">s1a</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;
  612. should appear at indent 0
  613. at indent 2
  614. at indent 0
  615. &quot;&quot;&quot;</span>
  616. <span class="Comment"># make sure this works too</span>
  617. <span class="Keyword">let</span> <span class="Identifier">s1b</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;start at same line
  618. at indent 2
  619. at indent 0
  620. &quot;&quot;&quot;</span> <span class="Comment"># comment after</span>
  621. <span class="Keyword">let</span> <span class="Identifier">s2</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;sandwich &quot;&quot;&quot;</span>
  622. <span class="Keyword">let</span> <span class="Identifier">s3</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;&quot;&quot;&quot;</span>
  623. <span class="Keyword">when</span> <span class="Identifier">false</span><span class="Punctuation">:</span>
  624. <span class="Keyword">let</span> <span class="Identifier">s5</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;
  625. in s5 &quot;&quot;&quot;</span>
  626. <span class="Keyword">let</span> <span class="Identifier">s3b</span> <span class="Operator">=</span> <span class="Punctuation">[</span><span class="LongStringLit">&quot;&quot;&quot;
  627. %!? #[...] # inside a multiline ...
  628. &quot;&quot;&quot;</span><span class="Punctuation">,</span> <span class="StringLit">&quot;foo&quot;</span><span class="Punctuation">]</span>
  629. <span class="Comment">## make sure handles trailing spaces</span>
  630. <span class="Keyword">let</span> <span class="Identifier">s4</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;
  631. &quot;&quot;&quot;</span>
  632. <span class="Keyword">let</span> <span class="Identifier">s5</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot; x
  633. &quot;&quot;&quot;</span>
  634. <span class="Keyword">let</span> <span class="Identifier">s6</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot; &quot;&quot;
  635. &quot;&quot;&quot;</span>
  636. <span class="Keyword">let</span> <span class="Identifier">s7</span> <span class="Operator">=</span> <span class="LongStringLit">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span>
  637. <span class="Keyword">let</span> <span class="Identifier">s8</span> <span class="Operator">=</span> <span class="Punctuation">[</span><span class="LongStringLit">&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;&quot;</span><span class="Punctuation">,</span> <span class="LongStringLit">&quot;&quot;&quot;
  638. &quot;&quot;&quot;</span> <span class="Punctuation">]</span>
  639. <span class="Keyword">discard</span>
  640. <span class="Comment"># should be in</span></pre>
  641. </dd>
  642. </div>
  643. </div>
  644. <div id="z1-procs-all">
  645. <div id="z1">
  646. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  647. <dd>
  648. cz1
  649. </dd>
  650. </div>
  651. </div>
  652. <div id="z2-procs-all">
  653. <div id="z2">
  654. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  655. <dd>
  656. cz2
  657. <p><strong class="examples_text">Example:</strong></p>
  658. <pre class="listing"><span class="Keyword">discard</span> <span class="StringLit">&quot;in cz2&quot;</span></pre>
  659. </dd>
  660. </div>
  661. </div>
  662. <div id="z3-procs-all">
  663. <div id="z3">
  664. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  665. <dd>
  666. cz3
  667. </dd>
  668. </div>
  669. </div>
  670. <div id="z4-procs-all">
  671. <div id="z4">
  672. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  673. <dd>
  674. cz4
  675. </dd>
  676. </div>
  677. </div>
  678. <div id="z5-procs-all">
  679. <div id="z5">
  680. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  681. <dd>
  682. cz5
  683. </dd>
  684. </div>
  685. </div>
  686. <div id="z6-procs-all">
  687. <div id="z6">
  688. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  689. <dd>
  690. cz6
  691. </dd>
  692. </div>
  693. </div>
  694. <div id="z7-procs-all">
  695. <div id="z7">
  696. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  697. <dd>
  698. cz7
  699. </dd>
  700. </div>
  701. </div>
  702. <div id="z8-procs-all">
  703. <div id="z8">
  704. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  705. <dd>
  706. cz8
  707. </dd>
  708. </div>
  709. </div>
  710. <div id="z9-procs-all">
  711. <div id="z9">
  712. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  713. <dd>
  714. <p><strong class="examples_text">Example:</strong></p>
  715. <pre class="listing"><span class="Identifier">doAssert</span> <span class="DecNumber">1</span> <span class="Operator">+</span> <span class="DecNumber">1</span> <span class="Operator">==</span> <span class="DecNumber">2</span></pre>
  716. </dd>
  717. </div>
  718. </div>
  719. <div id="z10-procs-all">
  720. <div id="z10">
  721. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  722. <dd>
  723. <p><strong class="examples_text">Example: cmd: -d:foobar</strong></p>
  724. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">1</span></pre>cz10
  725. </dd>
  726. </div>
  727. </div>
  728. <div id="z11-procs-all">
  729. <div id="z11">
  730. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  731. <dd>
  732. <p><strong class="examples_text">Example:</strong></p>
  733. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">1</span></pre>
  734. </dd>
  735. </div>
  736. </div>
  737. <div id="z12-procs-all">
  738. <div id="z12">
  739. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  740. <dd>
  741. <p><strong class="examples_text">Example:</strong></p>
  742. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">1</span></pre>
  743. </dd>
  744. </div>
  745. </div>
  746. <div id="z13-procs-all">
  747. <div id="z13">
  748. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  749. <dd>
  750. cz13
  751. <p><strong class="examples_text">Example:</strong></p>
  752. <pre class="listing"><span class="Keyword">discard</span></pre>
  753. </dd>
  754. </div>
  755. </div>
  756. <div id="z17-procs-all">
  757. <div id="z17">
  758. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  759. <dd>
  760. cz17 rest
  761. <p><strong class="examples_text">Example:</strong></p>
  762. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">1</span></pre>rest
  763. </dd>
  764. </div>
  765. </div>
  766. </dl>
  767. </div>
  768. <div class="section" id="14">
  769. <h1><a class="toc-backref" href="#14">Methods</a></h1>
  770. <dl class="item">
  771. <div id="method1-methods-all">
  772. <div id="method1.e,Moo">
  773. <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 class="Identifier">base</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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  774. <dd>
  775. foo1
  776. </dd>
  777. </div>
  778. </div>
  779. <div id="method2-methods-all">
  780. <div id="method2.e,Moo">
  781. <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 class="Identifier">base</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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  782. <dd>
  783. foo2
  784. </dd>
  785. </div>
  786. </div>
  787. <div id="method3-methods-all">
  788. <div id="method3.e,Moo">
  789. <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 class="Identifier">base</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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  790. <dd>
  791. foo3
  792. </dd>
  793. </div>
  794. </div>
  795. </dl>
  796. </div>
  797. <div class="section" id="15">
  798. <h1><a class="toc-backref" href="#15">Iterators</a></h1>
  799. <dl class="item">
  800. <div id="fromUtils1-iterators-all">
  801. <div id="fromUtils1.i">
  802. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  803. <dd>
  804. <p><strong class="examples_text">Example:</strong></p>
  805. <pre class="listing"><span class="Comment"># ok1</span>
  806. <span class="Identifier">assert</span> <span class="DecNumber">1</span> <span class="Operator">==</span> <span class="DecNumber">1</span>
  807. <span class="Comment"># ok2</span></pre>
  808. </dd>
  809. </div>
  810. </div>
  811. <div id="iter1-iterators-all">
  812. <div id="iter1.i,int">
  813. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  814. <dd>
  815. foo1
  816. </dd>
  817. </div>
  818. </div>
  819. <div id="iter2-iterators-all">
  820. <div id="iter2.i,int">
  821. <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 class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  822. <dd>
  823. foo2
  824. <p><strong class="examples_text">Example:</strong></p>
  825. <pre class="listing"><span class="Keyword">discard</span> <span class="Comment"># bar</span></pre>
  826. </dd>
  827. </div>
  828. </div>
  829. </dl>
  830. </div>
  831. <div class="section" id="17">
  832. <h1><a class="toc-backref" href="#17">Macros</a></h1>
  833. <dl class="item">
  834. <div id="bar-macros-all">
  835. <div id="bar.m">
  836. <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>
  837. <dd>
  838. </dd>
  839. </div>
  840. </div>
  841. <div id="z16-macros-all">
  842. <div id="z16.m">
  843. <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>
  844. <dd>
  845. <p><strong class="examples_text">Example:</strong></p>
  846. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">1</span></pre>cz16 after
  847. <p><strong class="examples_text">Example:</strong></p>
  848. <pre class="listing"><span class="Identifier">doAssert</span> <span class="DecNumber">2</span> <span class="Operator">==</span> <span class="DecNumber">1</span> <span class="Operator">+</span> <span class="DecNumber">1</span></pre>
  849. </dd>
  850. </div>
  851. </div>
  852. <div id="z18-macros-all">
  853. <div id="z18.m">
  854. <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>
  855. <dd>
  856. cz18
  857. </dd>
  858. </div>
  859. </div>
  860. </dl>
  861. </div>
  862. <div class="section" id="18">
  863. <h1><a class="toc-backref" href="#18">Templates</a></h1>
  864. <dl class="item">
  865. <div id="foo-templates-all">
  866. <div id="foo.t,SomeType,SomeType">
  867. <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>
  868. <dd>
  869. This does nothing
  870. </dd>
  871. </div>
  872. </div>
  873. <div id="fromUtils2-templates-all">
  874. <div id="fromUtils2.t">
  875. <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>
  876. <dd>
  877. ok3
  878. <p><strong class="examples_text">Example:</strong></p>
  879. <pre class="listing"><span class="Keyword">discard</span> <span class="LongStringLit">&quot;&quot;&quot;should be shown as examples for fromUtils2
  880. in module calling fromUtilsGen&quot;&quot;&quot;</span></pre>
  881. </dd>
  882. </div>
  883. </div>
  884. <div id="myfn-templates-all">
  885. <div id="myfn.t">
  886. <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>
  887. <dd>
  888. <p><strong class="examples_text">Example:</strong></p>
  889. <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">strutils</span>
  890. <span class="Comment">## issue #8871 preserve formatting</span>
  891. <span class="Comment">## line doc comment</span>
  892. <span class="Comment"># bar</span>
  893. <span class="Identifier">doAssert</span> <span class="StringLit">&quot;'foo&quot;</span> <span class="Operator">==</span> <span class="StringLit">&quot;'foo&quot;</span>
  894. <span class="LongComment">##[
  895. foo
  896. bar
  897. ]##</span>
  898. <span class="Identifier">doAssert</span><span class="Punctuation">:</span> <span class="Keyword">not</span> <span class="StringLit">&quot;foo&quot;</span><span class="Operator">.</span><span class="Identifier">startsWith</span> <span class="StringLit">&quot;ba&quot;</span>
  899. <span class="Keyword">block</span><span class="Punctuation">:</span>
  900. <span class="Keyword">discard</span> <span class="HexNumber">0xff</span> <span class="Comment"># elu par cette crapule</span>
  901. <span class="Comment"># should be in</span></pre>should be still in
  902. </dd>
  903. </div>
  904. </div>
  905. <div id="somePragma-templates-all">
  906. <div id="somePragma.t">
  907. <dt><pre><span class="Keyword">template</span> <a href="#somePragma.t"><span class="Identifier">somePragma</span></a><span class="Other">(</span><span class="Other">)</span> {.<span class="Identifier">pragma</span>.}</pre></dt>
  908. <dd>
  909. Just some annotation
  910. </dd>
  911. </div>
  912. </div>
  913. <div id="testNimDocTrailingExample-templates-all">
  914. <div id="testNimDocTrailingExample.t">
  915. <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>
  916. <dd>
  917. <p><strong class="examples_text">Example:</strong></p>
  918. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">2</span></pre>
  919. </dd>
  920. </div>
  921. </div>
  922. <div id="z6t-templates-all">
  923. <div id="z6t.t">
  924. <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>
  925. <dd>
  926. cz6t
  927. </dd>
  928. </div>
  929. </div>
  930. <div id="z14-templates-all">
  931. <div id="z14.t">
  932. <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>
  933. <dd>
  934. cz14
  935. <p><strong class="examples_text">Example:</strong></p>
  936. <pre class="listing"><span class="Keyword">discard</span></pre>
  937. </dd>
  938. </div>
  939. </div>
  940. <div id="z15-templates-all">
  941. <div id="z15.t">
  942. <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>
  943. <dd>
  944. cz15
  945. <p><strong class="examples_text">Example:</strong></p>
  946. <pre class="listing"><span class="Keyword">discard</span></pre>
  947. <p><strong class="examples_text">Example:</strong></p>
  948. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">3</span></pre>
  949. <p><strong class="examples_text">Example:</strong></p>
  950. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">4</span></pre>ok5 ok5b
  951. <p><strong class="examples_text">Example:</strong></p>
  952. <pre class="listing"><span class="Identifier">assert</span> <span class="Identifier">true</span></pre>
  953. <p><strong class="examples_text">Example:</strong></p>
  954. <pre class="listing"><span class="Keyword">discard</span> <span class="DecNumber">1</span></pre>in or out?
  955. </dd>
  956. </div>
  957. </div>
  958. </dl>
  959. </div>
  960. </div>
  961. </div>
  962. <div class="twelve-columns footer">
  963. <span class="nim-sprite"></span>
  964. <br>
  965. <small style="color: var(--hint);">Made with Nim. Generated: 1970-01-02 03:46:40 UTC</small>
  966. </div>
  967. </div>
  968. </div>
  969. <!-- Google fonts -->
  970. <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
  971. <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
  972. </body>
  973. </html>