12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094 |
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <!-- This file is generated by Nim. -->
- <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>std/typeinfo</title>
- <!-- 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'/>
- <!-- 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=">
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
- <!-- JS -->
- <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
- </head>
- <body>
- <div class="document" id="documentId">
- <div class="container">
- <h1 class="title">std/typeinfo</h1>
- <div class="row">
- <div class="three columns">
- <div class="theme-select-wrapper">
- <label for="theme-select">Theme: </label>
- <select id="theme-select" onchange="setTheme(this.value)">
- <option value="auto">🌗 Match OS</option>
- <option value="dark">🌑 Dark</option>
- <option value="light">🌕 Light</option>
- </select>
- </div>
- <div id="global-links">
- <ul class="simple-boot">
- <li><a href="manual.html">Manual</a></li>
- <li><a href="lib.html">Standard library</a></li>
- <li> <a id="indexLink" href="theindex.html">Index</a></li>
- <li><a href="compiler/theindex.html">Compiler docs</a></li>
- <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
- <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
- </ul>
- </div>
- <div id="searchInputDiv">
- Search: <input type="search" id="searchInput"
- oninput="search()" />
- </div>
-
- <ul class="simple simple-toc" id="toc-list">
- <li>
- <a class="reference reference-toplevel" href="#6" id="56">Imports</a>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
- <ul class="simple simple-toc-section">
- <li><a class="reference" href="#Any" title="Any = object
- when defined(js):
- else:">Any</a></li>
- <li><a class="reference" href="#AnyKind" title="AnyKind = enum
- akNone = 0, ## invalid
- akBool = 1, ## bool
- akChar = 2, ## char
- akEnum = 14, ## enum
- akArray = 16, ## array
- akObject = 17, ## object
- akTuple = 18, ## tuple
- akSet = 19, ## set
- akRange = 20, ## range
- akPtr = 21, ## ptr
- akRef = 22, ## ref
- akSequence = 24, ## sequence
- akProc = 25, ## proc
- akPointer = 26, ## pointer
- akString = 28, ## string
- akCString = 29, ## cstring
- akInt = 31, ## int
- akInt8 = 32, ## int8
- akInt16 = 33, ## int16
- akInt32 = 34, ## int32
- akInt64 = 35, ## int64
- akFloat = 36, ## float
- akFloat32 = 37, ## float32
- akFloat64 = 38, ## float64
- akFloat128 = 39, ## float128
- akUInt = 40, ## uint
- akUInt8 = 41, ## uint8
- akUInt16 = 42, ## uin16
- akUInt32 = 43, ## uint32
- akUInt64 = 44 ## uint64">AnyKind</a></li>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">[]
- <li><a class="reference" href="#%5B%5D%2CAny" title="`[]`(x: Any): Any">`[]`(x: Any): Any</a></li>
- <li><a class="reference" href="#%5B%5D%2CAny%2Cstring" title="`[]`(x: Any; fieldName: string): Any">`[]`(x: Any; fieldName: string): Any</a></li>
- <li><a class="reference" href="#%5B%5D%2CAny%2Cint" title="`[]`(x: Any; i: int): Any">`[]`(x: Any; i: int): Any</a></li>
- </ul>
- <ul class="simple nested-toc-section">[]=
- <li><a class="reference" href="#%5B%5D%3D%2CAny%2CAny" title="`[]=`(x, y: Any)">`[]=`(x, y: Any)</a></li>
- <li><a class="reference" href="#%5B%5D%3D%2CAny%2Cstring%2CAny" title="`[]=`(x: Any; fieldName: string; value: Any)">`[]=`(x: Any; fieldName: string; value: Any)</a></li>
- <li><a class="reference" href="#%5B%5D%3D%2CAny%2Cint%2CAny" title="`[]=`(x: Any; i: int; y: Any)">`[]=`(x: Any; i: int; y: Any)</a></li>
- </ul>
- <ul class="simple nested-toc-section">assign
- <li><a class="reference" href="#assign%2CAny%2CAny" title="assign(x, y: Any)">assign(x, y: Any)</a></li>
- </ul>
- <ul class="simple nested-toc-section">base
- <li><a class="reference" href="#base%2CAny" title="base(x: Any): Any">base(x: Any): Any</a></li>
- </ul>
- <ul class="simple nested-toc-section">baseTypeKind
- <li><a class="reference" href="#baseTypeKind%2CAny" title="baseTypeKind(x: Any): AnyKind">baseTypeKind(x: Any): AnyKind</a></li>
- </ul>
- <ul class="simple nested-toc-section">baseTypeSize
- <li><a class="reference" href="#baseTypeSize%2CAny" title="baseTypeSize(x: Any): int">baseTypeSize(x: Any): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">extendSeq
- <li><a class="reference" href="#extendSeq%2CAny" title="extendSeq(x: Any)">extendSeq(x: Any)</a></li>
- </ul>
- <ul class="simple nested-toc-section">getBiggestFloat
- <li><a class="reference" href="#getBiggestFloat%2CAny" title="getBiggestFloat(x: Any): BiggestFloat">getBiggestFloat(x: Any): BiggestFloat</a></li>
- </ul>
- <ul class="simple nested-toc-section">getBiggestInt
- <li><a class="reference" href="#getBiggestInt%2CAny" title="getBiggestInt(x: Any): BiggestInt">getBiggestInt(x: Any): BiggestInt</a></li>
- </ul>
- <ul class="simple nested-toc-section">getBiggestUint
- <li><a class="reference" href="#getBiggestUint%2CAny" title="getBiggestUint(x: Any): uint64">getBiggestUint(x: Any): uint64</a></li>
- </ul>
- <ul class="simple nested-toc-section">getBool
- <li><a class="reference" href="#getBool%2CAny" title="getBool(x: Any): bool">getBool(x: Any): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">getChar
- <li><a class="reference" href="#getChar%2CAny" title="getChar(x: Any): char">getChar(x: Any): char</a></li>
- </ul>
- <ul class="simple nested-toc-section">getCString
- <li><a class="reference" href="#getCString%2CAny" title="getCString(x: Any): cstring">getCString(x: Any): cstring</a></li>
- </ul>
- <ul class="simple nested-toc-section">getEnumField
- <li><a class="reference" href="#getEnumField%2CAny" title="getEnumField(x: Any): string">getEnumField(x: Any): string</a></li>
- <li><a class="reference" href="#getEnumField%2CAny%2Cint" title="getEnumField(x: Any; ordinalValue: int): string">getEnumField(x: Any; ordinalValue: int): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">getEnumOrdinal
- <li><a class="reference" href="#getEnumOrdinal%2CAny%2Cstring" title="getEnumOrdinal(x: Any; name: string): int">getEnumOrdinal(x: Any; name: string): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">getFloat
- <li><a class="reference" href="#getFloat%2CAny" title="getFloat(x: Any): float">getFloat(x: Any): float</a></li>
- </ul>
- <ul class="simple nested-toc-section">getFloat32
- <li><a class="reference" href="#getFloat32%2CAny" title="getFloat32(x: Any): float32">getFloat32(x: Any): float32</a></li>
- </ul>
- <ul class="simple nested-toc-section">getFloat64
- <li><a class="reference" href="#getFloat64%2CAny" title="getFloat64(x: Any): float64">getFloat64(x: Any): float64</a></li>
- </ul>
- <ul class="simple nested-toc-section">getInt
- <li><a class="reference" href="#getInt%2CAny" title="getInt(x: Any): int">getInt(x: Any): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">getInt8
- <li><a class="reference" href="#getInt8%2CAny" title="getInt8(x: Any): int8">getInt8(x: Any): int8</a></li>
- </ul>
- <ul class="simple nested-toc-section">getInt16
- <li><a class="reference" href="#getInt16%2CAny" title="getInt16(x: Any): int16">getInt16(x: Any): int16</a></li>
- </ul>
- <ul class="simple nested-toc-section">getInt32
- <li><a class="reference" href="#getInt32%2CAny" title="getInt32(x: Any): int32">getInt32(x: Any): int32</a></li>
- </ul>
- <ul class="simple nested-toc-section">getInt64
- <li><a class="reference" href="#getInt64%2CAny" title="getInt64(x: Any): int64">getInt64(x: Any): int64</a></li>
- </ul>
- <ul class="simple nested-toc-section">getPointer
- <li><a class="reference" href="#getPointer%2CAny" title="getPointer(x: Any): pointer">getPointer(x: Any): pointer</a></li>
- </ul>
- <ul class="simple nested-toc-section">getString
- <li><a class="reference" href="#getString%2CAny" title="getString(x: Any): string">getString(x: Any): string</a></li>
- </ul>
- <ul class="simple nested-toc-section">getUInt
- <li><a class="reference" href="#getUInt%2CAny" title="getUInt(x: Any): uint">getUInt(x: Any): uint</a></li>
- </ul>
- <ul class="simple nested-toc-section">getUInt8
- <li><a class="reference" href="#getUInt8%2CAny" title="getUInt8(x: Any): uint8">getUInt8(x: Any): uint8</a></li>
- </ul>
- <ul class="simple nested-toc-section">getUInt16
- <li><a class="reference" href="#getUInt16%2CAny" title="getUInt16(x: Any): uint16">getUInt16(x: Any): uint16</a></li>
- </ul>
- <ul class="simple nested-toc-section">getUInt32
- <li><a class="reference" href="#getUInt32%2CAny" title="getUInt32(x: Any): uint32">getUInt32(x: Any): uint32</a></li>
- </ul>
- <ul class="simple nested-toc-section">getUInt64
- <li><a class="reference" href="#getUInt64%2CAny" title="getUInt64(x: Any): uint64">getUInt64(x: Any): uint64</a></li>
- </ul>
- <ul class="simple nested-toc-section">inclSetElement
- <li><a class="reference" href="#inclSetElement%2CAny%2Cint" title="inclSetElement(x: Any; elem: int)">inclSetElement(x: Any; elem: int)</a></li>
- </ul>
- <ul class="simple nested-toc-section">invokeNew
- <li><a class="reference" href="#invokeNew%2CAny" title="invokeNew(x: Any)">invokeNew(x: Any)</a></li>
- </ul>
- <ul class="simple nested-toc-section">invokeNewSeq
- <li><a class="reference" href="#invokeNewSeq%2CAny%2Cint" title="invokeNewSeq(x: Any; len: int)">invokeNewSeq(x: Any; len: int)</a></li>
- </ul>
- <ul class="simple nested-toc-section">isNil
- <li><a class="reference" href="#isNil%2CAny" title="isNil(x: Any): bool">isNil(x: Any): bool</a></li>
- </ul>
- <ul class="simple nested-toc-section">kind
- <li><a class="reference" href="#kind%2CAny" title="kind(x: Any): AnyKind">kind(x: Any): AnyKind</a></li>
- </ul>
- <ul class="simple nested-toc-section">len
- <li><a class="reference" href="#len%2CAny" title="len(x: Any): int">len(x: Any): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">setBiggestFloat
- <li><a class="reference" href="#setBiggestFloat%2CAny%2CBiggestFloat" title="setBiggestFloat(x: Any; y: BiggestFloat)">setBiggestFloat(x: Any; y: BiggestFloat)</a></li>
- </ul>
- <ul class="simple nested-toc-section">setBiggestInt
- <li><a class="reference" href="#setBiggestInt%2CAny%2CBiggestInt" title="setBiggestInt(x: Any; y: BiggestInt)">setBiggestInt(x: Any; y: BiggestInt)</a></li>
- </ul>
- <ul class="simple nested-toc-section">setBiggestUint
- <li><a class="reference" href="#setBiggestUint%2CAny%2Cuint64" title="setBiggestUint(x: Any; y: uint64)">setBiggestUint(x: Any; y: uint64)</a></li>
- </ul>
- <ul class="simple nested-toc-section">setObjectRuntimeType
- <li><a class="reference" href="#setObjectRuntimeType%2CAny" title="setObjectRuntimeType(x: Any)">setObjectRuntimeType(x: Any)</a></li>
- </ul>
- <ul class="simple nested-toc-section">setPointer
- <li><a class="reference" href="#setPointer%2CAny%2Cpointer" title="setPointer(x: Any; y: pointer)">setPointer(x: Any; y: pointer)</a></li>
- </ul>
- <ul class="simple nested-toc-section">setString
- <li><a class="reference" href="#setString%2CAny%2Cstring" title="setString(x: Any; y: string)">setString(x: Any; y: string)</a></li>
- </ul>
- <ul class="simple nested-toc-section">size
- <li><a class="reference" href="#size%2CAny" title="size(x: Any): int">size(x: Any): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">skipRange
- <li><a class="reference" href="#skipRange%2CAny" title="skipRange(x: Any): Any">skipRange(x: Any): Any</a></li>
- </ul>
- <ul class="simple nested-toc-section">toAny
- <li><a class="reference" href="#toAny%2CT" title="toAny[T](x: var T): Any">toAny[T](x: var T): Any</a></li>
- </ul>
- </ul>
- </details>
- </li>
- <li>
- <details open>
- <summary><a class="reference reference-toplevel" href="#15" id="65">Iterators</a></summary>
- <ul class="simple simple-toc-section">
- <ul class="simple nested-toc-section">elements
- <li><a class="reference" href="#elements.i%2CAny" title="elements(x: Any): int">elements(x: Any): int</a></li>
- </ul>
- <ul class="simple nested-toc-section">fields
- <li><a class="reference" href="#fields.i%2CAny" title="fields(x: Any): tuple[name: string, any: Any]">fields(x: Any): tuple[name: string, any: Any]</a></li>
- </ul>
- </ul>
- </details>
- </li>
- </ul>
- </div>
- <div class="nine columns" id="content">
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L1" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L1" class="link-seesrc" target="_blank" >Edit</a>
- <div id="tocRoot"></div>
-
- <p class="module-desc">This module implements an interface to Nim's <span id="runtime-type-information_1">runtime type information</span> (<span id="rtti_1">RTTI</span>). See the <a class="reference external" href="marshal.html">marshal</a> module for an example of what this allows you to do.<div class="admonition admonition-info"><span class="admonition-info-text"><b>Note:</b></span>
- Even though <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt> and its operations hide the nasty low level details from its users, it remains inherently unsafe! Also, Nim's runtime type information will evolve and may eventually be deprecated. As an alternative approach to programmatically understanding and manipulating types, consider using the <a class="reference external" href="macros.html">macros</a> module to work with the types' AST representation at compile time. See for example the <a class="reference external" href="macros.html#getTypeImpl,NimNode">getTypeImpl proc</a>. As an alternative approach to storing arbitrary types at runtime, consider using generics.</div>
- <p><strong class="examples_text">Example:</strong></p>
- <pre class="listing"><span class="Keyword">import</span> <span class="Identifier">std</span><span class="Operator">/</span><span class="Identifier">typeinfo</span>
- <span class="Keyword">var</span> <span class="Identifier">x</span><span class="Punctuation">:</span> <span class="Identifier">Any</span>
- <span class="Keyword">var</span> <span class="Identifier">i</span> <span class="Operator">=</span> <span class="DecNumber">42</span>
- <span class="Identifier">x</span> <span class="Operator">=</span> <span class="Identifier">i</span><span class="Operator">.</span><span class="Identifier">toAny</span>
- <span class="Identifier">assert</span> <span class="Identifier">x</span><span class="Operator">.</span><span class="Identifier">kind</span> <span class="Operator">==</span> <span class="Identifier">akInt</span>
- <span class="Identifier">assert</span> <span class="Identifier">x</span><span class="Operator">.</span><span class="Identifier">getInt</span> <span class="Operator">==</span> <span class="DecNumber">42</span>
- <span class="Keyword">var</span> <span class="Identifier">s</span> <span class="Operator">=</span> <span class="Operator">@</span><span class="Punctuation">[</span><span class="DecNumber">1</span><span class="Punctuation">,</span> <span class="DecNumber">2</span><span class="Punctuation">,</span> <span class="DecNumber">3</span><span class="Punctuation">]</span>
- <span class="Identifier">x</span> <span class="Operator">=</span> <span class="Identifier">s</span><span class="Operator">.</span><span class="Identifier">toAny</span>
- <span class="Identifier">assert</span> <span class="Identifier">x</span><span class="Operator">.</span><span class="Identifier">kind</span> <span class="Operator">==</span> <span class="Identifier">akSequence</span>
- <span class="Identifier">assert</span> <span class="Identifier">x</span><span class="Operator">.</span><span class="Identifier">len</span> <span class="Operator">==</span> <span class="DecNumber">3</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="assertions.html">assertions</a>, <a class="reference external" href="strimpl.html">strimpl</a>
- </dl>
- </div>
- <div class="section" id="7">
- <h1><a class="toc-backref" href="#7">Types</a></h1>
- <dl class="item">
- <div id="Any">
- <dt><pre><a href="typeinfo.html#Any"><span class="Identifier">Any</span></a> <span class="Other">=</span> <span class="Keyword">object</span>
- <span class="Keyword">when</span> <span class="Identifier">defined</span><span class="Other">(</span><span class="Identifier">js</span><span class="Other">)</span><span class="Other">:</span>
- <span class="Keyword">else</span><span class="Other">:</span></pre></dt>
- <dd>
-
- A type that can represent any nim value.<div class="admonition admonition-error"><span class="admonition-error-text"><b>Danger:</b></span>
- The wrapped value can be modified with its wrapper! This means that <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt> keeps a non-traced pointer to its wrapped value and <strong>must not</strong> live longer than its wrapped value.</div>
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L81" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L81" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="AnyKind">
- <dt><pre><a href="typeinfo.html#AnyKind"><span class="Identifier">AnyKind</span></a> <span class="Other">=</span> <span class="Keyword">enum</span>
- <span class="Identifier">akNone</span> <span class="Other">=</span> <span class="DecNumber">0</span><span class="Other">,</span> <span class="Comment">## invalid</span>
- <span class="Identifier">akBool</span> <span class="Other">=</span> <span class="DecNumber">1</span><span class="Other">,</span> <span class="Comment">## bool</span>
- <span class="Identifier">akChar</span> <span class="Other">=</span> <span class="DecNumber">2</span><span class="Other">,</span> <span class="Comment">## char</span>
- <span class="Identifier">akEnum</span> <span class="Other">=</span> <span class="DecNumber">14</span><span class="Other">,</span> <span class="Comment">## enum</span>
- <span class="Identifier">akArray</span> <span class="Other">=</span> <span class="DecNumber">16</span><span class="Other">,</span> <span class="Comment">## array</span>
- <span class="Identifier">akObject</span> <span class="Other">=</span> <span class="DecNumber">17</span><span class="Other">,</span> <span class="Comment">## object</span>
- <span class="Identifier">akTuple</span> <span class="Other">=</span> <span class="DecNumber">18</span><span class="Other">,</span> <span class="Comment">## tuple</span>
- <span class="Identifier">akSet</span> <span class="Other">=</span> <span class="DecNumber">19</span><span class="Other">,</span> <span class="Comment">## set</span>
- <span class="Identifier">akRange</span> <span class="Other">=</span> <span class="DecNumber">20</span><span class="Other">,</span> <span class="Comment">## range</span>
- <span class="Identifier">akPtr</span> <span class="Other">=</span> <span class="DecNumber">21</span><span class="Other">,</span> <span class="Comment">## ptr</span>
- <span class="Identifier">akRef</span> <span class="Other">=</span> <span class="DecNumber">22</span><span class="Other">,</span> <span class="Comment">## ref</span>
- <span class="Identifier">akSequence</span> <span class="Other">=</span> <span class="DecNumber">24</span><span class="Other">,</span> <span class="Comment">## sequence</span>
- <span class="Identifier">akProc</span> <span class="Other">=</span> <span class="DecNumber">25</span><span class="Other">,</span> <span class="Comment">## proc</span>
- <span class="Identifier">akPointer</span> <span class="Other">=</span> <span class="DecNumber">26</span><span class="Other">,</span> <span class="Comment">## pointer</span>
- <span class="Identifier">akString</span> <span class="Other">=</span> <span class="DecNumber">28</span><span class="Other">,</span> <span class="Comment">## string</span>
- <span class="Identifier">akCString</span> <span class="Other">=</span> <span class="DecNumber">29</span><span class="Other">,</span> <span class="Comment">## cstring</span>
- <span class="Identifier">akInt</span> <span class="Other">=</span> <span class="DecNumber">31</span><span class="Other">,</span> <span class="Comment">## int</span>
- <span class="Identifier">akInt8</span> <span class="Other">=</span> <span class="DecNumber">32</span><span class="Other">,</span> <span class="Comment">## int8</span>
- <span class="Identifier">akInt16</span> <span class="Other">=</span> <span class="DecNumber">33</span><span class="Other">,</span> <span class="Comment">## int16</span>
- <span class="Identifier">akInt32</span> <span class="Other">=</span> <span class="DecNumber">34</span><span class="Other">,</span> <span class="Comment">## int32</span>
- <span class="Identifier">akInt64</span> <span class="Other">=</span> <span class="DecNumber">35</span><span class="Other">,</span> <span class="Comment">## int64</span>
- <span class="Identifier">akFloat</span> <span class="Other">=</span> <span class="DecNumber">36</span><span class="Other">,</span> <span class="Comment">## float</span>
- <span class="Identifier">akFloat32</span> <span class="Other">=</span> <span class="DecNumber">37</span><span class="Other">,</span> <span class="Comment">## float32</span>
- <span class="Identifier">akFloat64</span> <span class="Other">=</span> <span class="DecNumber">38</span><span class="Other">,</span> <span class="Comment">## float64</span>
- <span class="Identifier">akFloat128</span> <span class="Other">=</span> <span class="DecNumber">39</span><span class="Other">,</span> <span class="Comment">## float128</span>
- <span class="Identifier">akUInt</span> <span class="Other">=</span> <span class="DecNumber">40</span><span class="Other">,</span> <span class="Comment">## uint</span>
- <span class="Identifier">akUInt8</span> <span class="Other">=</span> <span class="DecNumber">41</span><span class="Other">,</span> <span class="Comment">## uint8</span>
- <span class="Identifier">akUInt16</span> <span class="Other">=</span> <span class="DecNumber">42</span><span class="Other">,</span> <span class="Comment">## uin16</span>
- <span class="Identifier">akUInt32</span> <span class="Other">=</span> <span class="DecNumber">43</span><span class="Other">,</span> <span class="Comment">## uint32</span>
- <span class="Identifier">akUInt64</span> <span class="Other">=</span> <span class="DecNumber">44</span> <span class="Comment">## uint64</span></pre></dt>
- <dd>
-
- The kind of <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L48" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L48" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </dl>
- </div>
- <div class="section" id="12">
- <h1><a class="toc-backref" href="#12">Procs</a></h1>
- <dl class="item">
- <div id="[]-procs-all">
- <div id="[],Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CAny"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Dereference operator for <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a ptr or a ref.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L432" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L432" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="[],Any,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CAny%2Cstring"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">fieldName</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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="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="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>
- <dd>
-
- Gets a field of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an object or a tuple.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L416" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L416" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="[],Any,int">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%2CAny%2Cint"><span class="Identifier">`[]`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Accessor for an any <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> that represents an array or a sequence.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L246" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L246" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="[]=-procs-all">
- <div id="[]=,Any,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CAny%2CAny"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Dereference operator for <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a ptr or a ref.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L438" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L438" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="[]=,Any,string,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CAny%2Cstring%2CAny"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">fieldName</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">;</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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="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="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>
- <dd>
-
- Sets a field of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an object or a tuple.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L402" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L402" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="[]=,Any,int,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#%5B%5D%3D%2CAny%2Cint%2CAny"><span class="Identifier">`[]=`</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">i</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Accessor for an any <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> that represents an array or a sequence.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L272" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L272" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="assign-procs-all">
- <div id="assign,Any,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#assign%2CAny%2CAny"><span class="Identifier">assign</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">,</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Copies the value of <tt class="docutils literal"><span class="pre"><span class="Identifier">y</span></span></tt> to <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. The assignment operator for <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt> does NOT do this; it performs a shallow copy instead!
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L677" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L677" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="base-procs-all">
- <div id="base,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#base%2CAny"><span class="Identifier">base</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Returns the base type of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> (useful for inherited object types).
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L318" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L318" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="baseTypeKind-procs-all">
- <div id="baseTypeKind,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#baseTypeKind%2CAny"><span class="Identifier">baseTypeKind</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#AnyKind"><span class="Identifier">AnyKind</span></a> {.<span class="Identifier">inline</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>
- <dd>
-
- Gets the base type's kind. If <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> has no base type, <tt class="docutils literal"><span class="pre"><span class="Identifier">akNone</span></span></tt> is returned.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L178" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L178" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="baseTypeSize-procs-all">
- <div id="baseTypeSize,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#baseTypeSize%2CAny"><span class="Identifier">baseTypeSize</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> {.<span class="Identifier">inline</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>
- <dd>
-
- Returns the size of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>'s base type. If <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> has no base type, 0 is returned.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L185" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L185" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="extendSeq-procs-all">
- <div id="extendSeq,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#extendSeq%2CAny"><span class="Identifier">extendSeq</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Performs <tt class="docutils literal"><span class="pre"><span class="Identifier">setLen</span><span class="Punctuation">(</span><span class="Identifier">x</span><span class="Punctuation">,</span> <span class="Identifier">x</span><span class="Operator">.</span><span class="Identifier">len</span><span class="Operator">+</span><span class="DecNumber">1</span><span class="Punctuation">)</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">seq</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L213" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L213" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getBiggestFloat-procs-all">
- <div id="getBiggestFloat,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getBiggestFloat%2CAny"><span class="Identifier">getBiggestFloat</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#BiggestFloat"><span class="Identifier">BiggestFloat</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>
- <dd>
-
- Retrieves the float value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent some float. The value is extended to <tt class="docutils literal"><span class="pre"><span class="Identifier">BiggestFloat</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L640" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L640" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getBiggestInt-procs-all">
- <div id="getBiggestInt,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getBiggestInt%2CAny"><span class="Identifier">getBiggestInt</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#BiggestInt"><span class="Identifier">BiggestInt</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>
- <dd>
-
- Retrieves the integer value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent some integer, a bool, a char, an enum or a small enough bit set. The value might be sign-extended to <tt class="docutils literal"><span class="pre"><span class="Identifier">BiggestInt</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L469" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L469" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getBiggestUint-procs-all">
- <div id="getBiggestUint,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getBiggestUint%2CAny"><span class="Identifier">getBiggestUint</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint64"><span class="Identifier">uint64</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>
- <dd>
-
- Retrieves the unsigned integer value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an unsigned integer.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L545" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L545" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getBool-procs-all">
- <div id="getBool,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getBool%2CAny"><span class="Identifier">getBool</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">bool</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">bool</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L575" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L575" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getChar-procs-all">
- <div id="getChar,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getChar%2CAny"><span class="Identifier">getChar</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#char"><span class="Identifier">char</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">char</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">char</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L569" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L569" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getCString-procs-all">
- <div id="getCString,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getCString%2CAny"><span class="Identifier">getCString</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">cstring</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">cstring</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L672" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L672" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getEnumField-procs-all">
- <div id="getEnumField,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getEnumField%2CAny"><span class="Identifier">getEnumField</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</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>
- <dd>
-
- Gets the enum field name as a string. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an enum.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L621" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L621" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- <div id="getEnumField,Any,int">
- <dt><pre><span class="Keyword">proc</span> <a href="#getEnumField%2CAny%2Cint"><span class="Identifier">getEnumField</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">ordinalValue</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</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>
- <dd>
-
- Gets the enum field name as a string. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an enum but is only used to access the type information. The field name of <tt class="docutils literal"><span class="pre"><span class="Identifier">ordinalValue</span></span></tt> is returned.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L603" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L603" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getEnumOrdinal-procs-all">
- <div id="getEnumOrdinal,Any,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#getEnumOrdinal%2CAny%2Cstring"><span class="Identifier">getEnumOrdinal</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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>
- <dd>
-
- Gets the enum field ordinal from <tt class="docutils literal"><span class="pre"><span class="Identifier">name</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an enum but is only used to access the type information. In case of an error <tt class="docutils literal"><span class="pre"><span class="Identifier">low</span><span class="Punctuation">(</span><span class="Identifier">int</span><span class="Punctuation">)</span></span></tt> is returned.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L587" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L587" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getFloat-procs-all">
- <div id="getFloat,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getFloat%2CAny"><span class="Identifier">getFloat</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#float"><span class="Identifier">float</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">float</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">float</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L625" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L625" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getFloat32-procs-all">
- <div id="getFloat32,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getFloat32%2CAny"><span class="Identifier">getFloat32</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#float32"><span class="Identifier">float32</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">float32</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">float32</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L630" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L630" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getFloat64-procs-all">
- <div id="getFloat64,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getFloat64%2CAny"><span class="Identifier">getFloat64</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#float64"><span class="Identifier">float64</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">float64</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">float64</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L635" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L635" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getInt-procs-all">
- <div id="getInt,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getInt%2CAny"><span class="Identifier">getInt</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">int</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an <tt class="docutils literal"><span class="pre"><span class="Identifier">int</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L444" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L444" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getInt8-procs-all">
- <div id="getInt8,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getInt8%2CAny"><span class="Identifier">getInt8</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int8"><span class="Identifier">int8</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">int8</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an <tt class="docutils literal"><span class="pre"><span class="Identifier">int8</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L449" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L449" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getInt16-procs-all">
- <div id="getInt16,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getInt16%2CAny"><span class="Identifier">getInt16</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int16"><span class="Identifier">int16</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">int16</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an <tt class="docutils literal"><span class="pre"><span class="Identifier">int16</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L454" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L454" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getInt32-procs-all">
- <div id="getInt32,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getInt32%2CAny"><span class="Identifier">getInt32</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int32"><span class="Identifier">int32</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">int32</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an <tt class="docutils literal"><span class="pre"><span class="Identifier">int32</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L459" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L459" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getInt64-procs-all">
- <div id="getInt64,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getInt64%2CAny"><span class="Identifier">getInt64</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int64"><span class="Identifier">int64</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">int64</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an <tt class="docutils literal"><span class="pre"><span class="Identifier">int64</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L464" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L464" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getPointer-procs-all">
- <div id="getPointer,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getPointer%2CAny"><span class="Identifier">getPointer</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</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>
- <dd>
-
- Retrieves the pointer value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to be of kind <tt class="docutils literal"><span class="pre"><span class="Identifier">akString</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akCString</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akProc</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akRef</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akPtr</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akPointer</span></span></tt> or <tt class="docutils literal"><span class="pre"><span class="Identifier">akSequence</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L333" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L333" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getString-procs-all">
- <div id="getString,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getString%2CAny"><span class="Identifier">getString</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">string</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">string</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L658" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L658" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getUInt-procs-all">
- <div id="getUInt,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getUInt%2CAny"><span class="Identifier">getUInt</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint"><span class="Identifier">uint</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">uint</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">uint</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L520" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L520" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getUInt8-procs-all">
- <div id="getUInt8,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getUInt8%2CAny"><span class="Identifier">getUInt8</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint8"><span class="Identifier">uint8</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">uint8</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">uint8</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L525" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L525" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getUInt16-procs-all">
- <div id="getUInt16,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getUInt16%2CAny"><span class="Identifier">getUInt16</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint16"><span class="Identifier">uint16</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">uint16</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">uint16</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L530" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L530" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getUInt32-procs-all">
- <div id="getUInt32,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getUInt32%2CAny"><span class="Identifier">getUInt32</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint32"><span class="Identifier">uint32</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">uint32</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">uint32</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L535" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L535" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="getUInt64-procs-all">
- <div id="getUInt64,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#getUInt64%2CAny"><span class="Identifier">getUInt64</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#uint64"><span class="Identifier">uint64</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>
- <dd>
-
- Retrieves the <tt class="docutils literal"><span class="pre"><span class="Identifier">uint64</span></span></tt> value out of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">uint64</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L540" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L540" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="inclSetElement-procs-all">
- <div id="inclSetElement,Any,int">
- <dt><pre><span class="Keyword">proc</span> <a href="#inclSetElement%2CAny%2Cint"><span class="Identifier">inclSetElement</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">elem</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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>
- <dd>
-
- Includes an element <tt class="docutils literal"><span class="pre"><span class="Identifier">elem</span></span></tt> in <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a Nim bitset.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L705" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L705" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="invokeNew-procs-all">
- <div id="invokeNew,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#invokeNew%2CAny"><span class="Identifier">invokeNew</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Performs <tt class="docutils literal"><span class="pre"><span class="Identifier">new</span><span class="Punctuation">(</span><span class="Identifier">x</span><span class="Punctuation">)</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Keyword">ref</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L192" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L192" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="invokeNewSeq-procs-all">
- <div id="invokeNewSeq,Any,int">
- <dt><pre><span class="Keyword">proc</span> <a href="#invokeNewSeq%2CAny%2Cint"><span class="Identifier">invokeNewSeq</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">len</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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>
- <dd>
-
- Performs <tt class="docutils literal"><span class="pre"><span class="Identifier">newSeq</span><span class="Punctuation">(</span><span class="Identifier">x</span><span class="Punctuation">,</span> <span class="Identifier">len</span><span class="Punctuation">)</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">seq</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L201" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L201" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="isNil-procs-all">
- <div id="isNil,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#isNil%2CAny"><span class="Identifier">isNil</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#bool"><span class="Identifier">bool</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>
- <dd>
-
- <tt class="docutils literal"><span class="pre"><span class="Identifier">isNil</span></span></tt> for an <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> that represents a cstring, proc or some pointer type.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L323" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L323" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="kind-procs-all">
- <div id="kind,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#kind%2CAny"><span class="Identifier">kind</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#AnyKind"><span class="Identifier">AnyKind</span></a> {.<span class="Identifier">inline</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>
- <dd>
-
- Gets the type kind.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L170" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L170" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="len-procs-all">
- <div id="len,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#len%2CAny"><span class="Identifier">len</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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>
- <dd>
-
- <tt class="docutils literal"><span class="pre"><span class="Identifier">len</span></span></tt> for an any <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> that represents an array or a sequence.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L301" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L301" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="setBiggestFloat-procs-all">
- <div id="setBiggestFloat,Any,BiggestFloat">
- <dt><pre><span class="Keyword">proc</span> <a href="#setBiggestFloat%2CAny%2CBiggestFloat"><span class="Identifier">setBiggestFloat</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="ctypes.html#BiggestFloat"><span class="Identifier">BiggestFloat</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>
- <dd>
-
- Sets the float value of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent some float.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L649" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L649" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="setBiggestInt-procs-all">
- <div id="setBiggestInt,Any,BiggestInt">
- <dt><pre><span class="Keyword">proc</span> <a href="#setBiggestInt%2CAny%2CBiggestInt"><span class="Identifier">setBiggestInt</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="ctypes.html#BiggestInt"><span class="Identifier">BiggestInt</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>
- <dd>
-
- Sets the integer value of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent some integer, a bool, a char, an enum or a small enough bit set.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L495" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L495" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="setBiggestUint-procs-all">
- <div id="setBiggestUint,Any,uint64">
- <dt><pre><span class="Keyword">proc</span> <a href="#setBiggestUint%2CAny%2Cuint64"><span class="Identifier">setBiggestUint</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="system.html#uint64"><span class="Identifier">uint64</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>
- <dd>
-
- Sets the unsigned integer value of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an unsigned integer.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L557" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L557" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="setObjectRuntimeType-procs-all">
- <div id="setObjectRuntimeType,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#setObjectRuntimeType%2CAny"><span class="Identifier">setObjectRuntimeType</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- This needs to be called to set <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>'s runtime object type field.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L231" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L231" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="setPointer-procs-all">
- <div id="setPointer,Any,pointer">
- <dt><pre><span class="Keyword">proc</span> <a href="#setPointer%2CAny%2Cpointer"><span class="Identifier">setPointer</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</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>
- <dd>
-
- Sets the pointer value of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to be of kind <tt class="docutils literal"><span class="pre"><span class="Identifier">akString</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akCString</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akProc</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akRef</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akPtr</span></span></tt>, <tt class="docutils literal"><span class="pre"><span class="Identifier">akPointer</span></span></tt> or <tt class="docutils literal"><span class="pre"><span class="Identifier">akSequence</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L340" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L340" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="setString-procs-all">
- <div id="setString,Any,string">
- <dt><pre><span class="Keyword">proc</span> <a href="#setString%2CAny%2Cstring"><span class="Identifier">setString</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">;</span> <span class="Identifier">y</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</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>
- <dd>
-
- Sets the <tt class="docutils literal"><span class="pre"><span class="Identifier">string</span></span></tt> value of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">string</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L667" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L667" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="size-procs-all">
- <div id="size,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#size%2CAny"><span class="Identifier">size</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</span></a> {.<span class="Identifier">inline</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>
- <dd>
-
- Returns the size of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>'s type.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L174" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L174" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="skipRange-procs-all">
- <div id="skipRange,Any">
- <dt><pre><span class="Keyword">proc</span> <a href="#skipRange%2CAny"><span class="Identifier">skipRange</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Skips the range information of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L581" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L581" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="toAny-procs-all">
- <div id="toAny,T">
- <dt><pre><span class="Keyword">proc</span> <a href="#toAny%2CT"><span class="Identifier">toAny</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="Keyword">var</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a> {.<span class="Identifier">inline</span>.}</pre></dt>
- <dd>
-
- Constructs an <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt> object from <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. This captures <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>'s address, so <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> can be modified with its <tt class="docutils literal"><span class="pre"><span class="Identifier">Any</span></span></tt> wrapper! The caller needs to ensure that the wrapper <strong>does not</strong> live longer than <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>!
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L164" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L164" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- <div class="section" id="15">
- <h1><a class="toc-backref" href="#15">Iterators</a></h1>
- <dl class="item">
- <div id="elements-iterators-all">
- <div id="elements.i,Any">
- <dt><pre><span class="Keyword">iterator</span> <a href="#elements.i%2CAny"><span class="Identifier">elements</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#int"><span class="Identifier">int</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>
- <dd>
-
- Iterates over every element of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent a <tt class="docutils literal"><span class="pre"><span class="Identifier">set</span></span></tt>.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L683" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L683" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- <div id="fields-iterators-all">
- <div id="fields.i,Any">
- <dt><pre><span class="Keyword">iterator</span> <a href="#fields.i%2CAny"><span class="Identifier">fields</span></a><span class="Other">(</span><span class="Identifier">x</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Keyword">tuple</span><span class="Other">[</span><span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#string"><span class="Identifier">string</span></a><span class="Other">,</span> <span class="Identifier">any</span><span class="Other">:</span> <a href="typeinfo.html#Any"><span class="Identifier">Any</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>
- <dd>
-
- Iterates over every active field of <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt>. <tt class="docutils literal"><span class="pre"><span class="Identifier">x</span></span></tt> needs to represent an object or a tuple.
- <a href="https://github.com/nim-lang/Nim/tree/devel/lib/core/typeinfo.nim#L364" class="link-seesrc" target="_blank">Source</a>
- <a href="https://github.com/nim-lang/Nim/edit/devel/lib/core/typeinfo.nim#L364" class="link-seesrc" target="_blank" >Edit</a>
- </dd>
- </div>
- </div>
- </dl>
- </div>
- </div>
- </div>
- <div class="twelve-columns footer">
- <span class="nim-sprite"></span>
- <br>
- <small style="color: var(--hint);">Made with Nim. Generated: 2025-02-03 14:57:18 UTC</small>
- </div>
- </div>
- </div>
- <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
-
- </body>
- </html>
|