diff options
114 files changed, 13659 insertions, 10105 deletions
diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index a2a638a89..9a946b641 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -3,7 +3,7 @@ # Feel free to edit the templates as you need. split.item.toc = "20" -# too long entries in the table of contents get truncated +# too long entries in the table of contents wrap around # after this number of characters doc.section = """ @@ -136,6 +136,10 @@ pre, span.tok { background-color:#F9F9F9; border:1px dotted #2F6FAB; color:black; +} + +span.red { + color: #A80000; } /* diff --git a/config/nimrod.cfg b/config/nimrod.cfg index eb8ad707f..dd3b980c9 100644 --- a/config/nimrod.cfg +++ b/config/nimrod.cfg @@ -1,100 +1,95 @@ -# Configuration file for the Nimrod Compiler. -# (c) 2008 Andreas Rumpf - -# Feel free to edit the default values as you need. - -# You may set environment variables with -# @putenv "key" "val" -# Environment variables cannot be used in the options, however! - -cc = @if windows: llvm_gcc @else: gcc @end -lib="$nimrod/lib" -path="$lib/base" -path="$lib/base/gtk" -path="$lib/base/cairo" -path="$lib/base/x11" -path="$lib/base/sdl" -path="$lib/base/opengl" -path="$lib/base/zip" -path="$lib/windows" -path="$lib/posix" -path="$lib/ecmas" -path="$lib/extra" - -@if release: - obj_checks:off - field_checks:off - range_checks:off - bound_checks:off - overflow_checks:off - assertions:off - - stacktrace:off - debugger:off - line_dir:off - opt:speed -@end - -# additional options always passed to the compiler: ---verbosity: "1" - -hint[LineTooLong]=off -#hint[XDeclaredButNotUsed]=off - -@if unix: - @if not bsd: passl= "-ldl" @end -@end - -@if icc: - passl = "-cxxlib" - passc = "-cxxlib" -@end - -# Configuration for the LLVM GCC compiler: -@if windows: - llvm_gcc.path = r"$nimrod\dist\llvm-gcc4.2\bin" -@elif macosx: - llvm_gcc.path = - r"/Users/andreasrumpf/download/C/llvm-gcc4.2-2.3-x86-darwin8/bin" -@end -llvm_gcc.options.debug = "-g" -llvm_gcc.options.always = "-w" -llvm_gcc.options.speed = "-O2" -llvm_gcc.options.size = "-Os" - -# Configuration for the Visual C/C++ compiler: -@if vcc: - passl: r"/F33554432" # set the stack size to 8 MB -@end -vcc.options.debug = "/RTC1 /ZI" -vcc.options.always = "/nologo" -vcc.options.speed = "/Ox /arch:SSE2" -vcc.options.size = "/O1" - -# Configuration for the GNU C/C++ compiler: -@if windows: - gcc.path = r"C:\eigenes\compiler\mingw\bin" -@end -#gcc.exe = "gcc-4.1" -#gcc.linkerExe = "gcc-4.1" -gcc.options.debug = "-g" -@if macosx: - gcc.options.always = "-w -fasm-blocks" -@else: - gcc.options.always = "-w" -@end -gcc.options.speed = "-O3 -fno-strict-aliasing" -gcc.options.size = "-Os" - -# Configuration for the Digital Mars C/C++ compiler: -@if windows: - dmc.path = r"C:\eigenes\compiler\d\dm\bin" -@end - -# Configuration for the Tiny C Compiler: -@if windows: - tcc.path = r"C:\Eigenes\compiler\tcc-0.9.23\tcc" - tcc.options.always = r"-IC:\Eigenes\compiler\tcc-0.9.23\include " & - r"-IC:\Eigenes\compiler\tcc-0.9.23\include\winapi" -@end -tcc.options.always = "-w" +# Configuration file for the Nimrod Compiler. +# (c) 2008 Andreas Rumpf + +# Feel free to edit the default values as you need. + +# You may set environment variables with +# @putenv "key" "val" +# Environment variables cannot be used in the options, however! + +cc = @if windows: llvm_gcc @else: gcc @end +lib="$nimrod/lib" +path="$lib/base" +path="$lib/base/gtk" +path="$lib/base/cairo" +path="$lib/base/x11" +path="$lib/base/sdl" +path="$lib/base/opengl" +path="$lib/base/zip" +path="$lib/windows" +path="$lib/posix" +path="$lib/ecmas" +path="$lib/extra" + +@if release: + obj_checks:off + field_checks:off + range_checks:off + bound_checks:off + overflow_checks:off + assertions:off + + stacktrace:off + debugger:off + line_dir:off + opt:speed + dead_code_elim:on +@end + +# additional options always passed to the compiler: +--verbosity: "1" + +hint[LineTooLong]=off +#hint[XDeclaredButNotUsed]=off + +@if unix: + @if not bsd: passl= "-ldl" @end +@end + +@if icc: + passl = "-cxxlib" + passc = "-cxxlib" +@end + +# Configuration for the LLVM GCC compiler: +llvm_gcc.options.debug = "-g" +llvm_gcc.options.always = "-w" +llvm_gcc.options.speed = "-O2" +llvm_gcc.options.size = "-Os" + +# Configuration for the Visual C/C++ compiler: +@if vcc: + passl: r"/F33554432" # set the stack size to 8 MB +@end +vcc.options.debug = "/RTC1 /ZI" +vcc.options.always = "/nologo" +vcc.options.speed = "/Ox /arch:SSE2" +vcc.options.size = "/O1" + +# Configuration for the GNU C/C++ compiler: +@if windows: + gcc.path = r"C:\eigenes\compiler\mingw\bin" +@end +#gcc.exe = "gcc-4.1" +#gcc.linkerExe = "gcc-4.1" +gcc.options.debug = "-g" +@if macosx: + gcc.options.always = "-w -fasm-blocks" +@else: + gcc.options.always = "-w" +@end +gcc.options.speed = "-O3 -fno-strict-aliasing" +gcc.options.size = "-Os" + +# Configuration for the Digital Mars C/C++ compiler: +@if windows: + dmc.path = r"C:\eigenes\compiler\d\dm\bin" +@end + +# Configuration for the Tiny C Compiler: +@if windows: + tcc.path = r"C:\Eigenes\compiler\tcc-0.9.23\tcc" + tcc.options.always = r"-IC:\Eigenes\compiler\tcc-0.9.23\include " & + r"-IC:\Eigenes\compiler\tcc-0.9.23\include\winapi" +@end +tcc.options.always = "-w" diff --git a/copying.txt b/copying.txt index 65b743e4a..dc61ba805 100644 --- a/copying.txt +++ b/copying.txt @@ -1,18 +1,18 @@ -======================================================= - The Nimrod Compiler - Copyright (C) 2004-2008 Andreas Rumpf -======================================================= - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; version 2 -of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +======================================================= + The Nimrod Compiler + Copyright (C) 2004-2009 Andreas Rumpf +======================================================= + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; version 2 +of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. diff --git a/data/advopt.txt b/data/advopt.txt index 4d9dda7c2..ecf3b7b75 100644 --- a/data/advopt.txt +++ b/data/advopt.txt @@ -1,5 +1,5 @@ Advanced commands:: - pas convert a Pascal file to Nimrod standard syntax + pas convert a Pascal file to Nimrod syntax pretty pretty print the inputfile gen_depend generate a DOT file containing the module dependency graph diff --git a/data/ast.yml b/data/ast.yml index 6bbffae3f..b1d55327f 100644 --- a/data/ast.yml +++ b/data/ast.yml @@ -41,6 +41,7 @@ 'sfCompileTime', # proc can be evaluated at compile time 'sfThreadVar', # variable is a thread variable 'sfMerge', # proc can be merged with itself + 'sfDeadCodeElim', # dead code elimination for the module is turned on ], 'TypeFlag': [ @@ -116,7 +117,7 @@ # end of atoms 'nkDotCall', # used to temporarily flag a nkCall node; this is used # for transforming ``s.len`` to ``len(s)`` - 'nkCommand', # a call like ``p 2 4`` without parenthesis + 'nkCommand', # a call like ``p 2, 4`` without parenthesis 'nkCall', # a call like p(x, y) or an operation like +(a, b) 'nkGenericCall', # a call with given type parameters 'nkExplicitTypeListCall', # a call with given explicit typelist @@ -125,6 +126,7 @@ 'nkIdentDefs', # a definition like `a, b: typeDesc = expr` # either typeDesc or expr may be nil; used in # formal parameters, var statements, etc. + 'nkVarTuple', # a ``var (a, b) = expr`` construct 'nkInfix', # a call like (a + b) 'nkPrefix', # a call like !a 'nkPostfix', # something like a! (also used for visibility) @@ -166,6 +168,7 @@ # end of expressions 'nkAsgn', # a = b + 'nkFastAsgn', # internal node for a fast ``a = b`` (no string copy) 'nkDefaultTypeParam', # `ident = typeDesc` in generic parameters 'nkGenericParams', # generic parameters 'nkFormalParams', # formal parameters diff --git a/data/basicopt.txt b/data/basicopt.txt index 7ff8ef136..c10cba63b 100644 --- a/data/basicopt.txt +++ b/data/basicopt.txt @@ -24,6 +24,7 @@ Options: --bound_checks:on|off code generation for bound checks ON|OFF --overflow_checks:on|off code generation for over-/underflow checks ON|OFF -a, --assertions:on|off code generation for assertions ON|OFF + --dead_code_elim:on|off whole program dead code elimination ON|OFF --opt:none|speed|size optimize not at all or for speed|size --app:console|gui|lib generate a console|GUI application or a shared lib -r, --run run the compiled program with given arguments diff --git a/data/magic.yml b/data/magic.yml index 9c03028be..b569159e4 100644 --- a/data/magic.yml +++ b/data/magic.yml @@ -140,6 +140,7 @@ 'FloatToStr', 'CStrToStr', 'StrToStr', +'EnumToStr', # special ones: 'And', @@ -209,6 +210,8 @@ 'NimrodMinor', 'NimrodPatch', 'CpuEndian', +'HostOS', +'HostCPU', 'NaN', 'Inf', 'NegInf', diff --git a/data/messages.yml b/data/messages.yml index a90f9e4a8..c319aa693 100644 --- a/data/messages.yml +++ b/data/messages.yml @@ -142,7 +142,7 @@ 'selector must be of an ordinal type'}, {'errOrdXMustNotBeNegative': 'ord($1) must not be negative'}, {'errLenXinvalid': 'len($1) must be less than 32768'}, -{'errWrongNumberOfLoopVariables': 'wrong number of loop variables'}, +{'errWrongNumberOfVariables': 'wrong number of variables'}, {'errExprCannotBeRaised': 'only objects can be raised'}, {'errBreakOnlyInLoop': "'break' only allowed in loop construct"}, {'errTypeXhasUnknownSize': "type '$1' has unknown size"}, diff --git a/deinstall.sh b/deinstall.sh deleted file mode 100644 index 818b276dc..000000000 --- a/deinstall.sh +++ /dev/null @@ -1,38 +0,0 @@ -#! /bin/sh -# -# Nimrod deinstallation script -# (c) 2008 Andreas Rumpf -# - -if [ $# -eq 1 ] ; then - case $1 in - "/usr/bin") - rm -rf /usr/lib/nimrod - rm -rf /usr/share/nimrod/doc - rm -f /usr/bin/nimrod - rm -f /etc/nimrod.cfg - rm -f /etc/nimdoc.cfg || exit 1 - ;; - "/usr/local/bin") - rm -rf /usr/local/lib/nimrod - rm -rf /usr/local/share/nimrod/doc - rm -f /usr/local/bin/nimrod - rm -f /etc/nimrod.cfg - rm -f /etc/nimdoc.cfg || exit 1 - ;; - *) - rm -rf $1/nimrod || exit 1 - ;; - esac - echo "deinstallation successful" -else - echo "Nimrod deinstallation script" - echo "Usage: [sudo] sh deinstall.sh DIR" - echo "Where DIR may be:" - echo " /usr/bin" - echo " /usr/local/bin" - echo " /opt" - echo " <some other dir> (treated like '/opt')" - exit 1 -fi - diff --git a/doc/docs.txt b/doc/docs.txt index b2fe3ebed..431a79a29 100644 --- a/doc/docs.txt +++ b/doc/docs.txt @@ -3,25 +3,28 @@ The documentation consists of several documents: -- | `First steps after installation <steps.html>`_ - | Read this after installation for a quick introduction. +- | `Nimrod tutorial (part I) <tut1.html>`_ + | The Nimrod tutorial part one deals with the basics. + +- | `Nimrod tutorial (part II) <tut2.html>`_ + | The Nimrod tutorial part two deals with the advanced language constructs. - | `Nimrod manual <manual.html>`_ - | Read this to get to know the Nimrod programming system. + | The Nimrod manual is a draft that will evolve into a proper specification. - | `User guide for the Nimrod Compiler <nimrodc.html>`_ - | The user guide lists command line arguments, Nimrodc's special features, etc. + | The user guide lists command line arguments, special features of the + compiler, etc. - | `User guide for the Embedded Nimrod Debugger <endb.html>`_ - | This document describes how to use the Embedded debugger. The embedded - debugger currently has no GUI. Please help! + | This document describes how to use the Embedded Debugger. - | `Nimrod library documentation <lib.html>`_ | This document describes Nimrod's standard library. - | `Nimrod internal documentation <intern.html>`_ | The internal documentation describes how the compiler is implemented. Read - this if you want to hack the compiler or develop advanced macros. + this if you want to hack the compiler. - | `Index <theindex.html>`_ | The generated index. Often the quickest way to find the piece of diff --git a/doc/filelist.txt b/doc/filelist.txt index 5d9f1125e..fb2f67a37 100644 --- a/doc/filelist.txt +++ b/doc/filelist.txt @@ -1,41 +1,54 @@ -Short description of Nimrod's modules -------------------------------------- - -============== ========================================================== -Module Description -============== ========================================================== -lexbase buffer handling of the lexical analyser -scanner lexical analyser - -ast type definitions of the abstract syntax tree (AST) and - node constructors -astalgo algorithms for containers of AST nodes; converting the - AST to YAML; the symbol table -passes implement the passes managemer for passes over the AST -trees few algorithms for nodes; this module is less important -types module for traversing type graphs; also contain several - helpers for dealing with types - -sigmatch contains the matching algorithm that is used for proc - calls -semexprs contains the semantic checking phase for expressions -semstmts contains the semantic checking phase for statements -semtypes contains the semantic checking phase for types - -idents implements a general mapping from identifiers to an internal - representation (``PIdent``) that is used, so that a simple - id-comparison suffices to say whether two Nimrod identifiers - are equivalent - -ropes implements long strings using represented as trees for - lazy evaluation; used mainly by the code generators - -ccgobj contains type definitions neeeded for C code generation - and some helpers -ccgutils contains helpers for the C code generator -ccgtypes the generator for C types -ccgstmts the generator for statements -ccgexprs the generator for expressions -extccomp this module calls the C compiler and linker; interesting - if you want to add support for a new C compiler -============== ========================================================== +Short description of Nimrod's modules +------------------------------------- + +============== ========================================================== +Module Description +============== ========================================================== +nimrod main module: parses the command line and calls + ```main.MainCommand`` +main implements the top-level command dispatching +lexbase buffer handling of the lexical analyser +scanner lexical analyser +pnimsyn Nimrod's parser +rnimsyn Nimrod code renderer (AST back to its textual form) + +paslex lexer for Pascal +pasparse parser for Pascal; Pascal's advanced OO features are not + supported + +options contains global and local compiler options +ast type definitions of the abstract syntax tree (AST) and + node constructors +astalgo algorithms for containers of AST nodes; converting the + AST to YAML; the symbol table +passes implement the passes managemer for passes over the AST +trees few algorithms for nodes; this module is less important +types module for traversing type graphs; also contain several + helpers for dealing with types + +sigmatch contains the matching algorithm that is used for proc + calls +semexprs contains the semantic checking phase for expressions +semstmts contains the semantic checking phase for statements +semtypes contains the semantic checking phase for types +semfold contains code to deal with constant folding +evals contains an AST interpreter for compile time evaluation +pragmas semantic checking of pragmas + +idents implements a general mapping from identifiers to an internal + representation (``PIdent``) that is used, so that a simple + id-comparison suffices to say whether two Nimrod identifiers + are equivalent +ropes implements long strings represented as trees for + lazy evaluation; used mainly by the code generators + +transf transformations on the AST that need to be done before + code generation +cgen main file of the C code generator +ccgutils contains helpers for the C code generator +ccgtypes the generator for C types +ccgstmts the generator for statements +ccgexprs the generator for expressions +extccomp this module calls the C compiler and linker; interesting + if you want to add support for a new C compiler +============== ========================================================== diff --git a/doc/grammar.txt b/doc/grammar.txt index ee46cd63a..fa5a0d036 100644 --- a/doc/grammar.txt +++ b/doc/grammar.txt @@ -1,45 +1,43 @@ module ::= ([COMMENT] [SAD] stmt)* comma ::= ',' [COMMENT] [IND] -operator ::= OP0 | OR | XOR | AND | OP3 | OP4 | OP5 | IS | ISNOT | IN | NOTIN - | OP6 | DIV | MOD | SHL | SHR | OP7 | NOT +operator ::= OP0 | OR | XOR | AND | OP3 | OP4 | OP5 | OP6 | OP7 + | 'is' | 'isnot' | 'in' | 'notin' + | 'div' | 'mod' | 'shl' | 'shr' | 'not' -prefixOperator ::= OP0 | OP3 | OP4 | OP5 | OP6 | OP7 | NOT +prefixOperator ::= OP0 | OP3 | OP4 | OP5 | OP6 | OP7 | 'not' optInd ::= [COMMENT] [IND] -lowestExpr ::= orExpr ( OP0 optInd orExpr )* -orExpr ::= andExpr ( OR | XOR optInd andExpr )* -andExpr ::= cmpExpr ( AND optInd cmpExpr )* -cmpExpr ::= ampExpr ( OP3 | IS | ISNOT | IN | NOTIN optInd ampExpr )* -ampExpr ::= plusExpr ( OP4 optInd plusExpr )* -plusExpr ::= mulExpr ( OP5 optInd mulExpr )* -mulExpr ::= dollarExpr ( OP6 | DIV | MOD | SHL | SHR optInd dollarExpr )* -dollarExpr ::= primary ( OP7 optInd primary )* +lowestExpr ::= orExpr (OP0 optInd orExpr)* +orExpr ::= andExpr (OR | 'xor' optInd andExpr)* +andExpr ::= cmpExpr ('and' optInd cmpExpr)* +cmpExpr ::= ampExpr (OP3 | 'is' | 'isnot' | 'in' | 'notin' optInd ampExpr)* +ampExpr ::= plusExpr (OP4 optInd plusExpr)* +plusExpr ::= mulExpr (OP5 optInd mulExpr)* +mulExpr ::= dollarExpr (OP6 | 'div' | 'mod' | 'shl' | 'shr' optInd dollarExpr)* +dollarExpr ::= primary (OP7 optInd primary)* namedTypeOrExpr ::= - DOTDOT [expr] - | expr [EQUALS (expr [DOTDOT expr] | typeDescK | DOTDOT [expr] ) - | DOTDOT [expr]] + '..' [expr] + | expr ['=' (expr ['..' expr] | typeDescK | '..' [expr]) | '..' [expr]] | typeDescK -castExpr ::= CAST BRACKET_LE optInd typeDesc BRACKERT_RI - PAR_LE optInd expr PAR_RI -addrExpr ::= ADDR PAR_LE optInd expr PAR_RI -symbol ::= ACC (KEYWORD | IDENT | operator | PAR_LE PAR_RI - | BRACKET_LE BRACKET_RI | EQUALS | literal )+ ACC +castExpr ::= 'cast' '[' optInd typeDesc [SAD] ']' '(' optInd expr [SAD] ')' +addrExpr ::= 'addr' '(' optInd expr ')' +symbol ::= '`' (KEYWORD | IDENT | operator | '(' ')' + | '[' ']' | '=' | literal)+ '`' | IDENT -primary ::= ( prefixOperator optInd )* ( symbol | constructor | - | castExpr | addrExpr ) ( - DOT optInd symbol - #| CURLY_LE namedTypeDescList CURLY_RI - | PAR_LE optInd namedExprList PAR_RI - | BRACKET_LE optInd - [ namedTypeOrExpr (comma namedTypeOrExpr)* [comma] ] - BRACKET_RI - | CIRCUM - | pragma )* +primary ::= (prefixOperator optInd)* (symbol | constructor | + | castExpr | addrExpr) ( + '.' optInd symbol + | '(' optInd namedExprList [SAD] ')' + | '[' optInd + [namedTypeOrExpr (comma namedTypeOrExpr)* [comma]] + [SAD] ']' + | '^' + | pragma)* literal ::= INT_LIT | INT8_LIT | INT16_LIT | INT32_LIT | INT64_LIT | FLOAT_LIT | FLOAT32_LIT | FLOAT64_LIT @@ -48,48 +46,42 @@ literal ::= INT_LIT | INT8_LIT | INT16_LIT | INT32_LIT | INT64_LIT | NIL constructor ::= literal - | BRACKET_LE optInd colonExprList BRACKET_RI # []-Constructor - | CURLY_LE optInd sliceExprList CURLY_RI # {}-Constructor - | PAR_LE optInd colonExprList PAR_RI # ()-Constructor + | '[' optInd colonExprList [SAD] ']' + | '{' optInd sliceExprList [SAD] '}' + | '(' optInd colonExprList [SAD] ')' -exprList ::= [ expr (comma expr)* [comma] ] +colonExpr ::= expr [':' expr] +colonExprList ::= [colonExpr (comma colonExpr)* [comma]] -colonExpr ::= expr [COLON expr] -colonExprList ::= [ colonExpr (comma colonExpr)* [comma] ] +namedExpr ::= expr ['=' expr] +namedExprList ::= [namedExpr (comma namedExpr)* [comma]] -namedExpr ::= expr [EQUALS expr] # actually this is symbol EQUALS expr|expr -namedExprList ::= [ namedExpr (comma namedExpr)* [comma] ] +sliceExpr ::= expr ['..' expr] +sliceExprList ::= [sliceExpr (comma sliceExpr)* [comma]] -sliceExpr ::= expr [ DOTDOT expr ] -sliceExprList ::= [ sliceExpr (comma sliceExpr)* [comma] ] - -anonymousProc ::= LAMBDA paramList [pragma] EQUALS stmt +anonymousProc ::= 'lambda' paramList [pragma] '=' stmt expr ::= lowestExpr | anonymousProc - | IF expr COLON expr - (ELIF expr COLON expr)* - ELSE COLON expr + | 'if' expr ':' expr ('elif' expr ':' expr)* 'else' ':' expr -namedTypeDesc ::= typeDescK | expr [EQUALS (typeDescK | expr)] -namedTypeDescList ::= [ namedTypeDesc (comma namedTypeDesc)* [comma] ] +namedTypeDesc ::= typeDescK | expr ['=' (typeDescK | expr)] +namedTypeDescList ::= [namedTypeDesc (comma namedTypeDesc)* [comma]] -qualifiedIdent ::= symbol [ DOT symbol ] +qualifiedIdent ::= symbol ['.' symbol] -typeDescK ::= VAR typeDesc - | REF typeDesc - | PTR typeDesc - | TYPE expr - | TUPLE tupleDesc - | PROC paramList [pragma] +typeDescK ::= 'var' typeDesc + | 'ref' typeDesc + | 'ptr' typeDesc + | 'type' expr + | 'tuple' tupleDesc + | 'proc' paramList [pragma] typeDesc ::= typeDescK | primary -optSemicolon ::= [SEMICOLON] - -macroStmt ::= COLON [stmt] (OF [sliceExprList] COLON stmt - | ELIF expr COLON stmt - | EXCEPT exceptList COLON stmt )* - [ELSE COLON stmt] +macroStmt ::= ':' [stmt] ('of' [sliceExprList] ':' stmt + |'elif' expr ':' stmt + |'except' exceptList ':' stmt )* + ['else' ':' stmt] simpleStmt ::= returnStmt | yieldStmt @@ -107,88 +99,91 @@ complexStmt ::= ifStmt | whileStmt | caseStmt | tryStmt | forStmt | procDecl | iteratorDecl | macroDecl | templateDecl | constSection | typeSection | whenStmt | varSection -indPush ::= IND # push +indPush ::= IND # and push indentation onto the stack +indPop ::= # pop indentation from the stack + stmt ::= simpleStmt [SAD] | indPush (complexStmt | simpleStmt) - ([SAD] (complexStmt | simpleStmt) )* - DED - -exprStmt ::= lowestExpr [EQUALS expr | [expr (comma expr)* [comma]] [macroStmt]] -returnStmt ::= RETURN [expr] -yieldStmt ::= YIELD expr -discardStmt ::= DISCARD expr -raiseStmt ::= RAISE [expr] -breakStmt ::= BREAK [symbol] -continueStmt ::= CONTINUE -ifStmt ::= IF expr COLON stmt (ELIF expr COLON stmt)* [ELSE COLON stmt] -whenStmt ::= WHEN expr COLON stmt (ELIF expr COLON stmt)* [ELSE COLON stmt] -caseStmt ::= CASE expr (OF sliceExprList COLON stmt)* - (ELIF expr COLON stmt)* - [ELSE COLON stmt] -whileStmt ::= WHILE expr COLON stmt -forStmt ::= FOR symbol (comma symbol)* [comma] IN expr [DOTDOT expr] COLON stmt -exceptList ::= [qualifiedIdent (comma qualifiedIdent)* [comma]] - -tryStmt ::= TRY COLON stmt - (EXCEPT exceptList COLON stmt)* - [FINALLY COLON stmt] -asmStmt ::= ASM [pragma] (STR_LIT | RSTR_LIT | TRIPLESTR_LIT) -blockStmt ::= BLOCK [symbol] COLON stmt + ([SAD] (complexStmt | simpleStmt))* + DED indPop + +exprStmt ::= lowestExpr ['=' expr | [expr (comma expr)*] [macroStmt]] +returnStmt ::= 'return' [expr] +yieldStmt ::= 'yield' expr +discardStmt ::= 'discard' expr +raiseStmt ::= 'raise' [expr] +breakStmt ::= 'break' [symbol] +continueStmt ::= 'continue' +ifStmt ::= 'if' expr ':' stmt ('elif' expr ':' stmt)* ['else' ':' stmt] +whenStmt ::= 'when' expr ':' stmt ('elif' expr ':' stmt)* ['else' ':' stmt] +caseStmt ::= 'case' expr [':'] ('of' sliceExprList ':' stmt)* + ('elif' expr ':' stmt)* + ['else' ':' stmt] +whileStmt ::= 'while' expr ':' stmt +forStmt ::= 'for' symbol (comma symbol)* 'in' expr ['..' expr] ':' stmt +exceptList ::= [qualifiedIdent (comma qualifiedIdent)*] + +tryStmt ::= 'try' ':' stmt + ('except' exceptList ':' stmt)* + ['finally' ':' stmt] +asmStmt ::= 'asm' [pragma] (STR_LIT | RSTR_LIT | TRIPLESTR_LIT) +blockStmt ::= 'block' [symbol] ':' stmt filename ::= symbol | STR_LIT | RSTR_LIT | TRIPLESTR_LIT -importStmt ::= IMPORT filename (comma filename)* [comma] -includeStmt ::= INCLUDE filename (comma filename)* [comma] -fromStmt ::= FROM filename IMPORT symbol (comma symbol)* [comma] +importStmt ::= 'import' filename (comma filename)* +includeStmt ::= 'include' filename (comma filename)* +fromStmt ::= 'from' filename 'import' symbol (comma symbol)* -pragma ::= CURLYDOT_LE colonExprList (CURLYDOT_RI | CURLY_RI) +pragma ::= '{.' optInd (colonExpr [comma])* [SAD] ('.}' | '}') -param ::= symbol (comma symbol)* [comma] COLON typeDesc -paramList ::= [PAR_LE [param (comma param)* [comma]] PAR_RI] [COLON typeDesc] +param ::= symbol (comma symbol)* ':' typeDesc +paramList ::= ['(' [param (comma param)*] [SAD] ')'] [':' typeDesc] -genericParams ::= BRACKET_LE (symbol [EQUALS typeDesc] )* BRACKET_RI +genericParam ::= symbol [':' typeDesc] +genericParams ::= '[' genericParam (comma genericParam)* [SAD] ']' -procDecl ::= PROC symbol ["*"] [genericParams] - paramList [pragma] - [EQUALS stmt] -macroDecl ::= MACRO symbol ["*"] [genericParams] paramList [pragma] - [EQUALS stmt] -iteratorDecl ::= ITERATOR symbol ["*"] [genericParams] paramList [pragma] - [EQUALS stmt] -templateDecl ::= TEMPLATE symbol ["*"] [genericParams] paramList [pragma] - [EQUALS stmt] +procDecl ::= 'proc' symbol ['*'] [genericParams] paramList [pragma] + ['=' stmt] +macroDecl ::= 'macro' symbol ['*'] [genericParams] paramList [pragma] + ['=' stmt] +iteratorDecl ::= 'iterator' symbol ['*'] [genericParams] paramList [pragma] + ['=' stmt] +templateDecl ::= 'template' symbol ['*'] [genericParams] paramList [pragma] + ['=' stmt] -colonAndEquals ::= [COLON typeDesc] EQUALS expr +colonAndEquals ::= [':' typeDesc] '=' expr -constDecl ::= symbol ["*"] [pragma] colonAndEquals [COMMENT | IND COMMENT] +constDecl ::= symbol ['*'] [pragma] colonAndEquals [COMMENT | IND COMMENT] | COMMENT -constSection ::= CONST indPush constDecl (SAD constDecl)* DED +constSection ::= 'const' indPush constDecl (SAD constDecl)* DED indPop typeDef ::= typeDesc | objectDef | enumDef -objectField ::= symbol ["*"] [pragma] +objectField ::= symbol ['*'] [pragma] objectIdentPart ::= - objectField (comma objectField)* [comma] COLON typeDesc [COMMENT|IND COMMENT] + objectField (comma objectField)* ':' typeDesc [COMMENT|IND COMMENT] -objectWhen ::= WHEN expr COLON [COMMENT] objectPart - (ELIF expr COLON [COMMENT] objectPart)* - [ELSE COLON [COMMENT] objectPart] -objectCase ::= CASE expr COLON typeDesc [COMMENT] - (OF sliceExprList COLON [COMMENT] objectPart)* - [ELSE COLON [COMMENT] objectPart] +objectWhen ::= 'when' expr ':' [COMMENT] objectPart + ('elif' expr ':' [COMMENT] objectPart)* + ['else' ':' [COMMENT] objectPart] +objectCase ::= 'case' expr ':' typeDesc [COMMENT] + ('of' sliceExprList ':' [COMMENT] objectPart)* + ['else' ':' [COMMENT] objectPart] -objectPart ::= objectWhen | objectCase | objectIdentPart | NIL - | indPush objectPart (SAD objectPart)* DED -tupleDesc ::= BRACKET_LE optInd [param (comma param)* [comma]] BRACKET_RI +objectPart ::= objectWhen | objectCase | objectIdentPart | 'nil' + | indPush objectPart (SAD objectPart)* DED indPop +tupleDesc ::= '[' optInd [param (comma param)*] [SAD] ']' -objectDef ::= OBJECT [pragma] [OF typeDesc] objectPart -enumField ::= symbol [EQUALS expr] -enumDef ::= ENUM [OF typeDesc] (enumField [comma | COMMENT | IND COMMENT])+ +objectDef ::= 'object' [pragma] ['of' typeDesc] objectPart +enumField ::= symbol ['=' expr] +enumDef ::= 'enum' ['of' typeDesc] (enumField [comma] [COMMENT | IND COMMENT])+ typeDecl ::= COMMENT - | symbol ["*"] [genericParams] [EQUALS typeDef] [COMMENT | IND COMMENT] + | symbol ['*'] [genericParams] ['=' typeDef] [COMMENT | IND COMMENT] -typeSection ::= TYPE indPush typeDecl (SAD typeDecl)* DED +typeSection ::= 'type' indPush typeDecl (SAD typeDecl)* DED indPop -colonOrEquals ::= COLON typeDesc [EQUALS expr] | EQUALS expr -varField ::= symbol ["*"] [pragma] -varPart ::= symbol (comma symbol)* [comma] colonOrEquals [COMMENT | IND COMMENT] -varSection ::= VAR (varPart - | indPush (COMMENT|varPart) (SAD (COMMENT|varPart))* DED) +colonOrEquals ::= ':' typeDesc ['=' expr] | '=' expr +varField ::= symbol ['*'] [pragma] +varPart ::= symbol (comma symbol)* colonOrEquals [COMMENT | IND COMMENT] +varSection ::= 'var' (varPart + | indPush (COMMENT|varPart) + (SAD (COMMENT|varPart))* DED indPop) diff --git a/doc/intern.txt b/doc/intern.txt index 4d65c1e55..6496e0e29 100644 --- a/doc/intern.txt +++ b/doc/intern.txt @@ -34,7 +34,6 @@ Path Purpose on it! ``web`` website of Nimrod; generated by ``koch.py`` from the ``*.txt`` and ``*.tmpl`` files -``koch`` the Koch Build System (written for Nimrod) ``obj`` generated ``*.obj`` files go into here ============ ============================================== @@ -45,44 +44,76 @@ Bootstrapping the compiler The compiler is written in a subset of Pascal with special annotations so that it can be translated to Nimrod code automatically. This conversion is done by Nimrod itself via the undocumented ``boot`` command. Thus both Nimrod -and Free Pascal can compile the Nimrod compiler. +and Free Pascal can compile the Nimrod compiler. However, the Pascal version +has no garbage collector and leaks memory like crazy! So the Pascal version +should only be used for bootstrapping. Requirements for bootstrapping: -- Free Pascal (I used version 2.2) [optional] -- Python (should work with version 1.5 or higher) +- Python (should work with version 1.5 or higher) (optional) +- supported C compiler -- C compiler -- one of: +Compiling the compiler is a simple matter of running:: - * win32-lcc (currently broken) - * Borland C++ (tested with 5.5; currently broken) - * Microsoft C++ - * Digital Mars C++ - * Watcom C++ (currently broken) - * GCC - * Intel C++ - * Pelles C (currently broken) - * llvm-gcc + koch.py boot -| Compiling the compiler is a simple matter of running: -| ``koch.py boot`` -| Or you can compile by hand, this is not difficult. +For a release version use:: -If you want to debug the compiler, use the command:: + koch.py boot -d:release - koch.py boot --debugger:on +The ``koch.py`` script is Nimrod's maintainance script. It is a replacement for +make and shell scripting with the advantage that it is much more portable. -The ``koch.py`` script is Nimrod's maintainance script: Everything that has -been automated is accessible with it. It is a replacement for make and shell -scripting with the advantage that it is more portable. +If you don't have Python, there is a ``boot`` Nimrod program which does roughly +the same:: + nimrod cc boot.nim + ./boot [-d:release] -Coding standards -================ -The compiler is written in a subset of Pascal with special annotations so -that it can be translated to Nimrod code automatically. As a general rule, -Pascal code that does not translate to Nimrod automatically is forbidden. +Pascal annotations +================== +There are some annotations that the Pascal sources use so that they can +be converted to Nimrod automatically: + +``{@discard} <expr>`` + Tells the compiler that a ``discard`` statement is needed for Nimrod + here. + +``{@cast}typ(expr)`` + Tells the compiler that the Pascal conversion is a ``cast`` in Nimrod. + +``{@emit <code>}`` + Emits ``<code>``. The code fragment needs to be in Pascal syntax. + +``{@ignore} <codeA> {@emit <codeB>}`` + Ignores ``<codeA>`` and instead emits ``<codeB>`` which needs to be in + Pascal syntax. An empty ``{@emit}`` is possible too (it then only closes + the ``<codeA>`` part). + +``record {@tuple}`` + Is used to tell the compiler that the record type should be transformed + to a Nimrod tuple type. + +``^ {@ptr}`` + Is used to tell the compiler that the pointer type should be transformed + to a Nimrod ``ptr`` type. The default is a ``ref`` type. + +``'a' + ''`` + The idiom ``+''`` is used to tell the compiler that it is a string + literal and not a character literal. (Pascal does not distinguish between + character literals and string literals of length 1.) + +``+{&}`` + This tells the compiler that Pascal's ``+`` here is a string concatenation + and thus should be converted to ``&``. Note that this is not needed if + any of the operands is a string literal because the compiler then can + figure this out by itself. + +``{@set}['a', 'b', 'c']`` + Tells the compiler that Pascal's ``[]`` constructor is a set and not an + array. This is only needed if the compiler cannot figure this out for + itself. Porting to new platforms @@ -99,7 +130,7 @@ check that the OS, System modules work and recompile Nimrod. The only case where things aren't as easy is when the garbage collector needs some assembler tweaking to work. The standard version of the GC uses C's ``setjmp`` function to store all registers -on the hardware stack. It may be that the new platform needs to +on the hardware stack. It may be necessary that the new platform needs to replace this generic code by some assembler code. @@ -132,11 +163,11 @@ The Garbage Collector Introduction ------------ -We use the term *cell* here to refer to everything that is traced +I use the term *cell* here to refer to everything that is traced (sequences, refs, strings). This section describes how the new GC works. -The basic algorithm is *Deferrent reference counting* with cycle detection. +The basic algorithm is *Deferrent Reference Counting* with cycle detection. References in the stack are not counted for better performance and easier C code generation. @@ -170,7 +201,7 @@ modifying a ``TCellSet`` during traversation leads to undefined behaviour. iterator elements(s: TCellSet): (elem: PCell) -All the operations have to be perform efficiently. Because a Cellset can +All the operations have to perform efficiently. Because a Cellset can become huge a hash table alone is not suitable for this. We use a mixture of bitset and hash table for this. The hash table maps *pages* @@ -246,16 +277,10 @@ This syntax tree is the interface between the parser and the code generator. It is essential to understand most of the compiler's code. In order to compile Nimrod correctly, type-checking has to be seperated from -parsing. Otherwise generics would not work. Code generation is done for a -whole module only after it has been checked for semantics. +parsing. Otherwise generics would not work. .. include:: filelist.txt -The first command line argument selects the backend. Thus the backend is -responsible for calling the parser and semantic checker. However, when -compiling ``import`` or ``include`` statements, the semantic checker needs to -call the backend, this is done by embedding a PBackend into a TContext. - The syntax tree --------------- @@ -265,7 +290,7 @@ may contain cycles. The AST changes its shape after semantic checking. This is needed to make life easier for the code generators. See the "ast" module for the type definitions. -We use the notation ``nodeKind(fields, [sons])`` for describing +I use the notation ``nodeKind(fields, [sons])`` for describing nodes. ``nodeKind[sons]`` is a short-cut for ``nodeKind([sons])``. XXX: Description of the language's syntax and the corresponding trees. @@ -273,12 +298,16 @@ XXX: Description of the language's syntax and the corresponding trees. How the RTL is compiled ======================= -The system module contains the part of the RTL which needs support by +The ``system`` module contains the part of the RTL which needs support by compiler magic (and the stuff that needs to be in it because the spec says so). The C code generator generates the C code for it just like any other module. However, calls to some procedures like ``addInt`` are inserted by -the CCG. Therefore the module ``magicsys`` contains a table -(``compilerprocs``) with all symbols that are marked as ``compilerproc``. +the CCG. Therefore the module ``magicsys`` contains a table (``compilerprocs``) +with all symbols that are marked as ``compilerproc``. ``compilerprocs`` are +needed by the code generator. A ``magic`` proc is not the same as a +``compilerproc``: A ``magic`` is a proc that needs compiler magic for its +semantic checking, a ``compilerproc`` is a proc that is used by the code +generator. @@ -290,77 +319,3 @@ underlying C compiler already does all the hard work for us. The problem is the common runtime library, especially the memory manager. Note that Borland's Delphi had exactly the same problem. The workaround is to not link the GC with the Dll and provide an extra runtime dll that needs to be initialized. - - - -How to implement closures -========================= - -A closure is a record of a proc pointer and a context ref. The context ref -points to a garbage collected record that contains the needed variables. -An example: - -.. code-block:: Nimrod - - type - TListRec = record - data: string - next: ref TListRec - - proc forEach(head: ref TListRec, visitor: proc (s: string) {.closure.}) = - var it = head - while it != nil: - visit(it.data) - it = it.next - - proc sayHello() = - var L = new List(["hallo", "Andreas"]) - var temp = "jup\xff" - forEach(L, lambda(s: string) = - io.write(temp) - io.write(s) - ) - - -This should become the following in C: - -.. code-block:: C - typedef struct ... /* List type */ - - typedef struct closure { - void (*PrcPart)(string, void*); - void* ClPart; - } - - typedef struct Tcl_data { - string temp; // all accessed variables are put in here! - } - - void forEach(TListRec* head, const closure visitor) { - TListRec* it = head; - while (it != NIM_NULL) { - visitor.prc(it->data, visitor->cl_data); - it = it->next; - } - } - - void printStr(string s, void* cl_data) { - Tcl_data* x = (Tcl_data*) cl_data; - io_write(x->temp); - io_write(s); - } - - void sayhello() { - Tcl_data* data = new(...); - asgnRef(&data->temp, "jup\xff"); - ... - - closure cl; - cl.prc = printStr; - cl.cl_data = data; - foreach(L, cl); - } - - -What about nested closure? - There's not much difference: Just put all used -variables in the data record. diff --git a/doc/manual.txt b/doc/manual.txt index cd982302f..04b8bb97b 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -11,6 +11,10 @@ Nimrod Manual About this document =================== +**Note**: This document is a draft! Several of Nimrod's features need more +precise wording. This manual will evolve into a proper specification some +day. + This document describes the lexis, the syntax, and the semantics of Nimrod. The language constructs are explained using an extended BNF, in @@ -18,10 +22,11 @@ which ``(a)*`` means 0 or more ``a``'s, ``a+`` means 1 or more ``a``'s, and ``(a)?`` means an optional *a*; an alternative spelling for optional parts is ``[a]``. The ``|`` symbol is used to mark alternatives and has the lowest precedence. Parentheses may be used to group elements. -Non-terminals are in lowercase, terminal symbols (including keywords) are in -UPPERCASE. An example:: +Non-terminals start with a lowercase letter, abstract terminal symbols are in +UPPERCASE. Verbatim terminal symbols (including keywords) are quoted +with ``'``. An example:: - if_stmt ::= IF expr COLON stmts (ELIF expr COLON stmts)* [ELSE stmts] + ifStmt ::= 'if' expr ':' stmts ('elif' expr ':' stmts)* ['else' stmts] Other parts of Nimrod - like scoping rules or runtime semantics are only described in an informal manner. The reason is that formal semantics are @@ -90,8 +95,7 @@ Indentation consists only of spaces; tabulators are not allowed. The terminals ``IND`` (indentation), ``DED`` (dedentation) and ``SAD`` (same indentation) are generated by the scanner, denoting an indentation. -These terminals are only generated for lines that are not empty or contain -only whitespace and comments. +These terminals are only generated for lines that are not empty. The parser and the scanner communicate over a stack which indentation terminal should be generated: The stack consists of integers counting the spaces. The @@ -100,14 +104,17 @@ If the current indentation token consists of more spaces than the entry at the top of the stack, a ``IND`` token is generated, else if it consists of the same number of spaces, a ``SAD`` token is generated. If it consists of fewer spaces, a ``DED`` token is generated for any item on the stack that is greater than the -current. These items are then popped from the stack by the scanner. At the end +current. These items are later popped from the stack by the parser. At the end of the file, a ``DED`` token is generated for each number remaining on the stack that is larger than zero. Because the grammar contains some optional ``IND`` tokens, the scanner cannot push new indentation levels. This has to be done by the parser. The symbol ``indPush`` indicates that an ``IND`` token is expected; the current number of -leading spaces is pushed onto the stack by the parser. +leading spaces is pushed onto the stack by the parser. The symbol ``indPop`` +denotes that the parser pops an item from the indentation stack. No token is +consumed by ``indPop``. + Comments -------- @@ -131,8 +138,8 @@ aligned to the preceding one, it does not start a new comment: Comments are tokens; they are only allowed at certain places in the input file as they belong to the syntax tree! This feature enables perfect source-to-source transformations (such as pretty-printing) and superior documentation generators. -A side-effect is that the human reader of the code always knows exactly which -code snippet the comment refers to. +A nice side-effect is that the human reader of the code always knows exactly +which code snippet the comment refers to. Identifiers & Keywords @@ -159,9 +166,9 @@ case-sensitive and even underscores are ignored: **type** is a reserved word, and so is **TYPE** or **T_Y_P_E**. The idea behind this is that this allows programmers to use their own prefered spelling style and libraries written by different programmers cannot use incompatible -conventions. The editors or IDE can show the identifiers as preferred. Another -advantage is that it frees the programmer from remembering the exact spelling -of an identifier. +conventions. A Nimrod-aware editor or IDE can show the identifiers as +preferred. Another advantage is that it frees the programmer from remembering +the exact spelling of an identifier. Literal strings @@ -174,7 +181,7 @@ contain the following `escape sequences`:idx:\ : Escape sequence Meaning ================== =================================================== ``\n`` `newline`:idx: - ``\r`` `carriage return`:idx: + ``\r``, ``\c`` `carriage return`:idx: ``\l`` `line feed`:idx: ``\f`` `form feed`:idx: ``\t`` `tabulator`:idx: @@ -184,8 +191,7 @@ contain the following `escape sequences`:idx:\ : ``\'`` `apostrophe`:idx: ``\d+`` `character with decimal value d`:idx:; all decimal digits directly - following are used for the - character + following are used for the character ``\a`` `alert`:idx: ``\b`` `backspace`:idx: ``\e`` `escape`:idx: `[ESC]`:idx: @@ -194,15 +200,14 @@ contain the following `escape sequences`:idx:\ : ================== =================================================== -Strings in Nimrod may contain any 8-bit value, except embedded zeros -which are not allowed for compability with `C`:idx:. +Strings in Nimrod may contain any 8-bit value, except embedded zeros. Literal strings can also be delimited by three double squotes ``"""`` ... ``"""``. Literals in this form may run for several lines, may contain ``"`` and do not interpret any escape sequences. -For convenience, when the opening ``"""`` is immediately -followed by a newline, the newline is not included in the string. +For convenience, when the opening ``"""`` is immediately followed by a newline, +the newline is not included in the string. There are also `raw string literals` that are preceded with the letter ``r`` (or ``R``) and are delimited by matching double quotes (just like ordinary string literals) and do not interpret the escape sequences. This is especially @@ -253,8 +258,8 @@ Numerical constants As can be seen in the productions, numerical constants can contain unterscores for readability. Integer and floating point literals may be given in decimal (no -prefix), binary (prefix ``0b``), octal (prefix ``0o``) and -hexadecimal (prefix ``0x``) notation. +prefix), binary (prefix ``0b``), octal (prefix ``0o``) and hexadecimal +(prefix ``0x``) notation. There exists a literal for each numerical type that is defined. The suffix starting with an apostophe ('\'') is called a @@ -262,7 +267,7 @@ defined. The suffix starting with an apostophe ('\'') is called a unless the literal contains a dot or an ``E`` in which case it is of type ``float``. -The following table specifies type suffixes: +The type suffixes are: ================= ========================= Type Suffix Resulting type of literal @@ -295,11 +300,11 @@ the three tokens `{`:tok:, `..`:tok:, `}`:tok: and not the two tokens `{.`:tok:, `.}`:tok:. In Nimrod one can define his own operators. An `operator`:idx: is any -combination of the following characters that are not listed above:: +combination of the following characters that is not listed above:: + - * / < > = @ $ ~ & % - ! ? ^ . | + ! ? ^ . | \ These keywords are also operators: ``and or not xor shl shr div mod in notin is isnot``. @@ -348,16 +353,13 @@ Constants cannot change. The compiler must be able to evaluate the expression in a constant declaration at compile time. -.. - Nimrod contains a sophisticated - compile-time evaluator, so procedures declared with the ``{.noSideEffect.}`` - pragma can be used in constant expressions: - - .. code-block:: nimrod +Nimrod contains a sophisticated compile-time evaluator, so procedures which +have no side-effect can be used in constant expressions too: - from strutils import findSubStr - const - x = findSubStr('a', "hallo") # x is 1; this is computed at compile time! +.. code-block:: nimrod + import strutils + const + constEval = contains("abc", 'b') # computed at compile time! Types @@ -414,8 +416,8 @@ intXX There are no `unsigned integer`:idx: types, only `unsigned operations`:idx: that treat their arguments as unsigned. Unsigned operations all wrap around; -they may not lead to over- or underflow errors. Unsigned operations use the -``%`` postfix as convention: +they cannot lead to over- or underflow errors. Unsigned operations use the +``%`` suffix as convention: ====================== ====================================================== operation meaning @@ -453,7 +455,7 @@ floatXX implementation supports ``float32`` and ``float64``. Literals of these types have the suffix 'fXX. -`Automatic type conversion`:idx: is performed in expressions where different +`Automatic type conversion`:idx: is performed in expressions where different kinds of integer types are used. However, if the type conversion loses information, the `EOutOfRange`:idx: exception is raised (if the error cannot be detected at compile time). @@ -498,16 +500,15 @@ the resulting programs will still handle UTF-8 properly as UTF-8 was specially designed for this. Another reason is that Nimrod can support ``array[char, int]`` or ``set[char]`` efficiently as many algorithms rely on this feature. The -`TUniChar` type is used for Unicode characters, it can represent any Unicode -character. ``TUniChar`` is declared the ``unicode`` standard module. +`TRune` type is used for Unicode characters, it can represent any Unicode +character. ``TRune`` is declared the ``unicode`` module. Enumeration types ~~~~~~~~~~~~~~~~~ -`Enumeration`:idx: types define a new type whose values consist only of the ones -specified. -The values are ordered by the order in enum's declaration. Example: +`Enumeration`:idx: types define a new type whose values consist of the ones +specified. The values are ordered. Example: .. code-block:: nimrod @@ -528,8 +529,8 @@ with enumeration types. For better interfacing to other programming languages, the fields of enum types can be assigned an explicit ordinal value. However, the ordinal values -have to be in ascending order. A field whose ordinal value that is not -explicitly given, is assigned the value of the previous field + 1. +have to be in ascending order. A field whose ordinal value is not +explicitly given is assigned the value of the previous field + 1. An explicit ordered enum can have *wholes*: @@ -545,7 +546,7 @@ and ``pred`` are not available for them either. Subrange types ~~~~~~~~~~~~~~ -A `subrange`:idx: type is a range of values from an ordinal type (the host +A `subrange`:idx: type is a range of values from an ordinal type (the base type). To define a subrange type, one must specify it's limiting values: the highest and lowest value of the type: @@ -566,7 +567,7 @@ A subrange type has the same size as its base type (``int`` in the example). String type ~~~~~~~~~~~ All string literals are of the type `string`:idx:. A string in Nimrod is very -similar to a sequence of characters. However, strings in Nimrod both are +similar to a sequence of characters. However, strings in Nimrod are both zero-terminated and have a length field. One can retrieve the length with the builtin ``len`` procedure; the length never counts the terminating zero. The assignment operator for strings always copies the string. @@ -585,7 +586,7 @@ arrays, they can be used in case statements: Per convention, all strings are UTF-8 strings, but this is not enforced. For example, when reading strings from binary files, they are merely a sequence of bytes. The index operation ``s[i]`` means the i-th *char* of ``s``, not the -i-th *unichar*. The iterator ``unichars`` from the ``unicode`` standard +i-th *unichar*. The iterator ``runes`` from the ``unicode`` module can be used for iteration over all unicode characters. @@ -611,9 +612,7 @@ constructed by the array constructor ``[]`` in conjunction with the array to sequence operator ``@``. Another way to allocate space for a sequence is to call the built-in ``newSeq`` procedure. -A sequence may be passed to a parameter that is of type *open array*, but -not to a multi-dimensional open array, because it is impossible to do so in an -efficient manner. +A sequence may be passed to a parameter that is of type *open array*. Example: @@ -633,18 +632,36 @@ The lower bound of an array or sequence may be received by the built-in proc received by ``len()``. ``low()`` for a sequence or an open array always returns 0, as this is the first valid index. -The notation ``x[i]`` can be used to access the i-th element of ``x``. +The notation ``x[i]`` can be used to access the i-th element of ``x``. Arrays are always bounds checked (at compile-time or at runtime). These checks can be disabled via pragmas or invoking the compiler with the ``--bound_checks:off`` command line switch. +An open array is also a means to implement passing a variable number of +arguments to a procedure. The compiler converts the list of arguments +to an array automatically: + +.. code-block:: nimrod + proc myWriteln(f: TFile, a: openarray[string]) = + for s in items(a): + write(f, s) + write(f, "\n") + + myWriteln(stdout, "abc", "def", "xyz") + # is transformed by the compiler to: + myWriteln(stdout, ["abc", "def", "xyz"]) + +This transformation is only done if the openarray parameter is the +last parameter in the procedure header. The current implementation does not +support nested open arrays. + Tuples and object types ~~~~~~~~~~~~~~~~~~~~~~~ A variable of a `tuple`:idx: or `object`:idx: type is a heterogenous storage container. -A tuple or object defines various named *fields* of a type. A tuple also +A tuple or object defines various named *fields* of a type. A tuple also defines an *order* of the fields. Tuples are meant for heterogenous storage types with no overhead and few abstraction possibilities. The constructor ``()`` can be used to construct tuples. The order of the fields in the constructor @@ -691,7 +708,7 @@ the ``is`` operator can be used to determine the object's type. person: TPerson assert(student is TStudent) # is true -Object fields that should be visible outside from the defining module, have to +Object fields that should be visible from outside the defining module, have to marked by ``*``. In contrast to tuples, different object types are never *equivalent*. @@ -730,7 +747,7 @@ An example: new(n) # creates a new node n.kind = nkFloat n.floatVal = 0.0 # valid, because ``n.kind==nkFloat``, so that it fits - + # the following statement raises an `EInvalidField` exception, because # n.kind's value does not fit: n.strVal = "" @@ -783,8 +800,8 @@ point to and modify the same location in memory. Nimrod distinguishes between `traced`:idx: and `untraced`:idx: references. Untraced references are also called *pointers*. Traced references point to -objects of a garbage collected heap, untraced references point to -manually allocated objects or to objects somewhere else in memory. Thus +objects of a garbage collected heap, untraced references point to +manually allocated objects or to objects somewhere else in memory. Thus untraced references are *unsafe*. However for certain low-level operations (accessing the hardware) untraced references are unavoidable. @@ -817,7 +834,7 @@ To deal with untraced memory, the procedures ``alloc``, ``dealloc`` and ``realloc`` can be used. The documentation of the system module contains further information. -If a reference points to *nothing*, it has the value ``nil``. +If a reference points to *nothing*, it has the value ``nil``. Special care has to be taken if an untraced object contains traced objects like traced references, strings or sequences: In order to free everything properly, @@ -904,9 +921,9 @@ Most calling conventions exist only for the Windows 32-bit platform. -Statements ----------- -Nimrod uses the common statement/expression paradigma: `Statements`:idx: do not +Statements and expressions +-------------------------- +Nimrod uses the common statement/expression paradigm: `Statements`:idx: do not produce a value in contrast to expressions. Call expressions are statements. If the called procedure returns a value, it is not a valid statement as statements do not produce values. To evaluate an expression for @@ -943,7 +960,7 @@ Discard statement Syntax:: - discardStmt ::= DISCARD expr + discardStmt ::= 'discard' expr Example: @@ -962,11 +979,13 @@ Var statement Syntax:: - colonOrEquals ::= COLON typeDesc [EQUALS expr] | EQUALS expr - varField ::= symbol ["*"] [pragma] + colonOrEquals ::= ':' typeDesc ['=' expr] | '=' expr + varField ::= symbol ['*'] [pragma] varPart ::= symbol (comma symbol)* [comma] colonOrEquals [COMMENT | IND COMMENT] - varSection ::= VAR (varPart - | indPush (COMMENT|varPart) (SAD (COMMENT|varPart))* DED) + varSection ::= 'var' (varPart + | indPush (COMMENT|varPart) + (SAD (COMMENT|varPart))* DED indPop) + `Var`:idx: statements declare new local and global variables and initialize them. A comma seperated list of variables can be used to specify @@ -992,7 +1011,7 @@ char '\0' bool false ref or pointer type nil procedural type nil -sequence nil +sequence nil (**not** ``@[]``) string nil (**not** "") tuple[x: A, y: B, ...] (default(A), default(B), ...) (analogous for objects) @@ -1007,12 +1026,12 @@ Const section Syntax:: - colonAndEquals ::= [COLON typeDesc] EQUALS expr - constDecl ::= CONST - indPush - symbol ["*"] [pragma] colonAndEquals - (SAD symbol ["*"] [pragma] colonAndEquals)* - DED + colonAndEquals ::= [':' typeDesc] '=' expr + + constDecl ::= symbol ['*'] [pragma] colonAndEquals [COMMENT | IND COMMENT] + | COMMENT + constSection ::= 'const' indPush constDecl (SAD constDecl)* DED indPop + Example: @@ -1031,7 +1050,7 @@ If statement Syntax:: - ifStmt ::= IF expr COLON stmt (ELIF expr COLON stmt)* [ELSE COLON stmt] + ifStmt ::= 'if' expr ':' stmt ('elif' expr ':' stmt)* ['else' ':' stmt] Example: @@ -1061,9 +1080,9 @@ Case statement Syntax:: - caseStmt ::= CASE expr (OF sliceList COLON stmt)* - (ELIF expr COLON stmt)* - [ELSE COLON stmt] + caseStmt ::= 'case' expr ('of' sliceExprList ':' stmt)* + ('elif' expr ':' stmt)* + ['else' ':' stmt] Example: @@ -1078,9 +1097,9 @@ Example: The `case`:idx: statement is similar to the if statement, but it represents a multi-branch selection. The expression after the keyword ``case`` is evaluated and if its value is in a *vallist* the corresponding statements -(after the ``of`` keyword) are executed. If the value is not in any -given *slicelist* the ``else`` part is executed. If there is no ``else`` -part and not all possible values that ``expr`` can hold occur in a ``vallist``, +(after the ``of`` keyword) are executed. If the value is not in any +given *slicelist* the ``else`` part is executed. If there is no ``else`` +part and not all possible values that ``expr`` can hold occur in a ``vallist``, a static error is given. This holds only for expressions of ordinal types. If the expression is not of an ordinal type, and no ``else`` part is given, control just passes after the ``case`` statement. @@ -1094,7 +1113,7 @@ When statement Syntax:: - whenStmt ::= WHEN expr COLON stmt (ELIF expr COLON stmt)* [ELSE COLON stmt] + whenStmt ::= 'when' expr ':' stmt ('elif' expr ':' stmt)* ['else' ':' stmt] Example: @@ -1116,8 +1135,7 @@ exceptions: * The statements do not open a new scope if they introduce new identifiers. * The statements that belong to the expression that evaluated to true are translated by the compiler, the other statements are not checked for - syntax or semantics at all! This holds also for any ``expr`` coming - after the expression that evaluated to true. + semantics! However, each ``expr`` is checked for semantics. The ``when`` statement enables conditional compilation techniques. As a special syntatic extension, the ``when`` construct is also available @@ -1129,7 +1147,7 @@ Raise statement Syntax:: - raiseStmt ::= RAISE [expr] + raiseStmt ::= 'raise' [expr] Example: @@ -1137,7 +1155,7 @@ Example: raise newEOS("operating system failed") Apart from built-in operations like array indexing, memory allocation, etc. -the ``raise`` statement is the only way to raise an exception. +the ``raise`` statement is the only way to raise an exception. .. XXX document this better! @@ -1152,11 +1170,11 @@ Try statement Syntax:: + qualifiedIdent ::= symbol ['.' symbol] exceptList ::= [qualifiedIdent (comma qualifiedIdent)* [comma]] - tryStmt ::= TRY COLON stmt - (EXCEPT exceptList COLON stmt)* - [FINALLY COLON stmt] - + tryStmt ::= 'try' ':' stmt + ('except' exceptList ':' stmt)* + ['finally' ':' stmt] Example: @@ -1176,6 +1194,8 @@ Example: echo("could not convert string to integer") except EIO: echo("IO error!") + except: + echo("Unknown exception!") finally: closeFile(f) @@ -1203,7 +1223,7 @@ Return statement Syntax:: - returnStmt ::= RETURN [expr] + returnStmt ::= 'return' [expr] Example: @@ -1219,12 +1239,13 @@ sugar for: return result ``return`` without an expression is a short notation for ``return result`` if -the proc has a return type. The `result`:idx: variable is always the return +the proc has a return type. The `result`:idx: variable is always the return value of the procedure. It is automatically declared by the compiler. As all variables, ``result`` is initialized to (binary) zero:: .. code-block:: nimrod - proc returnZero(): int = nil # implicitely returns 0 + proc returnZero(): int = + # implicitely returns 0 Yield statement @@ -1232,7 +1253,7 @@ Yield statement Syntax:: - yieldStmt ::= YIELD expr + yieldStmt ::= 'yield' expr Example: @@ -1252,7 +1273,7 @@ Block statement Syntax:: - blockStmt ::= BLOCK [symbol] COLON stmt + blockStmt ::= 'block' [symbol] ':' stmt Example: @@ -1277,7 +1298,7 @@ Break statement Syntax:: - breakStmt ::= BREAK [symbol] + breakStmt ::= 'break' [symbol] Example: @@ -1294,7 +1315,7 @@ While statement Syntax:: - whileStmt ::= WHILE expr COLON stmt + whileStmt ::= 'while' expr ':' stmt Example: @@ -1316,7 +1337,7 @@ Continue statement Syntax:: - continueStmt ::= CONTINUE + continueStmt ::= 'continue' A `continue`:idx: statement leads to the immediate next iteration of the surrounding loop construct. It is only allowed within a loop. A continue @@ -1340,7 +1361,7 @@ Assembler statement ~~~~~~~~~~~~~~~~~~~ Syntax:: - asmStmt ::= ASM [pragma] (STR_LIT | RSTR_LIT | TRIPLESTR_LIT) + asmStmt ::= 'asm' [pragma] (STR_LIT | RSTR_LIT | TRIPLESTR_LIT) The direct embedding of `assembler`:idx: code into Nimrod code is supported by the unsafe ``asm`` statement. Identifiers in the assembler code that refer to @@ -1348,6 +1369,49 @@ Nimrod identifiers shall be enclosed in a special character which can be specified in the statement's pragmas. The default special character is ``'`'``. +If expression +~~~~~~~~~~~~~ + +An `if expression` is almost like an if statement, but it is an expression. +Example: + +.. code-block:: nimrod + p(if x > 8: 9 else: 10) + +An if expression always results in a value, so the ``else`` part is +required. ``Elif`` parts are also allowed (but unlikely to be good +style). + + +Type convertions +~~~~~~~~~~~~~~~~ +Syntactically a `type conversion` is like a procedure call, but a +type name replaces the procedure name. A type conversion is always +safe in the sense that a failure to convert a type to another +results in an exception (if it cannot be determined statically). + + +Type casts +~~~~~~~~~~ +Example: + +.. code-block:: nimrod + cast[int](x) + +Type casts are a crude mechanism to interpret the bit pattern of +an expression as if it would be of another type. Type casts are +only needed for low-level programming and are inherently unsafe. + + +The addr operator +~~~~~~~~~~~~~~~~~ +The `addr` operator returns the address of an l-value. If the +type of the location is ``T``, the `addr` operator result is +of the type ``ptr T``. Taking the address of an object that resides +on the stack is **unsafe**, as the pointer may live longer than the +object on the stack and can thus reference a non-existing object. + + Procedures ~~~~~~~~~~ What most programming languages call `methods`:idx: or `funtions`:idx: are @@ -1355,16 +1419,16 @@ called `procedures`:idx: in Nimrod (which is the correct terminology). A procedure declaration defines an identifier and associates it with a block of code. A procedure may call itself recursively. The syntax is:: - param ::= symbol (comma symbol)* [comma] COLON typeDesc - paramList ::= [PAR_LE [param (comma param)* [comma]] PAR_RI] [COLON typeDesc] - - genericParams ::= BRACKET_LE (symbol [EQUALS typeDesc] )* BRACKET_RI - - procDecl ::= PROC symbol ["*"] [genericParams] - paramList [pragma] - [EQUALS stmt] - -If the ``EQUALS stmt`` part is missing, it is a `forward`:idx: declaration. If + param ::= symbol (comma symbol)* [comma] ':' typeDesc + paramList ::= ['(' [param (comma param)* [comma]] ')'] [':' typeDesc] + + genericParam ::= symbol [':' typeDesc] + genericParams ::= '[' genericParam (comma genericParam)* [comma] ']' + + procDecl ::= 'proc' symbol ['*'] [genericParams] paramList [pragma] + ['=' stmt] + +If the ``= stmt`` part is missing, it is a `forward`:idx: declaration. If the proc returns a value, the procedure body can access an implicit declared variable named `result`:idx: that represents the return value. Procs can be overloaded. The overloading resolution algorithm tries to find the proc that is @@ -1384,6 +1448,24 @@ is used if the caller does not provide a value for this parameter. Example: for i in 0..len(s) - 1: result[i] = toLower(s[i]) # calls toLower for characters; no recursion! +Calling a procedure can be done in many different ways: + +.. code-block:: nimrod + proc callme(x, y: int, s: string = "", c: char, b: bool = false) = ... + + # call with positional arguments # parameter bindings: + callme(0, 1, "abc", '\t', true) # (x=0, y=1, s="abc", c='\t', b=true) + # call with named and positional arguments: + callme(y=1, x=0, "abd", '\t') # (x=0, y=1, s="abd", c='\t', b=false) + # call with named arguments (order is not relevant): + callme(c='\t', y=1, x=0) # (x=0, y=1, s="", c='\t', b=false) + # call as a command statement: no () needed: + callme 0, 1, "abc", '\t' + + +A procedure cannot modify its parameters (unless the parameters have the +type `var`). + `Operators`:idx: are procedures with a special operator symbol as identifier: .. code-block:: nimrod @@ -1391,19 +1473,79 @@ is used if the caller does not provide a value for this parameter. Example: # converts an integer to a string; this is a prefix operator. return intToStr(x) -Calling a procedure can be done in many different ways: +Operators with one parameter are prefix operators, operators with two +parameters are infix operators. There is no way to declare postfix +operators: All postfix operators are built-in and handled by the +grammar explicitely. + +Any operator can be called like an ordinary proc with the '`opr`' +notation. (Thus an operator can have more than two parameters): .. code-block:: nimrod - proc callme(x, y: int, s: string = "", c: char, b: bool = false) = ... + proc `*+` (a, b, c: int): int = + # Multiply and add + return a * b + c + + assert `*+`(3, 4, 6) == `*`(a, `+`(b, c)) + + + +Var parameters +~~~~~~~~~~~~~~ +The type of a parameter may be prefixed with the ``var`` keyword: + +.. code-block:: nimrod + proc divmod(a, b: int, res, remainder: var int) = + res = a div b + remainder = a mod b + + var + x, y: int + + divmod(8, 5, x, y) # modifies x and y + assert x == 1 + assert y == 3 + +In the example, ``res`` and ``remainder`` are `var parameters`. +Var parameters can be modified by the procedure and the changes are +visible to the caller. The argument passed to a var parameter has to be +an l-value. Var parameters are implemented as hidden pointers. The +above example is equivalent to: + +.. code-block:: nimrod + proc divmod(a, b: int, res, remainder: ptr int) = + res = a div b + remainder = a mod b + + var + x, y: int + divmod(8, 5, addr(x), addr(y)) + assert x == 1 + assert y == 3 + +In the examples, var parameters or pointers are used to provide two +return values. This can be done in a cleaner way by returning a tuple: + +.. code-block:: nimrod + proc divmod(a, b: int): tuple[res, remainder: int] = + return (a div b, a mod b) + + var t = divmod(8, 5) + assert t.res == 1 + assert t.remainder = 3 + +Even more elegant is to use `tuple unpacking` to access the tuple's fields: + +.. code-block:: nimrod + var (x, y) = divmod(8, 5) # tuple unpacking + assert x == 1 + assert y == 3 + +Unfortunately, this form of tuple unpacking is not yet implemented. + +.. + XXX remove this as soon as tuple unpacking is implemented - # call with positional arguments# parameter bindings: - callme(0, 1, "abc", '\t', true) # (x=0, y=1, s="abc", c='\t', b=true) - # call with named and positional arguments: - callme(y=1, x=0, "abd", '\t') # (x=0, y=1, s="abd", c='\t', b=false) - # call with named arguments (order is not relevant): - callme(c='\t', y=1, x=0) # (x=0, y=1, s="", c='\t', b=false) - # call as a command statement: no () needed: - callme 0, 1, "abc", '\t' Iterators and the for statement @@ -1411,15 +1553,16 @@ Iterators and the for statement Syntax:: - forStmt ::= FOR symbol (comma symbol)* [comma] IN expr [DOTDOT expr] COLON stmt + forStmt ::= 'for' symbol (comma symbol)* [comma] 'in' expr ['..' expr] ':' stmt - param ::= symbol (comma symbol)* [comma] COLON typeDesc - paramList ::= [PAR_LE [param (comma param)* [comma]] PAR_RI] [COLON typeDesc] - - genericParams ::= BRACKET_LE (symbol [EQUALS typeDesc] )* BRACKET_RI - - iteratorDecl ::= ITERATOR symbol ["*"] [genericParams] paramList [pragma] - [EQUALS stmt] + param ::= symbol (comma symbol)* [comma] ':' typeDesc + paramList ::= ['(' [param (comma param)* [comma]] ')'] [':' typeDesc] + + genericParam ::= symbol [':' typeDesc] + genericParams ::= '[' genericParam (comma genericParam)* [comma] ']' + + iteratorDecl ::= 'iterator' symbol ['*'] [genericParams] paramList [pragma] + ['=' stmt] The `for`:idx: statement is an abstract mechanism to iterate over the elements of a container. It relies on an `iterator`:idx: to do so. Like ``while`` @@ -1473,13 +1616,15 @@ Type sections Syntax:: typeDef ::= typeDesc | objectDef | enumDef - genericParams ::= BRACKET_LE (symbol [EQUALS typeDesc] )* BRACKET_RI - typeDecl ::= TYPE - indPush - symbol ["*"] [genericParams] [EQUALS typeDef] - (SAD symbol ["*"] [genericParams] [EQUALS typeDef])* - DED + genericParam ::= symbol [':' typeDesc] + genericParams ::= '[' genericParam (comma genericParam)* [comma] ']' + + typeDecl ::= COMMENT + | symbol ['*'] [genericParams] ['=' typeDef] [COMMENT|IND COMMENT] + + typeSection ::= 'type' indPush typeDecl (SAD typeDecl)* DED indPop + Example: @@ -1504,6 +1649,8 @@ possible within a single ``type`` section. Generics ~~~~~~~~ +`Version 0.7.4: Complex generic types like in the example do not work.`:red: + Example: .. code-block:: nimrod @@ -1578,26 +1725,119 @@ Example: # this definition exists in the System module not (a == b) - writeln(5 != 6) # the compiler rewrites that to: writeln(not (5 == 6)) + assert(5 != 6) # the compiler rewrites that to: assert(not (5 == 6)) Macros -~~~~~~ +------ -`Macros`:idx: are the most powerful feature of Nimrod. They should be used -only to implement `domain specific languages`:idx:. They may lead to code +`Macros`:idx: are the most powerful feature of Nimrod. They can be used +to implement `domain specific languages`:idx:. But they may lead to code that is harder to understand and maintain. So one ought to use them sparingly. -The usage of ordinary procs, iterators or generics is preferred to the usage of -macros. + +While macros enable advanced compile-time code tranformations, they +cannot change Nimrod's syntax. However, this is no real restriction because +Nimrod's syntax is flexible enough anyway. + +To write macros, one needs to know how the Nimrod concrete syntax is converted +to an abstract syntax tree. (Unfortunately the AST is not yet documented.) + +There are two ways to invoke a macro: +(1) invoking a macro like a procedure call (`expression macros`) +(2) invoking a macro with the special ``macrostmt`` syntax (`statement macros`) + + +Expression Macros +~~~~~~~~~~~~~~~~~ + +The following example implements a powerful ``debug`` command that accepts a +variable number of arguments: + +.. code-block:: nimrod + # to work with Nimrod syntax trees, we need an API that is defined in the + # ``macros`` module: + import macros + + macro debug(n: expr): stmt = + # `n` is a Nimrod AST that contains the whole macro expression + # this macro returns a list of statements: + result = newNimNode(nnkStmtList, n) + # iterate over any argument that is passed to this macro: + for i in 1..n.len-1: + # add a call to the statement list that writes the expression; + # `toStrLit` converts an AST to its string representation: + add(result, newCall("write", newIdentNode("stdout"), toStrLit(n[i]))) + # add a call to the statement list that writes ": " + add(result, newCall("write", newIdentNode("stdout"), newStrLitNode(": "))) + # add a call to the statement list that writes the expressions value: + add(result, newCall("writeln", newIdentNode("stdout"), n[i])) + + var + a: array [0..10, int] + x = "some string" + a[0] = 42 + a[1] = 45 + + debug(a[0], a[1], x) + +The macro call expands to: + +.. code-block:: nimrod + write(stdout, "a[0]") + write(stdout, ": ") + writeln(stdout, a[0]) + + write(stdout, "a[1]") + write(stdout, ": ") + writeln(stdout, a[1]) + + write(stdout, "x") + write(stdout, ": ") + writeln(stdout, x) + + +Statement Macros +~~~~~~~~~~~~~~~~ + +Statement macros are defined just as expression macros. However, they are +invoked by an expression following a colon:: + + exprStmt ::= lowestExpr ['=' expr | [expr (comma expr)* [comma]] [macroStmt]] + macroStmt ::= ':' [stmt] ('of' [sliceExprList] ':' stmt + | 'elif' expr ':' stmt + | 'except' exceptList ':' stmt )* + ['else' ':' stmt] + +The following example outlines a macro that generates a lexical analyser from +regular expressions: + +.. code-block:: nimrod + import macros + + macro case_token(n: stmt): stmt = + # creates a lexical analyser from regular expressions + # ... (implementation is an exercise for the reader :-) + nil + + case_token: # this colon tells the parser it is a macro statement + of r"[A-Za-z_]+[A-Za-z_0-9]*": + return tkIdentifier + of r"0-9+": + return tkInteger + of r"[\+\-\*\?]+": + return tkOperator + else: + return tkUnknown + Modules ------- Nimrod supports splitting a program into pieces by a `module`:idx: concept. -Each module needs to be in its own file. Modules enable +Each module needs to be in its own file. Modules enable `information hiding`:idx: and `separate compilation`:idx:. A module may gain -access to symbols of another module by the `import`:idx: statement. -`Recursive module dependancies`:idx: are allowed, but slightly subtle. Only +access to symbols of another module by the `import`:idx: statement. +`Recursive module dependancies`:idx: are allowed, but slightly subtle. Only top-level symbols that are marked with an asterisk (``*``) are exported. The algorithm for compiling modules is: @@ -1622,12 +1862,12 @@ This is best illustrated by an example: # Module B import A # A is not parsed here! Only the already known symbols - # of A are imported here. + # of A are imported. - proc p*(x: A.T1): A.T1 # this works because the compiler has already - # added T1 to A's interface symbol table - - proc p(x: A.T1): A.T1 = return x + 1 + proc p*(x: A.T1): A.T1 = + # this works because the compiler has already + # added T1 to A's interface symbol table + return x + 1 Scope rules @@ -1649,7 +1889,7 @@ procedure or iterator overloading purposes. Tuple or object scope -~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~ The field identifiers inside a tuple or object definition are valid in the following places: @@ -1659,16 +1899,14 @@ following places: Module scope ~~~~~~~~~~~~ -All identifiers in the interface part of a module are valid from the point of -declaration, until the end of the module. Furthermore, the identifiers are -known in other modules that import the module. Identifiers from indirectly -dependent modules are *not* available. The `system`:idx: module is automatically -imported in all other modules. +All identifiers of a module are valid from the point of declaration until +the end of the module. Identifiers from indirectly dependent modules are *not* +available. The `system`:idx: module is automatically imported in every other +module. -If a module imports an identifier by two different modules, -each occurance of the identifier has to be qualified, unless it is an -overloaded procedure or iterator in which case the overloading -resolution takes place: +If a module imports an identifier by two different modules, each occurance of +the identifier has to be qualified, unless it is an overloaded procedure or +iterator in which case the overloading resolution takes place: .. code-block:: nimrod # Module A @@ -1680,7 +1918,7 @@ resolution takes place: # Module C import A, B write(stdout, x) # error: x is ambigious - write(sdtout, A.x) # no error: qualifier used + write(stdout, A.x) # no error: qualifier used var x = 4 write(stdout, x) # not ambigious: uses the module C's x @@ -1698,14 +1936,14 @@ Pragmas Syntax:: - colonExpr ::= expr [COLON expr] - colonExprList ::= [ colonExpr (comma colonExpr)* [comma] ] + colonExpr ::= expr [':' expr] + colonExprList ::= [colonExpr (comma colonExpr)* [comma]] - pragma ::= CURLYDOT_LE colonExprList (CURLYDOT_RI | CURLY_RI) + pragma ::= '{.' optInd (colonExpr [comma])* [SAD] ('.}' | '}') Pragmas are Nimrod's method to give the compiler additional information/ commands without introducing a massive number of new keywords. Pragmas are -processed on the fly during parsing. Pragmas are always enclosed in the +processed on the fly during semantic checking. Pragmas are enclosed in the special ``{.`` and ``.}`` curly brackets. @@ -1718,7 +1956,7 @@ The compiler defines the target processor and the target operating system as conditional symbols. Warning: The ``define`` pragma is deprecated as it conflicts with separate -compilation! One should use boolean constants as a replacement - this is +compilation! One should use boolean constants as a replacement - this is cleaner anyway. @@ -1759,10 +1997,6 @@ compilation option pragmas -------------------------- The listed pragmas here can be used to override the code generation options for a section of code. -:: - - "{." pragma: val {pragma: val} ".}" - The implementation currently provides the following possible options (later various others may be added). @@ -1785,8 +2019,7 @@ warnings on|off Turns the warning messages of the compiler hints on|off Turns the hint messages of the compiler on or off. optimization none|speed|size Optimize the code for speed or size, or - disable optimization. For non-optimizing - compilers this option has no effect. + disable optimization. callconv cdecl|... Specifies the default calling convention for all procedures (and procedure types) that follow. diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index 0bd9bdc91..18f9bce5d 100644 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -12,7 +12,7 @@ Introduction This document describes the usage of the *Nimrod compiler* on the different supported platforms. It is not a definition of the Nimrod -programming system (therefore is the Nimrod manual). +programming language (therefore is the manual). Nimrod is free software; it is licensed under the `GNU General Public License <gpl.html>`_. @@ -41,7 +41,7 @@ looks for it in the following directories (in this order): 2. ``$nimrod/config/nimrod.cfg`` (UNIX, Windows) 3. ``/etc/nimrod.cfg`` (UNIX) -The search stops as soon as a configuration file has been found. The reading +The search stops as soon as a configuration file has been found. The reading of ``nimrod.cfg`` can be suppressed by the ``--skip_cfg`` command line option. Configuration settings can be overwritten in a project specific configuration file that is read automatically. This specific file has to @@ -54,21 +54,13 @@ Command line settings have priority over configuration file settings. Nimrod's directory structure ---------------------------- The generated files that Nimrod produces all go into a subdirectory called -``nimcache`` in your project directory. This makes it easy to delete all +``nimcache`` in your project directory. This makes it easy to delete all generated files. However, the generated C code is not platform independant. C code generated for Linux does not compile on Windows, for instance. The comment on top of the C file lists the OS, CPU and CC the file has been compiled for. -The library lies in ``lib``. Directly in the library directory are essential -Nimrod modules like the ``system`` and ``os`` modules. Under ``lib/base`` -are additional specialized libraries or interfaces to foreign libraries which -are included in the standard distribution. The ``lib/extra`` directory is -initially empty. Third party libraries should go there. In the default -configuration the compiler always searches for libraries in ``lib``, -``lib/base`` and ``lib/extra``. - Additional Features =================== @@ -86,8 +78,8 @@ available. Importc Pragma ~~~~~~~~~~~~~~ The `importc`:idx: pragma provides a means to import a type, a variable, or a -procedure from C. The optional argument is a string containing the C -identifier. If the argument is missing, the C name is the Nimrod +procedure from C. The optional argument is a string containing the C +identifier. If the argument is missing, the C name is the Nimrod identifier *exactly as spelled*: .. code-block:: @@ -97,8 +89,8 @@ identifier *exactly as spelled*: Exportc Pragma ~~~~~~~~~~~~~~ The `exportc`:idx: pragma provides a means to export a type, a variable, or a -procedure to C. The optional argument is a string containing the C -identifier. If the argument is missing, the C name is the Nimrod +procedure to C. The optional argument is a string containing the C +identifier. If the argument is missing, the C name is the Nimrod identifier *exactly as spelled*: .. code-block:: Nimrod @@ -109,7 +101,7 @@ Dynlib Pragma ~~~~~~~~~~~~~ With the `dynlib`:idx: pragma a procedure or a variable can be imported from a dynamic library (``.dll`` files for Windows, ``lib*.so`` files for UNIX). The -non-optional argument has to be the name of the dynamic library: +non-optional argument has to be the name of the dynamic library: .. code-block:: Nimrod proc gtk_image_new(): PGtkWidget {.cdecl, dynlib: "libgtk-x11-2.0.so", importc.} @@ -128,8 +120,8 @@ the C code. Thus it makes the following possible, for example: .. code-block:: Nimrod var - EOF {.importc: "EOF", no_decl.}: cint # pretend EOF was a variable, as - # Nimrod does not know its value + EACCES {.importc, no_decl.}: cint # pretend EACCES was a variable, as + # Nimrod does not know its value However, the ``header`` pragma is often the better alternative. @@ -164,14 +156,6 @@ strings automatically: printf("hallo %s", "world") # "world" will be passed as C string -No_static Pragma -~~~~~~~~~~~~~~~~ -The `no_static`:idx: pragma can be applied to almost any symbol and specifies -that it shall not be declared ``static`` in the generated C code. Note that -symbols in the interface part of a module never get declared ``static``, so -only in very special cases this pragma is necessary. - - Line_dir Option ~~~~~~~~~~~~~~~ The `line_dir`:idx: option can be turned on or off. If on the generated C code @@ -216,14 +200,14 @@ The `register`:idx: pragma is for variables only. It declares the variable as in a hardware register for faster access. C compilers usually ignore this though and for good reason: Often they do a better job without it anyway. -In highly specific cases (a dispatch loop of an bytecode interpreter for +In highly specific cases (a dispatch loop of an bytecode interpreter for example) it may provide benefits, though. Acyclic Pragma ~~~~~~~~~~~~~~ The `acyclic`:idx: pragma can be used for object types to mark them as acyclic -even though they seem to be cyclic. This is an **optimization** for the garbage +even though they seem to be cyclic. This is an **optimization** for the garbage collector to not consider objects of this type as part of a cycle:: type @@ -231,15 +215,31 @@ collector to not consider objects of this type as part of a cycle:: TNode {.acyclic, final.} = object left, right: PNode data: string - + In the example a tree structure is declared with the ``TNode`` type. Note that -the type definition is recursive thus the GC has to assume that objects of -this type may form a cyclic graph. The ``acyclic`` pragma passes the +the type definition is recursive thus the GC has to assume that objects of +this type may form a cyclic graph. The ``acyclic`` pragma passes the information that this cannot happen to the GC. If the programmer uses the ``acyclic`` pragma for data types that are in reality cyclic, the GC may leak memory, but nothing worse happens. +Dead_code_elim Pragma +~~~~~~~~~~~~~~~~~~~~~ +The `dead_code_elim`:idx: pragma only applies to whole modules: It tells the +compiler to active (or deactivate) dead code elimination for the module the +pragma appers in. + +The ``--dead_code_elim:on`` command line switch has the same effect as marking +any module with ``{.dead_code_elim:on}``. However, for some modules such as +the GTK wrapper it makes sense to *always* turn on dead code elimination - +no matter if it is globally active or not. + +Example: + +.. code-block:: nimrod + {.dead_code_elim: on.} + Disabling certain messages -------------------------- @@ -280,8 +280,8 @@ However, sometimes one has to optimize. Do it in the following order: This section can only help you with the last item. Note that rewriting parts of your program in C is *never* necessary to speed up your program, because -everything that can be done in C can be done in Nimrod. Rewriting parts in -assembler *might*. +everything that can be done in C can be done in Nimrod. + Optimizing string handling -------------------------- diff --git a/doc/rst.txt b/doc/rst.txt index c4f3805b3..79d0eb9c4 100644 --- a/doc/rst.txt +++ b/doc/rst.txt @@ -18,8 +18,7 @@ compatible to the original implementation as one would like. Even though Nimrod's |rst| parser does not parse all constructs, it is pretty usable. The missing features can easily be circumvented. An indication of this -fact is that Nimrod's -*whole* documentation itself (including this document) is +fact is that Nimrod's *whole* documentation itself (including this document) is processed by Nimrod's |rst| parser. (Which is an order of magnitude faster than Docutils' parser.) diff --git a/doc/theindex.txt b/doc/theindex.txt index f60e85d28..1afbdb791 100644 --- a/doc/theindex.txt +++ b/doc/theindex.txt @@ -1,7469 +1,7539 @@ - -===== -Index -===== - -.. index:: - - - `!=`:idx: - `system.html#351 <system.html#351>`_ - - `$`:idx: - * `system.html#420 <system.html#420>`_ - * `system.html#421 <system.html#421>`_ - * `system.html#422 <system.html#422>`_ - * `system.html#423 <system.html#423>`_ - * `system.html#424 <system.html#424>`_ - * `system.html#425 <system.html#425>`_ - * `system.html#426 <system.html#426>`_ - * `times.html#109 <times.html#109>`_ - * `times.html#110 <times.html#110>`_ - - `%`:idx: - * `strutils.html#132 <strutils.html#132>`_ - * `strutils.html#133 <strutils.html#133>`_ - * `strtabs.html#112 <strtabs.html#112>`_ - - `%%`:idx: - * `system.html#293 <system.html#293>`_ - * `system.html#294 <system.html#294>`_ - * `system.html#295 <system.html#295>`_ - * `system.html#296 <system.html#296>`_ - * `system.html#297 <system.html#297>`_ - - `&`:idx: - * `system.html#362 <system.html#362>`_ - * `system.html#363 <system.html#363>`_ - * `system.html#364 <system.html#364>`_ - * `system.html#365 <system.html#365>`_ - * `system.html#450 <system.html#450>`_ - * `system.html#451 <system.html#451>`_ - * `system.html#452 <system.html#452>`_ - * `system.html#453 <system.html#453>`_ - - `*`:idx: - * `system.html#203 <system.html#203>`_ - * `system.html#204 <system.html#204>`_ - * `system.html#205 <system.html#205>`_ - * `system.html#206 <system.html#206>`_ - * `system.html#207 <system.html#207>`_ - * `system.html#312 <system.html#312>`_ - * `system.html#323 <system.html#323>`_ - * `complex.html#107 <complex.html#107>`_ - - `*%`:idx: - * `system.html#283 <system.html#283>`_ - * `system.html#284 <system.html#284>`_ - * `system.html#285 <system.html#285>`_ - * `system.html#286 <system.html#286>`_ - * `system.html#287 <system.html#287>`_ - - `+`:idx: - * `system.html#178 <system.html#178>`_ - * `system.html#179 <system.html#179>`_ - * `system.html#180 <system.html#180>`_ - * `system.html#181 <system.html#181>`_ - * `system.html#182 <system.html#182>`_ - * `system.html#193 <system.html#193>`_ - * `system.html#194 <system.html#194>`_ - * `system.html#195 <system.html#195>`_ - * `system.html#196 <system.html#196>`_ - * `system.html#197 <system.html#197>`_ - * `system.html#308 <system.html#308>`_ - * `system.html#310 <system.html#310>`_ - * `system.html#324 <system.html#324>`_ - * `complex.html#103 <complex.html#103>`_ - - `+%`:idx: - * `system.html#273 <system.html#273>`_ - * `system.html#274 <system.html#274>`_ - * `system.html#275 <system.html#275>`_ - * `system.html#276 <system.html#276>`_ - * `system.html#277 <system.html#277>`_ - - `-`:idx: - * `system.html#183 <system.html#183>`_ - * `system.html#184 <system.html#184>`_ - * `system.html#185 <system.html#185>`_ - * `system.html#186 <system.html#186>`_ - * `system.html#187 <system.html#187>`_ - * `system.html#198 <system.html#198>`_ - * `system.html#199 <system.html#199>`_ - * `system.html#200 <system.html#200>`_ - * `system.html#201 <system.html#201>`_ - * `system.html#202 <system.html#202>`_ - * `system.html#309 <system.html#309>`_ - * `system.html#311 <system.html#311>`_ - * `system.html#325 <system.html#325>`_ - * `complex.html#104 <complex.html#104>`_ - * `complex.html#105 <complex.html#105>`_ - * `times.html#113 <times.html#113>`_ - - `-%`:idx: - * `system.html#278 <system.html#278>`_ - * `system.html#279 <system.html#279>`_ - * `system.html#280 <system.html#280>`_ - * `system.html#281 <system.html#281>`_ - * `system.html#282 <system.html#282>`_ - - `-+-`:idx: - `system.html#326 <system.html#326>`_ - - `/`:idx: - * `system.html#313 <system.html#313>`_ - * `os.html#119 <os.html#119>`_ - * `complex.html#106 <complex.html#106>`_ - - `/%`:idx: - * `system.html#288 <system.html#288>`_ - * `system.html#289 <system.html#289>`_ - * `system.html#290 <system.html#290>`_ - * `system.html#291 <system.html#291>`_ - * `system.html#292 <system.html#292>`_ - - `/../`:idx: - `os.html#123 <os.html#123>`_ - - `<`:idx: - * `system.html#253 <system.html#253>`_ - * `system.html#254 <system.html#254>`_ - * `system.html#255 <system.html#255>`_ - * `system.html#256 <system.html#256>`_ - * `system.html#257 <system.html#257>`_ - * `system.html#316 <system.html#316>`_ - * `system.html#343 <system.html#343>`_ - * `system.html#344 <system.html#344>`_ - * `system.html#345 <system.html#345>`_ - * `system.html#346 <system.html#346>`_ - * `system.html#347 <system.html#347>`_ - * `system.html#348 <system.html#348>`_ - * `system.html#349 <system.html#349>`_ - * `system.html#350 <system.html#350>`_ - * `times.html#114 <times.html#114>`_ - - `<%`:idx: - * `system.html#303 <system.html#303>`_ - * `system.html#304 <system.html#304>`_ - * `system.html#305 <system.html#305>`_ - * `system.html#306 <system.html#306>`_ - * `system.html#307 <system.html#307>`_ - - `<=`:idx: - `times.html#115 <times.html#115>`_ - - `<=`:idx: - * `system.html#248 <system.html#248>`_ - * `system.html#249 <system.html#249>`_ - * `system.html#250 <system.html#250>`_ - * `system.html#251 <system.html#251>`_ - * `system.html#252 <system.html#252>`_ - * `system.html#315 <system.html#315>`_ - * `system.html#336 <system.html#336>`_ - * `system.html#337 <system.html#337>`_ - * `system.html#338 <system.html#338>`_ - * `system.html#339 <system.html#339>`_ - * `system.html#340 <system.html#340>`_ - * `system.html#341 <system.html#341>`_ - * `system.html#342 <system.html#342>`_ - - `<=%`:idx: - * `system.html#298 <system.html#298>`_ - * `system.html#299 <system.html#299>`_ - * `system.html#300 <system.html#300>`_ - * `system.html#301 <system.html#301>`_ - * `system.html#302 <system.html#302>`_ - - `==`:idx: - * `system.html#243 <system.html#243>`_ - * `system.html#244 <system.html#244>`_ - * `system.html#245 <system.html#245>`_ - * `system.html#246 <system.html#246>`_ - * `system.html#247 <system.html#247>`_ - * `system.html#314 <system.html#314>`_ - * `system.html#327 <system.html#327>`_ - * `system.html#328 <system.html#328>`_ - * `system.html#329 <system.html#329>`_ - * `system.html#330 <system.html#330>`_ - * `system.html#331 <system.html#331>`_ - * `system.html#332 <system.html#332>`_ - * `system.html#333 <system.html#333>`_ - * `system.html#334 <system.html#334>`_ - * `system.html#335 <system.html#335>`_ - * `system.html#455 <system.html#455>`_ - * `complex.html#102 <complex.html#102>`_ - - `>`:idx: - `system.html#353 <system.html#353>`_ - - `>%`:idx: - `system.html#419 <system.html#419>`_ - - `>=`:idx: - `system.html#352 <system.html#352>`_ - - `>=%`:idx: - `system.html#418 <system.html#418>`_ - - `@`:idx: - `system.html#361 <system.html#361>`_ - - `[]`:idx: - `strtabs.html#107 <strtabs.html#107>`_ - - `[]=`:idx: - `strtabs.html#106 <strtabs.html#106>`_ - - `[ESC]`:idx: - `manual.html#134 <manual.html#134>`_ - - `ABDAY_1`:idx: - `posix.html#403 <posix.html#403>`_ - - `ABDAY_2`:idx: - `posix.html#404 <posix.html#404>`_ - - `ABDAY_3`:idx: - `posix.html#405 <posix.html#405>`_ - - `ABDAY_4`:idx: - `posix.html#406 <posix.html#406>`_ - - `ABDAY_5`:idx: - `posix.html#407 <posix.html#407>`_ - - `ABDAY_6`:idx: - `posix.html#408 <posix.html#408>`_ - - `ABDAY_7`:idx: - `posix.html#409 <posix.html#409>`_ - - `ABMON_1`:idx: - `posix.html#422 <posix.html#422>`_ - - `ABMON_10`:idx: - `posix.html#431 <posix.html#431>`_ - - `ABMON_11`:idx: - `posix.html#432 <posix.html#432>`_ - - `ABMON_12`:idx: - `posix.html#433 <posix.html#433>`_ - - `ABMON_2`:idx: - `posix.html#423 <posix.html#423>`_ - - `ABMON_3`:idx: - `posix.html#424 <posix.html#424>`_ - - `ABMON_4`:idx: - `posix.html#425 <posix.html#425>`_ - - `ABMON_5`:idx: - `posix.html#426 <posix.html#426>`_ - - `ABMON_6`:idx: - `posix.html#427 <posix.html#427>`_ - - `ABMON_7`:idx: - `posix.html#428 <posix.html#428>`_ - - `ABMON_8`:idx: - `posix.html#429 <posix.html#429>`_ - - `ABMON_9`:idx: - `posix.html#430 <posix.html#430>`_ - - `abs`:idx: - * `system.html#258 <system.html#258>`_ - * `system.html#259 <system.html#259>`_ - * `system.html#260 <system.html#260>`_ - * `system.html#261 <system.html#261>`_ - * `system.html#262 <system.html#262>`_ - * `system.html#317 <system.html#317>`_ - * `complex.html#108 <complex.html#108>`_ - - `access`:idx: - `posix.html#966 <posix.html#966>`_ - - `acyclic`:idx: - `nimrodc.html#114 <nimrodc.html#114>`_ - - `add`:idx: - * `system.html#366 <system.html#366>`_ - * `system.html#367 <system.html#367>`_ - * `system.html#368 <system.html#368>`_ - * `system.html#369 <system.html#369>`_ - * `system.html#370 <system.html#370>`_ - - `addFile`:idx: - * `zipfiles.html#105 <zipfiles.html#105>`_ - * `zipfiles.html#106 <zipfiles.html#106>`_ - * `zipfiles.html#107 <zipfiles.html#107>`_ - - `addQuitProc`:idx: - `system.html#402 <system.html#402>`_ - - `adler32`:idx: - `zlib.html#174 <zlib.html#174>`_ - - `AIO_ALLDONE`:idx: - `posix.html#207 <posix.html#207>`_ - - `aio_cancel`:idx: - `posix.html#784 <posix.html#784>`_ - - `AIO_CANCELED`:idx: - `posix.html#208 <posix.html#208>`_ - - `aio_error`:idx: - `posix.html#785 <posix.html#785>`_ - - `aio_fsync`:idx: - `posix.html#786 <posix.html#786>`_ - - `AIO_NOTCANCELED`:idx: - `posix.html#209 <posix.html#209>`_ - - `aio_read`:idx: - `posix.html#787 <posix.html#787>`_ - - `aio_return`:idx: - `posix.html#788 <posix.html#788>`_ - - `aio_suspend`:idx: - `posix.html#789 <posix.html#789>`_ - - `aio_write`:idx: - `posix.html#790 <posix.html#790>`_ - - `alarm`:idx: - `posix.html#967 <posix.html#967>`_ - - `alert`:idx: - `manual.html#131 <manual.html#131>`_ - - `allCharsInSet`:idx: - `strutils.html#137 <strutils.html#137>`_ - - `alloc`:idx: - `system.html#411 <system.html#411>`_ - - `alloc0`:idx: - `system.html#412 <system.html#412>`_ - - `ALT_DIGITS`:idx: - `posix.html#438 <posix.html#438>`_ - - `AltSep`:idx: - `os.html#104 <os.html#104>`_ - - `AM_STR`:idx: - `posix.html#394 <posix.html#394>`_ - - `and`:idx: - * `system.html#228 <system.html#228>`_ - * `system.html#229 <system.html#229>`_ - * `system.html#230 <system.html#230>`_ - * `system.html#231 <system.html#231>`_ - * `system.html#232 <system.html#232>`_ - * `system.html#320 <system.html#320>`_ - - `apostrophe`:idx: - `manual.html#129 <manual.html#129>`_ - - `AppendFileExt`:idx: - `os.html#131 <os.html#131>`_ - - `arccos`:idx: - `math.html#117 <math.html#117>`_ - - `arcsin`:idx: - `math.html#118 <math.html#118>`_ - - `arctan`:idx: - `math.html#119 <math.html#119>`_ - - `arctan2`:idx: - `math.html#120 <math.html#120>`_ - - `array`:idx: - `system.html#121 <system.html#121>`_ - - `Arrays`:idx: - `manual.html#153 <manual.html#153>`_ - - `asctime`:idx: - `posix.html#1092 <posix.html#1092>`_ - - `asctime_r`:idx: - `posix.html#1093 <posix.html#1093>`_ - - `assembler`:idx: - `manual.html#197 <manual.html#197>`_ - - `assert`:idx: - `system.html#416 <system.html#416>`_ - - `Automatic type conversion`:idx: - `manual.html#145 <manual.html#145>`_ - - `backslash`:idx: - * `manual.html#127 <manual.html#127>`_ - * `regexprs.html#101 <regexprs.html#101>`_ - - `backspace`:idx: - `manual.html#132 <manual.html#132>`_ - - `basename`:idx: - `posix.html#844 <posix.html#844>`_ - - `BiggestFloat`:idx: - `system.html#374 <system.html#374>`_ - - `BiggestInt`:idx: - `system.html#373 <system.html#373>`_ - - `block`:idx: - `manual.html#193 <manual.html#193>`_ - - `bool`:idx: - `system.html#109 <system.html#109>`_ - - `boolean`:idx: - `manual.html#147 <manual.html#147>`_ - - `break`:idx: - `manual.html#194 <manual.html#194>`_ - - `breakpoint`:idx: - `endb.html#103 <endb.html#103>`_ - - `bsd_signal`:idx: - `posix.html#1122 <posix.html#1122>`_ - - `Byte`:idx: - `system.html#125 <system.html#125>`_ - - `C`:idx: - `manual.html#136 <manual.html#136>`_ - - `calling conventions`:idx: - `manual.html#164 <manual.html#164>`_ - - `capitalize`:idx: - `strutils.html#110 <strutils.html#110>`_ - - `card`:idx: - `system.html#166 <system.html#166>`_ - - `carriage return`:idx: - `manual.html#122 <manual.html#122>`_ - - `case`:idx: - `manual.html#182 <manual.html#182>`_ - - `catclose`:idx: - `posix.html#1149 <posix.html#1149>`_ - - `catgets`:idx: - `posix.html#1150 <posix.html#1150>`_ - - `catopen`:idx: - `posix.html#1151 <posix.html#1151>`_ - - `cchar`:idx: - `system.html#375 <system.html#375>`_ - - `cdecl`:idx: - `manual.html#166 <manual.html#166>`_ - - `cdouble`:idx: - `system.html#382 <system.html#382>`_ - - `cfloat`:idx: - `system.html#381 <system.html#381>`_ - - `ChangeFileExt`:idx: - `os.html#132 <os.html#132>`_ - - `char`:idx: - `system.html#110 <system.html#110>`_ - - `character type`:idx: - `manual.html#148 <manual.html#148>`_ - - `character with decimal value d`:idx: - `manual.html#130 <manual.html#130>`_ - - `character with hex value HH`:idx: - `manual.html#135 <manual.html#135>`_ - - `chdir`:idx: - `posix.html#968 <posix.html#968>`_ - - `checked runtime error`:idx: - `manual.html#110 <manual.html#110>`_ - - `chmod`:idx: - `posix.html#1058 <posix.html#1058>`_ - - `ChooseDir`:idx: - `dialogs.html#108 <dialogs.html#108>`_ - - `ChooseFilesToOpen`:idx: - `dialogs.html#106 <dialogs.html#106>`_ - - `ChooseFileToOpen`:idx: - `dialogs.html#105 <dialogs.html#105>`_ - - `ChooseFileToSave`:idx: - `dialogs.html#107 <dialogs.html#107>`_ - - `chown`:idx: - `posix.html#969 <posix.html#969>`_ - - `chr`:idx: - `system.html#168 <system.html#168>`_ - - `cint`:idx: - `system.html#378 <system.html#378>`_ - - `C_IRGRP`:idx: - `posix.html#104 <posix.html#104>`_ - - `C_IROTH`:idx: - `posix.html#107 <posix.html#107>`_ - - `C_IRUSR`:idx: - `posix.html#101 <posix.html#101>`_ - - `C_ISBLK`:idx: - `posix.html#116 <posix.html#116>`_ - - `C_ISCHR`:idx: - `posix.html#117 <posix.html#117>`_ - - `C_ISCTG`:idx: - `posix.html#118 <posix.html#118>`_ - - `C_ISDIR`:idx: - `posix.html#113 <posix.html#113>`_ - - `C_ISFIFO`:idx: - `posix.html#114 <posix.html#114>`_ - - `C_ISGID`:idx: - `posix.html#111 <posix.html#111>`_ - - `C_ISLNK`:idx: - `posix.html#119 <posix.html#119>`_ - - `C_ISREG`:idx: - `posix.html#115 <posix.html#115>`_ - - `C_ISSOCK`:idx: - `posix.html#120 <posix.html#120>`_ - - `C_ISUID`:idx: - `posix.html#110 <posix.html#110>`_ - - `C_ISVTX`:idx: - `posix.html#112 <posix.html#112>`_ - - `C_IWGRP`:idx: - `posix.html#105 <posix.html#105>`_ - - `C_IWOTH`:idx: - `posix.html#108 <posix.html#108>`_ - - `C_IWUSR`:idx: - `posix.html#102 <posix.html#102>`_ - - `C_IXGRP`:idx: - `posix.html#106 <posix.html#106>`_ - - `C_IXOTH`:idx: - `posix.html#109 <posix.html#109>`_ - - `C_IXUSR`:idx: - `posix.html#103 <posix.html#103>`_ - - `classify`:idx: - `math.html#104 <math.html#104>`_ - - `clock`:idx: - `posix.html#1094 <posix.html#1094>`_ - - `clock_getcpuclockid`:idx: - `posix.html#1095 <posix.html#1095>`_ - - `clock_getres`:idx: - `posix.html#1096 <posix.html#1096>`_ - - `clock_gettime`:idx: - `posix.html#1097 <posix.html#1097>`_ - - `CLOCK_MONOTONIC`:idx: - `posix.html#700 <posix.html#700>`_ - - `clock_nanosleep`:idx: - `posix.html#1098 <posix.html#1098>`_ - - `CLOCK_PROCESS_CPUTIME_ID`:idx: - `posix.html#696 <posix.html#696>`_ - - `CLOCK_REALTIME`:idx: - `posix.html#698 <posix.html#698>`_ - - `clock_settime`:idx: - `posix.html#1099 <posix.html#1099>`_ - - `CLOCKS_PER_SEC`:idx: - `posix.html#695 <posix.html#695>`_ - - `CLOCK_THREAD_CPUTIME_ID`:idx: - `posix.html#697 <posix.html#697>`_ - - `clong`:idx: - `system.html#379 <system.html#379>`_ - - `clongdouble`:idx: - `system.html#383 <system.html#383>`_ - - `clonglong`:idx: - `system.html#380 <system.html#380>`_ - - `close`:idx: - * `lexbase.html#105 <lexbase.html#105>`_ - * `parsecfg.html#105 <parsecfg.html#105>`_ - * `posix.html#970 <posix.html#970>`_ - * `zipfiles.html#103 <zipfiles.html#103>`_ - - `closedir`:idx: - `posix.html#800 <posix.html#800>`_ - - `CloseFile`:idx: - `system.html#484 <system.html#484>`_ - - `closure`:idx: - `manual.html#171 <manual.html#171>`_ - - `cmp`:idx: - * `system.html#359 <system.html#359>`_ - * `system.html#360 <system.html#360>`_ - - `cmpIgnoreCase`:idx: - `strutils.html#122 <strutils.html#122>`_ - - `cmpIgnoreStyle`:idx: - `strutils.html#123 <strutils.html#123>`_ - - `cmpPaths`:idx: - `os.html#130 <os.html#130>`_ - - `CODESET`:idx: - `posix.html#389 <posix.html#389>`_ - - `comment pieces`:idx: - `manual.html#115 <manual.html#115>`_ - - `Comments`:idx: - `manual.html#114 <manual.html#114>`_ - - `CompileDate`:idx: - `system.html#391 <system.html#391>`_ - - `CompileTime`:idx: - `system.html#392 <system.html#392>`_ - - `complex statements`:idx: - `manual.html#176 <manual.html#176>`_ - - `compress`:idx: - `zlib.html#154 <zlib.html#154>`_ - - `compress2`:idx: - `zlib.html#155 <zlib.html#155>`_ - - `confstr`:idx: - `posix.html#971 <posix.html#971>`_ - - `const`:idx: - `manual.html#180 <manual.html#180>`_ - - `constant expressions`:idx: - `manual.html#108 <manual.html#108>`_ - - `Constants`:idx: - `manual.html#140 <manual.html#140>`_ - - `constZIP_SOURCE_FREE`:idx: - `libzip.html#169 <libzip.html#169>`_ - - `continue`:idx: - `manual.html#196 <manual.html#196>`_ - - `copy`:idx: - * `system.html#403 <system.html#403>`_ - * `system.html#404 <system.html#404>`_ - - `copyFile`:idx: - `os.html#134 <os.html#134>`_ - - `copyMem`:idx: - `system.html#408 <system.html#408>`_ - - `cos`:idx: - `math.html#121 <math.html#121>`_ - - `cosh`:idx: - `math.html#122 <math.html#122>`_ - - `countBits`:idx: - `math.html#107 <math.html#107>`_ - - `countdown`:idx: - `system.html#436 <system.html#436>`_ - - `countup`:idx: - `system.html#437 <system.html#437>`_ - - `cpuEndian`:idx: - `system.html#397 <system.html#397>`_ - - `crc32`:idx: - `zlib.html#175 <zlib.html#175>`_ - - `creat`:idx: - `posix.html#811 <posix.html#811>`_ - - `createDir`:idx: - * `os.html#138 <os.html#138>`_ - * `zipfiles.html#104 <zipfiles.html#104>`_ - - `CRNCYSTR`:idx: - `posix.html#443 <posix.html#443>`_ - - `crypt`:idx: - `posix.html#972 <posix.html#972>`_ - - `cschar`:idx: - `system.html#376 <system.html#376>`_ - - `cshort`:idx: - `system.html#377 <system.html#377>`_ - - `cSIG_HOLD`:idx: - `posix.html#721 <posix.html#721>`_ - - `CS_PATH`:idx: - `posix.html#482 <posix.html#482>`_ - - `CS_POSIX_V6_ILP32_OFF32_CFLAGS`:idx: - `posix.html#483 <posix.html#483>`_ - - `CS_POSIX_V6_ILP32_OFF32_LDFLAGS`:idx: - `posix.html#484 <posix.html#484>`_ - - `CS_POSIX_V6_ILP32_OFF32_LIBS`:idx: - `posix.html#485 <posix.html#485>`_ - - `CS_POSIX_V6_ILP32_OFFBIG_CFLAGS`:idx: - `posix.html#486 <posix.html#486>`_ - - `CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS`:idx: - `posix.html#487 <posix.html#487>`_ - - `CS_POSIX_V6_ILP32_OFFBIG_LIBS`:idx: - `posix.html#488 <posix.html#488>`_ - - `CS_POSIX_V6_LP64_OFF64_CFLAGS`:idx: - `posix.html#489 <posix.html#489>`_ - - `CS_POSIX_V6_LP64_OFF64_LDFLAGS`:idx: - `posix.html#490 <posix.html#490>`_ - - `CS_POSIX_V6_LP64_OFF64_LIBS`:idx: - `posix.html#491 <posix.html#491>`_ - - `CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS`:idx: - `posix.html#492 <posix.html#492>`_ - - `CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS`:idx: - `posix.html#493 <posix.html#493>`_ - - `CS_POSIX_V6_LPBIG_OFFBIG_LIBS`:idx: - `posix.html#494 <posix.html#494>`_ - - `CS_POSIX_V6_WIDTH_RESTRICTED_ENVS`:idx: - `posix.html#495 <posix.html#495>`_ - - `cstring`:idx: - `system.html#112 <system.html#112>`_ - - `cstringArray`:idx: - `system.html#384 <system.html#384>`_ - - `ctermid`:idx: - `posix.html#973 <posix.html#973>`_ - - `ctime`:idx: - `posix.html#1100 <posix.html#1100>`_ - - `ctime_r`:idx: - `posix.html#1101 <posix.html#1101>`_ - - `CurDir`:idx: - `os.html#101 <os.html#101>`_ - - `dangling else problem`:idx: - `manual.html#177 <manual.html#177>`_ - - `DAY_1`:idx: - `posix.html#396 <posix.html#396>`_ - - `DAY_2`:idx: - `posix.html#397 <posix.html#397>`_ - - `DAY_3`:idx: - `posix.html#398 <posix.html#398>`_ - - `DAY_4`:idx: - `posix.html#399 <posix.html#399>`_ - - `DAY_5`:idx: - `posix.html#400 <posix.html#400>`_ - - `DAY_6`:idx: - `posix.html#401 <posix.html#401>`_ - - `DAY_7`:idx: - `posix.html#402 <posix.html#402>`_ - - `daylight`:idx: - `posix.html#701 <posix.html#701>`_ - - `dbgLineHook`:idx: - `system.html#432 <system.html#432>`_ - - `dealloc`:idx: - `system.html#414 <system.html#414>`_ - - `debugger`:idx: - `nimrodc.html#111 <nimrodc.html#111>`_ - - `dec`:idx: - `system.html#157 <system.html#157>`_ - - `define`:idx: - `manual.html#223 <manual.html#223>`_ - - `defined`:idx: - `system.html#114 <system.html#114>`_ - - `deflate`:idx: - `zlib.html#143 <zlib.html#143>`_ - - `deflateCopy`:idx: - `zlib.html#148 <zlib.html#148>`_ - - `deflateEnd`:idx: - `zlib.html#144 <zlib.html#144>`_ - - `deflateInit`:idx: - `zlib.html#178 <zlib.html#178>`_ - - `deflateInit2`:idx: - `zlib.html#182 <zlib.html#182>`_ - - `deflateInit2u`:idx: - `zlib.html#180 <zlib.html#180>`_ - - `deflateInitu`:idx: - `zlib.html#176 <zlib.html#176>`_ - - `deflateParams`:idx: - `zlib.html#150 <zlib.html#150>`_ - - `deflateReset`:idx: - `zlib.html#149 <zlib.html#149>`_ - - `deflateSetDictionary`:idx: - `zlib.html#147 <zlib.html#147>`_ - - `deleteStr`:idx: - `strutils.html#116 <strutils.html#116>`_ - - `D_FMT`:idx: - `posix.html#391 <posix.html#391>`_ - - `difftime`:idx: - `posix.html#1102 <posix.html#1102>`_ - - `dirname`:idx: - `posix.html#845 <posix.html#845>`_ - - `DirSep`:idx: - `os.html#103 <os.html#103>`_ - - `discard`:idx: - `manual.html#178 <manual.html#178>`_ - - `div`:idx: - * `system.html#208 <system.html#208>`_ - * `system.html#209 <system.html#209>`_ - * `system.html#210 <system.html#210>`_ - * `system.html#211 <system.html#211>`_ - * `system.html#212 <system.html#212>`_ - - `dlclose`:idx: - `posix.html#807 <posix.html#807>`_ - - `dlerror`:idx: - `posix.html#808 <posix.html#808>`_ - - `dlopen`:idx: - `posix.html#809 <posix.html#809>`_ - - `dlsym`:idx: - `posix.html#810 <posix.html#810>`_ - - `dom`:idx: - `nimrodc.html#120 <nimrodc.html#120>`_ - - `domain specific languages`:idx: - `manual.html#212 <manual.html#212>`_ - - `D_T_FMT`:idx: - `posix.html#390 <posix.html#390>`_ - - `dup`:idx: - `posix.html#974 <posix.html#974>`_ - - `dup2`:idx: - `posix.html#975 <posix.html#975>`_ - - `dynamic type`:idx: - `manual.html#104 <manual.html#104>`_ - - `dynlib`:idx: - `nimrodc.html#103 <nimrodc.html#103>`_ - - `E`:idx: - `math.html#102 <math.html#102>`_ - - `E2BIG`:idx: - `posix.html#220 <posix.html#220>`_ - - `EACCES`:idx: - `posix.html#221 <posix.html#221>`_ - - `EAccessViolation`:idx: - `system.html#140 <system.html#140>`_ - - `EADDRINUSE`:idx: - `posix.html#222 <posix.html#222>`_ - - `EADDRNOTAVAIL`:idx: - `posix.html#223 <posix.html#223>`_ - - `EAFNOSUPPORT`:idx: - `posix.html#224 <posix.html#224>`_ - - `EAGAIN`:idx: - `posix.html#225 <posix.html#225>`_ - - `EALREADY`:idx: - `posix.html#226 <posix.html#226>`_ - - `EArithmetic`:idx: - `system.html#137 <system.html#137>`_ - - `EAssertionFailed`:idx: - `system.html#141 <system.html#141>`_ - - `EAsynch`:idx: - `system.html#131 <system.html#131>`_ - - `EBADF`:idx: - `posix.html#227 <posix.html#227>`_ - - `EBADMSG`:idx: - `posix.html#228 <posix.html#228>`_ - - `E_Base`:idx: - `system.html#130 <system.html#130>`_ - - `EBUSY`:idx: - `posix.html#229 <posix.html#229>`_ - - `ECANCELED`:idx: - `posix.html#230 <posix.html#230>`_ - - `ECHILD`:idx: - `posix.html#231 <posix.html#231>`_ - - `echo`:idx: - `system.html#471 <system.html#471>`_ - - `ECMAScript`:idx: - `nimrodc.html#115 <nimrodc.html#115>`_ - - `ECONNABORTED`:idx: - `posix.html#232 <posix.html#232>`_ - - `ECONNREFUSED`:idx: - `posix.html#233 <posix.html#233>`_ - - `ECONNRESET`:idx: - `posix.html#234 <posix.html#234>`_ - - `EControlC`:idx: - `system.html#142 <system.html#142>`_ - - `EDEADLK`:idx: - `posix.html#235 <posix.html#235>`_ - - `EDESTADDRREQ`:idx: - `posix.html#236 <posix.html#236>`_ - - `editDistance`:idx: - `strutils.html#142 <strutils.html#142>`_ - - `EDivByZero`:idx: - `system.html#138 <system.html#138>`_ - - `EDOM`:idx: - `posix.html#237 <posix.html#237>`_ - - `EDQUOT`:idx: - `posix.html#238 <posix.html#238>`_ - - `EEXIST`:idx: - `posix.html#239 <posix.html#239>`_ - - `EFAULT`:idx: - `posix.html#240 <posix.html#240>`_ - - `EFBIG`:idx: - `posix.html#241 <posix.html#241>`_ - - `EHOSTUNREACH`:idx: - `posix.html#242 <posix.html#242>`_ - - `EIDRM`:idx: - `posix.html#243 <posix.html#243>`_ - - `EILSEQ`:idx: - `posix.html#244 <posix.html#244>`_ - - `EINPROGRESS`:idx: - `posix.html#245 <posix.html#245>`_ - - `EINTR`:idx: - `posix.html#246 <posix.html#246>`_ - - `EINVAL`:idx: - `posix.html#247 <posix.html#247>`_ - - `EInvalidField`:idx: - `system.html#146 <system.html#146>`_ - - `EInvalidIndex`:idx: - `system.html#145 <system.html#145>`_ - - `EInvalidObjectAssignment`:idx: - `system.html#150 <system.html#150>`_ - - `EInvalidObjectConversion`:idx: - `system.html#151 <system.html#151>`_ - - `EInvalidRegEx`:idx: - `regexprs.html#104 <regexprs.html#104>`_ - - `EInvalidValue`:idx: - `system.html#143 <system.html#143>`_ - - `EIO`:idx: - * `system.html#134 <system.html#134>`_ - * `posix.html#248 <posix.html#248>`_ - - `EISCONN`:idx: - `posix.html#249 <posix.html#249>`_ - - `EISDIR`:idx: - `posix.html#250 <posix.html#250>`_ - - `ELOOP`:idx: - `posix.html#251 <posix.html#251>`_ - - `Embedded Nimrod Debugger`:idx: - `endb.html#101 <endb.html#101>`_ - - `EMFILE`:idx: - `posix.html#252 <posix.html#252>`_ - - `EMLINK`:idx: - `posix.html#253 <posix.html#253>`_ - - `EMSGSIZE`:idx: - `posix.html#254 <posix.html#254>`_ - - `EMULTIHOP`:idx: - `posix.html#255 <posix.html#255>`_ - - `ENAMETOOLONG`:idx: - `posix.html#256 <posix.html#256>`_ - - `encrypt`:idx: - `posix.html#976 <posix.html#976>`_ - - `ENDB`:idx: - `endb.html#102 <endb.html#102>`_ - - `endgrent`:idx: - `posix.html#838 <posix.html#838>`_ - - `EndOfFile`:idx: - * `system.html#485 <system.html#485>`_ - * `lexbase.html#101 <lexbase.html#101>`_ - - `endpwent`:idx: - `posix.html#863 <posix.html#863>`_ - - `endsWith`:idx: - `strutils.html#136 <strutils.html#136>`_ - - `ENETDOWN`:idx: - `posix.html#257 <posix.html#257>`_ - - `ENETRESET`:idx: - `posix.html#258 <posix.html#258>`_ - - `ENETUNREACH`:idx: - `posix.html#259 <posix.html#259>`_ - - `ENFILE`:idx: - `posix.html#260 <posix.html#260>`_ - - `ENOBUFS`:idx: - `posix.html#261 <posix.html#261>`_ - - `ENODATA`:idx: - `posix.html#262 <posix.html#262>`_ - - `ENODEV`:idx: - `posix.html#263 <posix.html#263>`_ - - `ENOENT`:idx: - `posix.html#264 <posix.html#264>`_ - - `ENoExceptionToReraise`:idx: - * `manual.html#185 <manual.html#185>`_ - * `system.html#149 <system.html#149>`_ - - `ENOEXEC`:idx: - `posix.html#265 <posix.html#265>`_ - - `ENOLCK`:idx: - `posix.html#266 <posix.html#266>`_ - - `ENOLINK`:idx: - `posix.html#267 <posix.html#267>`_ - - `ENOMEM`:idx: - `posix.html#268 <posix.html#268>`_ - - `ENOMSG`:idx: - `posix.html#269 <posix.html#269>`_ - - `ENOPROTOOPT`:idx: - `posix.html#270 <posix.html#270>`_ - - `ENOSPC`:idx: - `posix.html#271 <posix.html#271>`_ - - `ENOSR`:idx: - `posix.html#272 <posix.html#272>`_ - - `ENOSTR`:idx: - `posix.html#273 <posix.html#273>`_ - - `ENOSYS`:idx: - `posix.html#274 <posix.html#274>`_ - - `ENOTCONN`:idx: - `posix.html#275 <posix.html#275>`_ - - `ENOTDIR`:idx: - `posix.html#276 <posix.html#276>`_ - - `ENOTEMPTY`:idx: - `posix.html#277 <posix.html#277>`_ - - `ENOTSOCK`:idx: - `posix.html#278 <posix.html#278>`_ - - `ENOTSUP`:idx: - `posix.html#279 <posix.html#279>`_ - - `ENOTTY`:idx: - `posix.html#280 <posix.html#280>`_ - - `Enumeration`:idx: - `manual.html#149 <manual.html#149>`_ - - `ENXIO`:idx: - `posix.html#281 <posix.html#281>`_ - - `EOPNOTSUPP`:idx: - `posix.html#282 <posix.html#282>`_ - - `EOS`:idx: - `system.html#135 <system.html#135>`_ - - `EOutOfMemory`:idx: - `system.html#144 <system.html#144>`_ - - `EOutOfRange`:idx: - * `manual.html#146 <manual.html#146>`_ - * `system.html#147 <system.html#147>`_ - - `EOVERFLOW`:idx: - `posix.html#283 <posix.html#283>`_ - - `EOverflow`:idx: - `system.html#139 <system.html#139>`_ - - `EPERM`:idx: - `posix.html#284 <posix.html#284>`_ - - `EPIPE`:idx: - `posix.html#285 <posix.html#285>`_ - - `EPROTO`:idx: - `posix.html#286 <posix.html#286>`_ - - `EPROTONOSUPPORT`:idx: - `posix.html#287 <posix.html#287>`_ - - `EPROTOTYPE`:idx: - `posix.html#288 <posix.html#288>`_ - - `equalMem`:idx: - `system.html#410 <system.html#410>`_ - - `ERA`:idx: - `posix.html#434 <posix.html#434>`_ - - `ERA_D_FMT`:idx: - `posix.html#435 <posix.html#435>`_ - - `ERA_D_T_FMT`:idx: - `posix.html#436 <posix.html#436>`_ - - `ERANGE`:idx: - `posix.html#289 <posix.html#289>`_ - - `ERA_T_FMT`:idx: - `posix.html#437 <posix.html#437>`_ - - `ERessourceExhausted`:idx: - `system.html#136 <system.html#136>`_ - - `EROFS`:idx: - `posix.html#290 <posix.html#290>`_ - - `errno`:idx: - `posix.html#219 <posix.html#219>`_ - - `error`:idx: - * `manual.html#222 <manual.html#222>`_ - * `manual.html#225 <manual.html#225>`_ - * `dialogs.html#104 <dialogs.html#104>`_ - - `errorStr`:idx: - `parsecfg.html#110 <parsecfg.html#110>`_ - - `escape`:idx: - * `manual.html#133 <manual.html#133>`_ - * `strutils.html#141 <strutils.html#141>`_ - - `escape sequences`:idx: - `manual.html#120 <manual.html#120>`_ - - `ESPIPE`:idx: - `posix.html#291 <posix.html#291>`_ - - `ESRCH`:idx: - `posix.html#292 <posix.html#292>`_ - - `EStackOverflow`:idx: - `system.html#148 <system.html#148>`_ - - `ESTALE`:idx: - `posix.html#293 <posix.html#293>`_ - - `ESynch`:idx: - `system.html#132 <system.html#132>`_ - - `ESystem`:idx: - `system.html#133 <system.html#133>`_ - - `ETIME`:idx: - `posix.html#294 <posix.html#294>`_ - - `ETIMEDOUT`:idx: - `posix.html#295 <posix.html#295>`_ - - `ETXTBSY`:idx: - `posix.html#296 <posix.html#296>`_ - - `EWOULDBLOCK`:idx: - `posix.html#297 <posix.html#297>`_ - - `except`:idx: - `manual.html#188 <manual.html#188>`_ - - `exception handlers`:idx: - `manual.html#187 <manual.html#187>`_ - - `excl`:idx: - `system.html#165 <system.html#165>`_ - - `EXDEV`:idx: - `posix.html#298 <posix.html#298>`_ - - `execl`:idx: - `posix.html#977 <posix.html#977>`_ - - `execle`:idx: - `posix.html#978 <posix.html#978>`_ - - `execlp`:idx: - `posix.html#979 <posix.html#979>`_ - - `executeShellCommand`:idx: - `os.html#133 <os.html#133>`_ - - `execv`:idx: - `posix.html#980 <posix.html#980>`_ - - `execve`:idx: - `posix.html#981 <posix.html#981>`_ - - `execvp`:idx: - `posix.html#982 <posix.html#982>`_ - - `ExeExt`:idx: - `os.html#107 <os.html#107>`_ - - `existsDir`:idx: - `os.html#139 <os.html#139>`_ - - `existsEnv`:idx: - `os.html#144 <os.html#144>`_ - - `ExistsFile`:idx: - `os.html#117 <os.html#117>`_ - - `exp`:idx: - `math.html#114 <math.html#114>`_ - - `expandFilename`:idx: - `os.html#116 <os.html#116>`_ - - `exportc`:idx: - `nimrodc.html#102 <nimrodc.html#102>`_ - - `extractDir`:idx: - `os.html#126 <os.html#126>`_ - - `extractFileExt`:idx: - `os.html#128 <os.html#128>`_ - - `extractFilename`:idx: - `os.html#127 <os.html#127>`_ - - `extractFileTrunk`:idx: - `os.html#129 <os.html#129>`_ - - `ExtSep`:idx: - `os.html#109 <os.html#109>`_ - - `fastcall`:idx: - `manual.html#169 <manual.html#169>`_ - - `fatal`:idx: - `manual.html#226 <manual.html#226>`_ - - `fchdir`:idx: - `posix.html#984 <posix.html#984>`_ - - `fchmod`:idx: - `posix.html#1059 <posix.html#1059>`_ - - `fchown`:idx: - `posix.html#983 <posix.html#983>`_ - - `fcntl`:idx: - `posix.html#812 <posix.html#812>`_ - - `fdatasync`:idx: - `posix.html#985 <posix.html#985>`_ - - `FD_CLOEXEC`:idx: - `posix.html#309 <posix.html#309>`_ - - `FD_CLR`:idx: - `posix.html#1161 <posix.html#1161>`_ - - `FD_ISSET`:idx: - `posix.html#1162 <posix.html#1162>`_ - - `FD_SET`:idx: - `posix.html#1163 <posix.html#1163>`_ - - `FD_SETSIZE`:idx: - `posix.html#774 <posix.html#774>`_ - - `F_DUPFD`:idx: - `posix.html#299 <posix.html#299>`_ - - `FD_ZERO`:idx: - `posix.html#1164 <posix.html#1164>`_ - - `FE_ALL_EXCEPT`:idx: - `posix.html#337 <posix.html#337>`_ - - `feclearexcept`:idx: - `posix.html#816 <posix.html#816>`_ - - `FE_DFL_ENV`:idx: - `posix.html#342 <posix.html#342>`_ - - `FE_DIVBYZERO`:idx: - `posix.html#332 <posix.html#332>`_ - - `FE_DOWNWARD`:idx: - `posix.html#338 <posix.html#338>`_ - - `fegetenv`:idx: - `posix.html#823 <posix.html#823>`_ - - `fegetexceptflag`:idx: - `posix.html#817 <posix.html#817>`_ - - `fegetround`:idx: - `posix.html#821 <posix.html#821>`_ - - `feholdexcept`:idx: - `posix.html#824 <posix.html#824>`_ - - `FE_INEXACT`:idx: - `posix.html#333 <posix.html#333>`_ - - `FE_INVALID`:idx: - `posix.html#334 <posix.html#334>`_ - - `FE_OVERFLOW`:idx: - `posix.html#335 <posix.html#335>`_ - - `feraiseexcept`:idx: - `posix.html#818 <posix.html#818>`_ - - `fesetenv`:idx: - `posix.html#825 <posix.html#825>`_ - - `fesetexceptflag`:idx: - `posix.html#819 <posix.html#819>`_ - - `fesetround`:idx: - `posix.html#822 <posix.html#822>`_ - - `fetestexcept`:idx: - `posix.html#820 <posix.html#820>`_ - - `FE_TONEAREST`:idx: - `posix.html#339 <posix.html#339>`_ - - `FE_TOWARDZERO`:idx: - `posix.html#340 <posix.html#340>`_ - - `FE_UNDERFLOW`:idx: - `posix.html#336 <posix.html#336>`_ - - `feupdateenv`:idx: - `posix.html#826 <posix.html#826>`_ - - `FE_UPWARD`:idx: - `posix.html#341 <posix.html#341>`_ - - `F_GETFD`:idx: - `posix.html#300 <posix.html#300>`_ - - `F_GETFL`:idx: - `posix.html#302 <posix.html#302>`_ - - `F_GETLK`:idx: - `posix.html#304 <posix.html#304>`_ - - `F_GETOWN`:idx: - `posix.html#307 <posix.html#307>`_ - - `fileHandle`:idx: - `system.html#509 <system.html#509>`_ - - `fileNewer`:idx: - `os.html#141 <os.html#141>`_ - - `FileSystemCaseSensitive`:idx: - `os.html#106 <os.html#106>`_ - - `finally`:idx: - `manual.html#189 <manual.html#189>`_ - - `find`:idx: - * `system.html#456 <system.html#456>`_ - * `regexprs.html#109 <regexprs.html#109>`_ - * `regexprs.html#110 <regexprs.html#110>`_ - - `findSubStr`:idx: - * `strutils.html#112 <strutils.html#112>`_ - * `strutils.html#113 <strutils.html#113>`_ - - `float`:idx: - `system.html#106 <system.html#106>`_ - - `float32`:idx: - `system.html#107 <system.html#107>`_ - - `float64`:idx: - `system.html#108 <system.html#108>`_ - - `F_LOCK`:idx: - `posix.html#496 <posix.html#496>`_ - - `FlushFile`:idx: - `system.html#487 <system.html#487>`_ - - `fmtmsg`:idx: - `posix.html#827 <posix.html#827>`_ - - `fnmatch`:idx: - `posix.html#828 <posix.html#828>`_ - - `FNM_NOESCAPE`:idx: - `posix.html#365 <posix.html#365>`_ - - `FNM_NOMATCH`:idx: - `posix.html#362 <posix.html#362>`_ - - `FNM_NOSYS`:idx: - `posix.html#366 <posix.html#366>`_ - - `FNM_PATHNAME`:idx: - `posix.html#363 <posix.html#363>`_ - - `FNM_PERIOD`:idx: - `posix.html#364 <posix.html#364>`_ - - `F_OK`:idx: - `posix.html#478 <posix.html#478>`_ - - `for`:idx: - `manual.html#204 <manual.html#204>`_ - - `fork`:idx: - `posix.html#986 <posix.html#986>`_ - - `form feed`:idx: - `manual.html#124 <manual.html#124>`_ - - `forward`:idx: - `manual.html#201 <manual.html#201>`_ - - `fpathconf`:idx: - `posix.html#987 <posix.html#987>`_ - - `F_RDLCK`:idx: - `posix.html#310 <posix.html#310>`_ - - `FreeEnvironmentStringsA`:idx: - `os.html#151 <os.html#151>`_ - - `frexp`:idx: - `math.html#115 <math.html#115>`_ - - `F_SETFD`:idx: - `posix.html#301 <posix.html#301>`_ - - `F_SETFL`:idx: - `posix.html#303 <posix.html#303>`_ - - `F_SETLK`:idx: - `posix.html#305 <posix.html#305>`_ - - `F_SETLKW`:idx: - `posix.html#306 <posix.html#306>`_ - - `F_SETOWN`:idx: - `posix.html#308 <posix.html#308>`_ - - `fstat`:idx: - `posix.html#1060 <posix.html#1060>`_ - - `fstatvfs`:idx: - `posix.html#1057 <posix.html#1057>`_ - - `fsync`:idx: - `posix.html#988 <posix.html#988>`_ - - `F_TEST`:idx: - `posix.html#497 <posix.html#497>`_ - - `F_TLOCK`:idx: - `posix.html#498 <posix.html#498>`_ - - `ftok`:idx: - `posix.html#1055 <posix.html#1055>`_ - - `ftruncate`:idx: - `posix.html#989 <posix.html#989>`_ - - `ftw`:idx: - `posix.html#829 <posix.html#829>`_ - - `FTW_CHDIR`:idx: - `posix.html#377 <posix.html#377>`_ - - `FTW_D`:idx: - `posix.html#368 <posix.html#368>`_ - - `FTW_DEPTH`:idx: - `posix.html#376 <posix.html#376>`_ - - `FTW_DNR`:idx: - `posix.html#369 <posix.html#369>`_ - - `FTW_DP`:idx: - `posix.html#370 <posix.html#370>`_ - - `FTW_F`:idx: - `posix.html#367 <posix.html#367>`_ - - `FTW_MOUNT`:idx: - `posix.html#375 <posix.html#375>`_ - - `FTW_NS`:idx: - `posix.html#371 <posix.html#371>`_ - - `FTW_PHYS`:idx: - `posix.html#374 <posix.html#374>`_ - - `FTW_SL`:idx: - `posix.html#372 <posix.html#372>`_ - - `FTW_SLN`:idx: - `posix.html#373 <posix.html#373>`_ - - `F_ULOCK`:idx: - `posix.html#499 <posix.html#499>`_ - - `functional`:idx: - `manual.html#163 <manual.html#163>`_ - - `F_UNLCK`:idx: - `posix.html#311 <posix.html#311>`_ - - `funtions`:idx: - `manual.html#199 <manual.html#199>`_ - - `F_WRLCK`:idx: - `posix.html#312 <posix.html#312>`_ - - `GC_disable`:idx: - `system.html#457 <system.html#457>`_ - - `GC_disableMarkAndSweep`:idx: - `system.html#463 <system.html#463>`_ - - `GC_enable`:idx: - `system.html#458 <system.html#458>`_ - - `GC_enableMarkAndSweep`:idx: - `system.html#462 <system.html#462>`_ - - `GC_fullCollect`:idx: - `system.html#459 <system.html#459>`_ - - `GC_getStatistics`:idx: - `system.html#464 <system.html#464>`_ - - `GC_ref`:idx: - * `system.html#465 <system.html#465>`_ - * `system.html#466 <system.html#466>`_ - * `system.html#467 <system.html#467>`_ - - `GC_setStrategy`:idx: - `system.html#461 <system.html#461>`_ - - `GC_unref`:idx: - * `system.html#468 <system.html#468>`_ - * `system.html#469 <system.html#469>`_ - * `system.html#470 <system.html#470>`_ - - `generic character types`:idx: - `regexprs.html#102 <regexprs.html#102>`_ - - `Generics`:idx: - `manual.html#208 <manual.html#208>`_ - - `getApplicationDir`:idx: - `os.html#110 <os.html#110>`_ - - `getApplicationFilename`:idx: - `os.html#111 <os.html#111>`_ - - `getClockStr`:idx: - `times.html#112 <times.html#112>`_ - - `getColNumber`:idx: - `lexbase.html#107 <lexbase.html#107>`_ - - `getColumn`:idx: - `parsecfg.html#107 <parsecfg.html#107>`_ - - `getConfigDir`:idx: - `os.html#115 <os.html#115>`_ - - `getcontext`:idx: - `posix.html#1188 <posix.html#1188>`_ - - `get_crc_table`:idx: - `zlib.html#186 <zlib.html#186>`_ - - `getCurrentDir`:idx: - `os.html#112 <os.html#112>`_ - - `getCurrentExceptionMsg`:idx: - `system.html#428 <system.html#428>`_ - - `getCurrentLine`:idx: - `lexbase.html#106 <lexbase.html#106>`_ - - `getcwd`:idx: - `posix.html#990 <posix.html#990>`_ - - `getdate`:idx: - `posix.html#1103 <posix.html#1103>`_ - - `getDateStr`:idx: - `times.html#111 <times.html#111>`_ - - `getegid`:idx: - `posix.html#991 <posix.html#991>`_ - - `getEnv`:idx: - `os.html#143 <os.html#143>`_ - - `GetEnvironmentStringsA`:idx: - `os.html#150 <os.html#150>`_ - - `geteuid`:idx: - `posix.html#992 <posix.html#992>`_ - - `getFilename`:idx: - `parsecfg.html#109 <parsecfg.html#109>`_ - - `getFilePos`:idx: - `system.html#507 <system.html#507>`_ - - `getFileSize`:idx: - `system.html#499 <system.html#499>`_ - - `getFreeMem`:idx: - `system.html#434 <system.html#434>`_ - - `getgid`:idx: - `posix.html#993 <posix.html#993>`_ - - `getGMTime`:idx: - `times.html#107 <times.html#107>`_ - - `getgrent`:idx: - `posix.html#837 <posix.html#837>`_ - - `getgrgid`:idx: - `posix.html#833 <posix.html#833>`_ - - `getgrgid_r`:idx: - `posix.html#835 <posix.html#835>`_ - - `getgrnam`:idx: - `posix.html#834 <posix.html#834>`_ - - `getgrnam_r`:idx: - `posix.html#836 <posix.html#836>`_ - - `getgroups`:idx: - `posix.html#994 <posix.html#994>`_ - - `getHomeDir`:idx: - `os.html#114 <os.html#114>`_ - - `gethostid`:idx: - `posix.html#995 <posix.html#995>`_ - - `gethostname`:idx: - `posix.html#996 <posix.html#996>`_ - - `getLastModificationTime`:idx: - `os.html#140 <os.html#140>`_ - - `getLine`:idx: - `parsecfg.html#108 <parsecfg.html#108>`_ - - `getLocalTime`:idx: - `times.html#106 <times.html#106>`_ - - `getlogin`:idx: - `posix.html#997 <posix.html#997>`_ - - `getlogin_r`:idx: - `posix.html#998 <posix.html#998>`_ - - `getOccupiedMem`:idx: - `system.html#433 <system.html#433>`_ - - `getopt`:idx: - * `parseopt.html#106 <parseopt.html#106>`_ - * `posix.html#999 <posix.html#999>`_ - - `getpgid`:idx: - `posix.html#1000 <posix.html#1000>`_ - - `getpgrp`:idx: - `posix.html#1001 <posix.html#1001>`_ - - `getpid`:idx: - `posix.html#1002 <posix.html#1002>`_ - - `getppid`:idx: - `posix.html#1003 <posix.html#1003>`_ - - `getpwent`:idx: - `posix.html#864 <posix.html#864>`_ - - `getpwnam`:idx: - `posix.html#859 <posix.html#859>`_ - - `getpwnam_r`:idx: - `posix.html#861 <posix.html#861>`_ - - `getpwuid`:idx: - `posix.html#860 <posix.html#860>`_ - - `getpwuid_r`:idx: - `posix.html#862 <posix.html#862>`_ - - `getRefcount`:idx: - `system.html#427 <system.html#427>`_ - - `getRestOfCommandLine`:idx: - `parseopt.html#105 <parseopt.html#105>`_ - - `getsid`:idx: - `posix.html#1004 <posix.html#1004>`_ - - `getStartMilsecs`:idx: - `times.html#116 <times.html#116>`_ - - `getStream`:idx: - `zipfiles.html#109 <zipfiles.html#109>`_ - - `getTime`:idx: - `times.html#105 <times.html#105>`_ - - `getTotalMem`:idx: - `system.html#435 <system.html#435>`_ - - `getuid`:idx: - `posix.html#1005 <posix.html#1005>`_ - - `getwd`:idx: - `posix.html#1006 <posix.html#1006>`_ - - `glob`:idx: - `posix.html#831 <posix.html#831>`_ - - `GLOB_ABORTED`:idx: - `posix.html#385 <posix.html#385>`_ - - `GLOB_APPEND`:idx: - `posix.html#378 <posix.html#378>`_ - - `GLOB_DOOFFS`:idx: - `posix.html#379 <posix.html#379>`_ - - `GLOB_ERR`:idx: - `posix.html#380 <posix.html#380>`_ - - `globfree`:idx: - `posix.html#832 <posix.html#832>`_ - - `GLOB_MARK`:idx: - `posix.html#381 <posix.html#381>`_ - - `GLOB_NOCHECK`:idx: - `posix.html#382 <posix.html#382>`_ - - `GLOB_NOESCAPE`:idx: - `posix.html#383 <posix.html#383>`_ - - `GLOB_NOMATCH`:idx: - `posix.html#386 <posix.html#386>`_ - - `GLOB_NOSORT`:idx: - `posix.html#384 <posix.html#384>`_ - - `GLOB_NOSPACE`:idx: - `posix.html#387 <posix.html#387>`_ - - `GLOB_NOSYS`:idx: - `posix.html#388 <posix.html#388>`_ - - `gmtime`:idx: - `posix.html#1104 <posix.html#1104>`_ - - `gmtime_r`:idx: - `posix.html#1105 <posix.html#1105>`_ - - `gzclose`:idx: - `zlib.html#172 <zlib.html#172>`_ - - `gzdopen`:idx: - `zlib.html#158 <zlib.html#158>`_ - - `gzeof`:idx: - `zlib.html#171 <zlib.html#171>`_ - - `gzerror`:idx: - `zlib.html#173 <zlib.html#173>`_ - - `gzFile`:idx: - `zlib.html#115 <zlib.html#115>`_ - - `gzflush`:idx: - `zlib.html#167 <zlib.html#167>`_ - - `gzgetc`:idx: - `zlib.html#166 <zlib.html#166>`_ - - `gzgets`:idx: - `zlib.html#164 <zlib.html#164>`_ - - `gzopen`:idx: - `zlib.html#157 <zlib.html#157>`_ - - `gzprintf`:idx: - `zlib.html#162 <zlib.html#162>`_ - - `gzputc`:idx: - `zlib.html#165 <zlib.html#165>`_ - - `gzputs`:idx: - `zlib.html#163 <zlib.html#163>`_ - - `gzread`:idx: - `zlib.html#160 <zlib.html#160>`_ - - `gzrewind`:idx: - `zlib.html#169 <zlib.html#169>`_ - - `gzseek`:idx: - `zlib.html#168 <zlib.html#168>`_ - - `gzsetparams`:idx: - `zlib.html#159 <zlib.html#159>`_ - - `gztell`:idx: - `zlib.html#170 <zlib.html#170>`_ - - `gzwrite`:idx: - `zlib.html#161 <zlib.html#161>`_ - - `HandleCR`:idx: - `lexbase.html#108 <lexbase.html#108>`_ - - `HandleLF`:idx: - `lexbase.html#109 <lexbase.html#109>`_ - - `hash`:idx: - * `hashes.html#103 <hashes.html#103>`_ - * `hashes.html#104 <hashes.html#104>`_ - * `hashes.html#105 <hashes.html#105>`_ - * `hashes.html#106 <hashes.html#106>`_ - * `hashes.html#107 <hashes.html#107>`_ - - `hashData`:idx: - `hashes.html#102 <hashes.html#102>`_ - - `hashIgnoreCase`:idx: - `hashes.html#109 <hashes.html#109>`_ - - `hashIgnoreStyle`:idx: - `hashes.html#108 <hashes.html#108>`_ - - `hasKey`:idx: - `strtabs.html#108 <strtabs.html#108>`_ - - `header`:idx: - `nimrodc.html#105 <nimrodc.html#105>`_ - - `high`:idx: - `system.html#118 <system.html#118>`_ - - `hint`:idx: - * `manual.html#220 <manual.html#220>`_ - * `manual.html#228 <manual.html#228>`_ - - `htonl`:idx: - `posix.html#792 <posix.html#792>`_ - - `htons`:idx: - `posix.html#793 <posix.html#793>`_ - - `hypot`:idx: - `math.html#123 <math.html#123>`_ - - `iconv`:idx: - `posix.html#841 <posix.html#841>`_ - - `iconv_close`:idx: - `posix.html#842 <posix.html#842>`_ - - `iconv_open`:idx: - `posix.html#840 <posix.html#840>`_ - - `identifier`:idx: - `manual.html#105 <manual.html#105>`_ - - `Identifiers`:idx: - `manual.html#116 <manual.html#116>`_ - - `if`:idx: - `manual.html#181 <manual.html#181>`_ - - `implicit block`:idx: - `manual.html#206 <manual.html#206>`_ - - `import`:idx: - `manual.html#216 <manual.html#216>`_ - - `importc`:idx: - `nimrodc.html#101 <nimrodc.html#101>`_ - - `in`:idx: - `system.html#355 <system.html#355>`_ - - `inc`:idx: - `system.html#156 <system.html#156>`_ - - `incl`:idx: - `system.html#164 <system.html#164>`_ - - `indentation sensitive`:idx: - `manual.html#113 <manual.html#113>`_ - - `inet_addr`:idx: - `posix.html#796 <posix.html#796>`_ - - `inet_ntoa`:idx: - `posix.html#797 <posix.html#797>`_ - - `inet_ntop`:idx: - `posix.html#798 <posix.html#798>`_ - - `inet_pton`:idx: - `posix.html#799 <posix.html#799>`_ - - `inf`:idx: - `system.html#429 <system.html#429>`_ - - `inflate`:idx: - `zlib.html#145 <zlib.html#145>`_ - - `inflateEnd`:idx: - `zlib.html#146 <zlib.html#146>`_ - - `inflateInit`:idx: - `zlib.html#179 <zlib.html#179>`_ - - `inflateInit2`:idx: - `zlib.html#183 <zlib.html#183>`_ - - `inflateInit2u`:idx: - `zlib.html#181 <zlib.html#181>`_ - - `inflateInitu`:idx: - `zlib.html#177 <zlib.html#177>`_ - - `inflateReset`:idx: - `zlib.html#153 <zlib.html#153>`_ - - `inflateSetDictionary`:idx: - `zlib.html#151 <zlib.html#151>`_ - - `inflateSync`:idx: - `zlib.html#152 <zlib.html#152>`_ - - `inflateSyncPoint`:idx: - `zlib.html#185 <zlib.html#185>`_ - - `info`:idx: - `dialogs.html#102 <dialogs.html#102>`_ - - `information hiding`:idx: - `manual.html#214 <manual.html#214>`_ - - `init`:idx: - `parseopt.html#103 <parseopt.html#103>`_ - - `inline`:idx: - `manual.html#168 <manual.html#168>`_ - - `in_Operator`:idx: - `system.html#354 <system.html#354>`_ - - `in_Operator`:idx: - * `strutils.html#124 <strutils.html#124>`_ - * `strutils.html#125 <strutils.html#125>`_ - - `int`:idx: - `system.html#101 <system.html#101>`_ - - `int16`:idx: - `system.html#103 <system.html#103>`_ - - `int32`:idx: - `system.html#104 <system.html#104>`_ - - `int64`:idx: - `system.html#105 <system.html#105>`_ - - `int8`:idx: - `system.html#102 <system.html#102>`_ - - `intToStr`:idx: - `strutils.html#127 <strutils.html#127>`_ - - `IPC_CREAT`:idx: - `posix.html#642 <posix.html#642>`_ - - `IPC_EXCL`:idx: - `posix.html#643 <posix.html#643>`_ - - `IPC_NOWAIT`:idx: - `posix.html#644 <posix.html#644>`_ - - `IPC_PRIVATE`:idx: - `posix.html#645 <posix.html#645>`_ - - `IPC_RMID`:idx: - `posix.html#646 <posix.html#646>`_ - - `IPC_SET`:idx: - `posix.html#647 <posix.html#647>`_ - - `IPC_STAT`:idx: - `posix.html#648 <posix.html#648>`_ - - `is`:idx: - `system.html#357 <system.html#357>`_ - - `isatty`:idx: - `posix.html#1007 <posix.html#1007>`_ - - `isMainModule`:idx: - `system.html#390 <system.html#390>`_ - - `isNil`:idx: - * `system.html#444 <system.html#444>`_ - * `system.html#445 <system.html#445>`_ - * `system.html#446 <system.html#446>`_ - * `system.html#447 <system.html#447>`_ - * `system.html#448 <system.html#448>`_ - * `system.html#449 <system.html#449>`_ - - `is_not`:idx: - `system.html#358 <system.html#358>`_ - - `isPowerOfTwo`:idx: - `math.html#105 <math.html#105>`_ - - `items`:idx: - * `system.html#438 <system.html#438>`_ - * `system.html#439 <system.html#439>`_ - * `system.html#440 <system.html#440>`_ - * `system.html#441 <system.html#441>`_ - * `system.html#442 <system.html#442>`_ - * `system.html#443 <system.html#443>`_ - - `iterator`:idx: - `manual.html#205 <manual.html#205>`_ - - `iterOverEnvironment`:idx: - `os.html#152 <os.html#152>`_ - - `JavaScript`:idx: - `nimrodc.html#116 <nimrodc.html#116>`_ - - `JoinPath`:idx: - * `os.html#118 <os.html#118>`_ - * `os.html#120 <os.html#120>`_ - - `keywords`:idx: - `manual.html#117 <manual.html#117>`_ - - `kill`:idx: - `posix.html#1123 <posix.html#1123>`_ - - `killpg`:idx: - `posix.html#1124 <posix.html#1124>`_ - - `l-values`:idx: - `manual.html#107 <manual.html#107>`_ - - `LC_ALL`:idx: - `posix.html#444 <posix.html#444>`_ - - `LC_COLLATE`:idx: - `posix.html#445 <posix.html#445>`_ - - `LC_CTYPE`:idx: - `posix.html#446 <posix.html#446>`_ - - `lchown`:idx: - `posix.html#1008 <posix.html#1008>`_ - - `LC_MESSAGES`:idx: - `posix.html#447 <posix.html#447>`_ - - `LC_MONETARY`:idx: - `posix.html#448 <posix.html#448>`_ - - `LC_NUMERIC`:idx: - `posix.html#449 <posix.html#449>`_ - - `LC_TIME`:idx: - `posix.html#450 <posix.html#450>`_ - - `len`:idx: - * `system.html#159 <system.html#159>`_ - * `system.html#160 <system.html#160>`_ - * `system.html#161 <system.html#161>`_ - * `system.html#162 <system.html#162>`_ - * `system.html#163 <system.html#163>`_ - * `strtabs.html#109 <strtabs.html#109>`_ - - `line feed`:idx: - `manual.html#123 <manual.html#123>`_ - - `line_dir`:idx: - `nimrodc.html#108 <nimrodc.html#108>`_ - - `lines`:idx: - `system.html#508 <system.html#508>`_ - - `line_trace`:idx: - `nimrodc.html#110 <nimrodc.html#110>`_ - - `link`:idx: - `posix.html#1009 <posix.html#1009>`_ - - `lio_listio`:idx: - `posix.html#791 <posix.html#791>`_ - - `LIO_NOP`:idx: - `posix.html#210 <posix.html#210>`_ - - `LIO_NOWAIT`:idx: - `posix.html#211 <posix.html#211>`_ - - `LIO_READ`:idx: - `posix.html#212 <posix.html#212>`_ - - `LIO_WAIT`:idx: - `posix.html#213 <posix.html#213>`_ - - `LIO_WRITE`:idx: - `posix.html#214 <posix.html#214>`_ - - `Literal strings`:idx: - `manual.html#119 <manual.html#119>`_ - - `ln`:idx: - `math.html#111 <math.html#111>`_ - - `localeconv`:idx: - `posix.html#846 <posix.html#846>`_ - - `localtime`:idx: - `posix.html#1106 <posix.html#1106>`_ - - `localtime_r`:idx: - `posix.html#1107 <posix.html#1107>`_ - - `locations`:idx: - `manual.html#101 <manual.html#101>`_ - - `lockf`:idx: - `posix.html#1010 <posix.html#1010>`_ - - `log10`:idx: - `math.html#112 <math.html#112>`_ - - `log2`:idx: - `math.html#113 <math.html#113>`_ - - `low`:idx: - `system.html#119 <system.html#119>`_ - - `lseek`:idx: - `posix.html#1011 <posix.html#1011>`_ - - `lstat`:idx: - `posix.html#1061 <posix.html#1061>`_ - - `Macros`:idx: - `manual.html#211 <manual.html#211>`_ - - `makecontext`:idx: - `posix.html#1189 <posix.html#1189>`_ - - `MAP_FAILED`:idx: - `posix.html#686 <posix.html#686>`_ - - `MAP_FIXED`:idx: - `posix.html#680 <posix.html#680>`_ - - `MAP_PRIVATE`:idx: - `posix.html#679 <posix.html#679>`_ - - `MAP_SHARED`:idx: - `posix.html#678 <posix.html#678>`_ - - `match`:idx: - * `regexprs.html#106 <regexprs.html#106>`_ - * `regexprs.html#107 <regexprs.html#107>`_ - - `matchLen`:idx: - `regexprs.html#108 <regexprs.html#108>`_ - - `math`:idx: - `nimrodc.html#118 <nimrodc.html#118>`_ - - `max`:idx: - * `system.html#268 <system.html#268>`_ - * `system.html#269 <system.html#269>`_ - * `system.html#270 <system.html#270>`_ - * `system.html#271 <system.html#271>`_ - * `system.html#272 <system.html#272>`_ - * `system.html#319 <system.html#319>`_ - - `MaxSubpatterns`:idx: - `regexprs.html#105 <regexprs.html#105>`_ - - `MCL_CURRENT`:idx: - `posix.html#684 <posix.html#684>`_ - - `MCL_FUTURE`:idx: - `posix.html#685 <posix.html#685>`_ - - `methods`:idx: - `manual.html#198 <manual.html#198>`_ - - `min`:idx: - * `system.html#263 <system.html#263>`_ - * `system.html#264 <system.html#264>`_ - * `system.html#265 <system.html#265>`_ - * `system.html#266 <system.html#266>`_ - * `system.html#267 <system.html#267>`_ - * `system.html#318 <system.html#318>`_ - - `MINSIGSTKSZ`:idx: - `posix.html#766 <posix.html#766>`_ - - `mkdir`:idx: - `posix.html#1062 <posix.html#1062>`_ - - `mkfifo`:idx: - `posix.html#1063 <posix.html#1063>`_ - - `mknod`:idx: - `posix.html#1064 <posix.html#1064>`_ - - `mktime`:idx: - `posix.html#1108 <posix.html#1108>`_ - - `mlock`:idx: - `posix.html#1078 <posix.html#1078>`_ - - `mlockall`:idx: - `posix.html#1079 <posix.html#1079>`_ - - `mmap`:idx: - `posix.html#1080 <posix.html#1080>`_ - - `MM_APPL`:idx: - `posix.html#346 <posix.html#346>`_ - - `MM_CONSOLE`:idx: - `posix.html#357 <posix.html#357>`_ - - `MM_ERROR`:idx: - `posix.html#352 <posix.html#352>`_ - - `MM_FIRM`:idx: - `posix.html#345 <posix.html#345>`_ - - `MM_HALT`:idx: - `posix.html#351 <posix.html#351>`_ - - `MM_HARD`:idx: - `posix.html#343 <posix.html#343>`_ - - `MM_INFO`:idx: - `posix.html#354 <posix.html#354>`_ - - `MM_NOCON`:idx: - `posix.html#361 <posix.html#361>`_ - - `MM_NOMSG`:idx: - `posix.html#360 <posix.html#360>`_ - - `MM_NOSEV`:idx: - `posix.html#355 <posix.html#355>`_ - - `MM_NOTOK`:idx: - `posix.html#359 <posix.html#359>`_ - - `MM_NRECOV`:idx: - `posix.html#350 <posix.html#350>`_ - - `MM_NULLACT`:idx: - `posix.html#125 <posix.html#125>`_ - - `MM_NULLLBL`:idx: - `posix.html#121 <posix.html#121>`_ - - `MM_NULLMC`:idx: - `posix.html#123 <posix.html#123>`_ - - `MM_NULLSEV`:idx: - `posix.html#122 <posix.html#122>`_ - - `MM_NULLTAG`:idx: - `posix.html#126 <posix.html#126>`_ - - `MM_NULLTXT`:idx: - `posix.html#124 <posix.html#124>`_ - - `MM_OK`:idx: - `posix.html#358 <posix.html#358>`_ - - `MM_OPSYS`:idx: - `posix.html#348 <posix.html#348>`_ - - `MM_PRINT`:idx: - `posix.html#356 <posix.html#356>`_ - - `MM_RECOVER`:idx: - `posix.html#349 <posix.html#349>`_ - - `MM_SOFT`:idx: - `posix.html#344 <posix.html#344>`_ - - `MM_UTIL`:idx: - `posix.html#347 <posix.html#347>`_ - - `MM_WARNING`:idx: - `posix.html#353 <posix.html#353>`_ - - `mod`:idx: - * `system.html#213 <system.html#213>`_ - * `system.html#214 <system.html#214>`_ - * `system.html#215 <system.html#215>`_ - * `system.html#216 <system.html#216>`_ - * `system.html#217 <system.html#217>`_ - - `module`:idx: - `manual.html#213 <manual.html#213>`_ - - `MON_1`:idx: - `posix.html#410 <posix.html#410>`_ - - `MON_10`:idx: - `posix.html#419 <posix.html#419>`_ - - `MON_11`:idx: - `posix.html#420 <posix.html#420>`_ - - `MON_12`:idx: - `posix.html#421 <posix.html#421>`_ - - `MON_2`:idx: - `posix.html#411 <posix.html#411>`_ - - `MON_3`:idx: - `posix.html#412 <posix.html#412>`_ - - `MON_4`:idx: - `posix.html#413 <posix.html#413>`_ - - `MON_5`:idx: - `posix.html#414 <posix.html#414>`_ - - `MON_6`:idx: - `posix.html#415 <posix.html#415>`_ - - `MON_7`:idx: - `posix.html#416 <posix.html#416>`_ - - `MON_8`:idx: - `posix.html#417 <posix.html#417>`_ - - `MON_9`:idx: - `posix.html#418 <posix.html#418>`_ - - `moveFile`:idx: - `os.html#135 <os.html#135>`_ - - `moveMem`:idx: - `system.html#409 <system.html#409>`_ - - `mprotect`:idx: - `posix.html#1081 <posix.html#1081>`_ - - `mq_close`:idx: - `posix.html#849 <posix.html#849>`_ - - `mq_getattr`:idx: - `posix.html#850 <posix.html#850>`_ - - `mq_notify`:idx: - `posix.html#851 <posix.html#851>`_ - - `mq_open`:idx: - `posix.html#852 <posix.html#852>`_ - - `mq_receive`:idx: - `posix.html#853 <posix.html#853>`_ - - `mq_send`:idx: - `posix.html#854 <posix.html#854>`_ - - `mq_setattr`:idx: - `posix.html#855 <posix.html#855>`_ - - `mq_timedreceive`:idx: - `posix.html#856 <posix.html#856>`_ - - `mq_timedsend`:idx: - `posix.html#857 <posix.html#857>`_ - - `mq_unlink`:idx: - `posix.html#858 <posix.html#858>`_ - - `MS_ASYNC`:idx: - `posix.html#681 <posix.html#681>`_ - - `MS_INVALIDATE`:idx: - `posix.html#683 <posix.html#683>`_ - - `MS_SYNC`:idx: - `posix.html#682 <posix.html#682>`_ - - `msync`:idx: - `posix.html#1082 <posix.html#1082>`_ - - `munlock`:idx: - `posix.html#1083 <posix.html#1083>`_ - - `munlockall`:idx: - `posix.html#1084 <posix.html#1084>`_ - - `munmap`:idx: - `posix.html#1085 <posix.html#1085>`_ - - `nan`:idx: - `system.html#431 <system.html#431>`_ - - `nanosleep`:idx: - `posix.html#1109 <posix.html#1109>`_ - - `Natural`:idx: - `system.html#126 <system.html#126>`_ - - `neginf`:idx: - `system.html#430 <system.html#430>`_ - - `new`:idx: - * `system.html#116 <system.html#116>`_ - * `system.html#117 <system.html#117>`_ - - `newFileStream`:idx: - * `streams.html#120 <streams.html#120>`_ - * `streams.html#121 <streams.html#121>`_ - - `newline`:idx: - `manual.html#121 <manual.html#121>`_ - - `NewLines`:idx: - `lexbase.html#102 <lexbase.html#102>`_ - - `newSeq`:idx: - `system.html#158 <system.html#158>`_ - - `newString`:idx: - `system.html#406 <system.html#406>`_ - - `newStringStream`:idx: - `streams.html#117 <streams.html#117>`_ - - `newStringTable`:idx: - * `strtabs.html#104 <strtabs.html#104>`_ - * `strtabs.html#105 <strtabs.html#105>`_ - - `next`:idx: - * `parseopt.html#104 <parseopt.html#104>`_ - * `parsecfg.html#106 <parsecfg.html#106>`_ - - `nextPowerOfTwo`:idx: - `math.html#106 <math.html#106>`_ - - `nftw`:idx: - `posix.html#830 <posix.html#830>`_ - - `nice`:idx: - `posix.html#1012 <posix.html#1012>`_ - - `nimcall`:idx: - `manual.html#170 <manual.html#170>`_ - - `NimrodMajor`:idx: - `system.html#394 <system.html#394>`_ - - `NimrodMinor`:idx: - `system.html#395 <system.html#395>`_ - - `NimrodPatch`:idx: - `system.html#396 <system.html#396>`_ - - `NimrodVersion`:idx: - `system.html#393 <system.html#393>`_ - - `nl`:idx: - `strutils.html#104 <strutils.html#104>`_ - - `NL_CAT_LOCALE`:idx: - `posix.html#769 <posix.html#769>`_ - - `nl_langinfo`:idx: - `posix.html#843 <posix.html#843>`_ - - `NL_SETD`:idx: - `posix.html#768 <posix.html#768>`_ - - `noconv`:idx: - `manual.html#173 <manual.html#173>`_ - - `no_decl`:idx: - `nimrodc.html#104 <nimrodc.html#104>`_ - - `NOEXPR`:idx: - `posix.html#442 <posix.html#442>`_ - - `normalize`:idx: - `strutils.html#111 <strutils.html#111>`_ - - `no_static`:idx: - `nimrodc.html#107 <nimrodc.html#107>`_ - - `not`:idx: - * `system.html#115 <system.html#115>`_ - * `system.html#188 <system.html#188>`_ - * `system.html#189 <system.html#189>`_ - * `system.html#190 <system.html#190>`_ - * `system.html#191 <system.html#191>`_ - * `system.html#192 <system.html#192>`_ - - `not_in`:idx: - `system.html#356 <system.html#356>`_ - - `ntohl`:idx: - `posix.html#794 <posix.html#794>`_ - - `ntohs`:idx: - `posix.html#795 <posix.html#795>`_ - - `Numerical constants`:idx: - `manual.html#137 <manual.html#137>`_ - - `O_ACCMODE`:idx: - `posix.html#322 <posix.html#322>`_ - - `O_APPEND`:idx: - `posix.html#317 <posix.html#317>`_ - - `object`:idx: - `manual.html#156 <manual.html#156>`_ - - `O_CREAT`:idx: - `posix.html#313 <posix.html#313>`_ - - `ODBC_ADD_DSN`:idx: - `odbcsql.html#621 <odbcsql.html#621>`_ - - `ODBC_ADD_SYS_DSN`:idx: - `odbcsql.html#624 <odbcsql.html#624>`_ - - `ODBC_CONFIG_DSN`:idx: - `odbcsql.html#622 <odbcsql.html#622>`_ - - `ODBC_CONFIG_SYS_DSN`:idx: - `odbcsql.html#625 <odbcsql.html#625>`_ - - `ODBC_REMOVE_DSN`:idx: - `odbcsql.html#623 <odbcsql.html#623>`_ - - `ODBC_REMOVE_SYS_DSN`:idx: - `odbcsql.html#626 <odbcsql.html#626>`_ - - `O_DSYNC`:idx: - `posix.html#318 <posix.html#318>`_ - - `O_EXCL`:idx: - `posix.html#314 <posix.html#314>`_ - - `O_NOCTTY`:idx: - `posix.html#315 <posix.html#315>`_ - - `O_NONBLOCK`:idx: - `posix.html#319 <posix.html#319>`_ - - `open`:idx: - * `lexbase.html#104 <lexbase.html#104>`_ - * `parsecfg.html#104 <parsecfg.html#104>`_ - * `posix.html#813 <posix.html#813>`_ - * `zipfiles.html#102 <zipfiles.html#102>`_ - - `openarray`:idx: - `system.html#122 <system.html#122>`_ - - `opendir`:idx: - `posix.html#801 <posix.html#801>`_ - - `OpenFile`:idx: - * `system.html#482 <system.html#482>`_ - * `system.html#483 <system.html#483>`_ - - `operator`:idx: - `manual.html#139 <manual.html#139>`_ - - `Operators`:idx: - `manual.html#203 <manual.html#203>`_ - - `or`:idx: - * `system.html#233 <system.html#233>`_ - * `system.html#234 <system.html#234>`_ - * `system.html#235 <system.html#235>`_ - * `system.html#236 <system.html#236>`_ - * `system.html#237 <system.html#237>`_ - * `system.html#321 <system.html#321>`_ - - `ord`:idx: - `system.html#167 <system.html#167>`_ - - `Ordinal types`:idx: - `manual.html#142 <manual.html#142>`_ - - `O_RDONLY`:idx: - `posix.html#323 <posix.html#323>`_ - - `O_RDWR`:idx: - `posix.html#324 <posix.html#324>`_ - - `O_RSYNC`:idx: - `posix.html#320 <posix.html#320>`_ - - `OSError`:idx: - `os.html#147 <os.html#147>`_ - - `O_SYNC`:idx: - `posix.html#321 <posix.html#321>`_ - - `O_TRUNC`:idx: - `posix.html#316 <posix.html#316>`_ - - `O_WRONLY`:idx: - `posix.html#325 <posix.html#325>`_ - - `pairs`:idx: - `strtabs.html#110 <strtabs.html#110>`_ - - `P_ALL`:idx: - `posix.html#716 <posix.html#716>`_ - - `paramCount`:idx: - `os.html#145 <os.html#145>`_ - - `paramStr`:idx: - `os.html#146 <os.html#146>`_ - - `ParDir`:idx: - `os.html#102 <os.html#102>`_ - - `parentDir`:idx: - `os.html#122 <os.html#122>`_ - - `ParseBiggestInt`:idx: - `strutils.html#129 <strutils.html#129>`_ - - `parseCmdLine`:idx: - `os.html#156 <os.html#156>`_ - - `ParseFloat`:idx: - `strutils.html#130 <strutils.html#130>`_ - - `ParseInt`:idx: - `strutils.html#128 <strutils.html#128>`_ - - `pathconf`:idx: - `posix.html#1013 <posix.html#1013>`_ - - `PathSep`:idx: - `os.html#105 <os.html#105>`_ - - `pause`:idx: - `posix.html#1014 <posix.html#1014>`_ - - `pbyte`:idx: - `zlib.html#106 <zlib.html#106>`_ - - `pbytef`:idx: - `zlib.html#107 <zlib.html#107>`_ - - `PC_2_SYMLINKS`:idx: - `posix.html#500 <posix.html#500>`_ - - `PC_ALLOC_SIZE_MIN`:idx: - `posix.html#501 <posix.html#501>`_ - - `PC_ASYNC_IO`:idx: - `posix.html#502 <posix.html#502>`_ - - `PC_CHOWN_RESTRICTED`:idx: - `posix.html#503 <posix.html#503>`_ - - `PC_FILESIZEBITS`:idx: - `posix.html#504 <posix.html#504>`_ - - `PC_LINK_MAX`:idx: - `posix.html#505 <posix.html#505>`_ - - `PC_MAX_CANON`:idx: - `posix.html#506 <posix.html#506>`_ - - `PC_MAX_INPUT`:idx: - `posix.html#507 <posix.html#507>`_ - - `PC_NAME_MAX`:idx: - `posix.html#508 <posix.html#508>`_ - - `PC_NO_TRUNC`:idx: - `posix.html#509 <posix.html#509>`_ - - `PC_PATH_MAX`:idx: - `posix.html#510 <posix.html#510>`_ - - `PC_PIPE_BUF`:idx: - `posix.html#511 <posix.html#511>`_ - - `PC_PRIO_IO`:idx: - `posix.html#512 <posix.html#512>`_ - - `PC_REC_INCR_XFER_SIZE`:idx: - `posix.html#513 <posix.html#513>`_ - - `PC_REC_MIN_XFER_SIZE`:idx: - `posix.html#514 <posix.html#514>`_ - - `PC_REC_XFER_ALIGN`:idx: - `posix.html#515 <posix.html#515>`_ - - `PC_SYMLINK_MAX`:idx: - `posix.html#516 <posix.html#516>`_ - - `PC_SYNC_IO`:idx: - `posix.html#517 <posix.html#517>`_ - - `PC_VDISABLE`:idx: - `posix.html#518 <posix.html#518>`_ - - `PFileStream`:idx: - `streams.html#118 <streams.html#118>`_ - - `PFloat32`:idx: - `system.html#386 <system.html#386>`_ - - `PFloat64`:idx: - `system.html#387 <system.html#387>`_ - - `PI`:idx: - `math.html#101 <math.html#101>`_ - - `PInt32`:idx: - `system.html#389 <system.html#389>`_ - - `PInt64`:idx: - `system.html#388 <system.html#388>`_ - - `PInternalState`:idx: - `zlib.html#111 <zlib.html#111>`_ - - `pipe`:idx: - `posix.html#1015 <posix.html#1015>`_ - - `PM_STR`:idx: - `posix.html#395 <posix.html#395>`_ - - `PObject`:idx: - `system.html#129 <system.html#129>`_ - - `pointer`:idx: - `system.html#113 <system.html#113>`_ - - `pointers`:idx: - `manual.html#159 <manual.html#159>`_ - - `Positive`:idx: - `system.html#127 <system.html#127>`_ - - `POSIX_ASYNC_IO`:idx: - `posix.html#475 <posix.html#475>`_ - - `POSIX_FADV_DONTNEED`:idx: - `posix.html#330 <posix.html#330>`_ - - `posix_fadvise`:idx: - `posix.html#814 <posix.html#814>`_ - - `POSIX_FADV_NOREUSE`:idx: - `posix.html#331 <posix.html#331>`_ - - `POSIX_FADV_NORMAL`:idx: - `posix.html#326 <posix.html#326>`_ - - `POSIX_FADV_RANDOM`:idx: - `posix.html#328 <posix.html#328>`_ - - `POSIX_FADV_SEQUENTIAL`:idx: - `posix.html#327 <posix.html#327>`_ - - `POSIX_FADV_WILLNEED`:idx: - `posix.html#329 <posix.html#329>`_ - - `posix_fallocate`:idx: - `posix.html#815 <posix.html#815>`_ - - `POSIX_MADV_DONTNEED`:idx: - `posix.html#691 <posix.html#691>`_ - - `posix_madvise`:idx: - `posix.html#1086 <posix.html#1086>`_ - - `POSIX_MADV_NORMAL`:idx: - `posix.html#687 <posix.html#687>`_ - - `POSIX_MADV_RANDOM`:idx: - `posix.html#689 <posix.html#689>`_ - - `POSIX_MADV_SEQUENTIAL`:idx: - `posix.html#688 <posix.html#688>`_ - - `POSIX_MADV_WILLNEED`:idx: - `posix.html#690 <posix.html#690>`_ - - `posix_mem_offset`:idx: - `posix.html#1087 <posix.html#1087>`_ - - `POSIX_PRIO_IO`:idx: - `posix.html#476 <posix.html#476>`_ - - `posix_spawn`:idx: - `posix.html#1167 <posix.html#1167>`_ - - `posix_spawnattr_destroy`:idx: - `posix.html#1173 <posix.html#1173>`_ - - `posix_spawnattr_getflags`:idx: - `posix.html#1175 <posix.html#1175>`_ - - `posix_spawnattr_getpgroup`:idx: - `posix.html#1176 <posix.html#1176>`_ - - `posix_spawnattr_getschedparam`:idx: - `posix.html#1177 <posix.html#1177>`_ - - `posix_spawnattr_getschedpolicy`:idx: - `posix.html#1178 <posix.html#1178>`_ - - `posix_spawnattr_getsigdefault`:idx: - `posix.html#1174 <posix.html#1174>`_ - - `posix_spawnattr_getsigmask`:idx: - `posix.html#1179 <posix.html#1179>`_ - - `posix_spawnattr_init`:idx: - `posix.html#1180 <posix.html#1180>`_ - - `posix_spawnattr_setflags`:idx: - `posix.html#1182 <posix.html#1182>`_ - - `posix_spawnattr_setpgroup`:idx: - `posix.html#1183 <posix.html#1183>`_ - - `posix_spawnattr_setschedparam`:idx: - `posix.html#1184 <posix.html#1184>`_ - - `posix_spawnattr_setschedpolicy`:idx: - `posix.html#1185 <posix.html#1185>`_ - - `posix_spawnattr_setsigdefault`:idx: - `posix.html#1181 <posix.html#1181>`_ - - `posix_spawnattr_setsigmask`:idx: - `posix.html#1186 <posix.html#1186>`_ - - `posix_spawn_file_actions_addclose`:idx: - `posix.html#1168 <posix.html#1168>`_ - - `posix_spawn_file_actions_adddup2`:idx: - `posix.html#1169 <posix.html#1169>`_ - - `posix_spawn_file_actions_addopen`:idx: - `posix.html#1170 <posix.html#1170>`_ - - `posix_spawn_file_actions_destroy`:idx: - `posix.html#1171 <posix.html#1171>`_ - - `posix_spawn_file_actions_init`:idx: - `posix.html#1172 <posix.html#1172>`_ - - `posix_spawnp`:idx: - `posix.html#1187 <posix.html#1187>`_ - - `POSIX_SPAWN_RESETIDS`:idx: - `posix.html#778 <posix.html#778>`_ - - `POSIX_SPAWN_SETPGROUP`:idx: - `posix.html#779 <posix.html#779>`_ - - `POSIX_SPAWN_SETSCHEDPARAM`:idx: - `posix.html#780 <posix.html#780>`_ - - `POSIX_SPAWN_SETSCHEDULER`:idx: - `posix.html#781 <posix.html#781>`_ - - `POSIX_SPAWN_SETSIGDEF`:idx: - `posix.html#782 <posix.html#782>`_ - - `POSIX_SPAWN_SETSIGMASK`:idx: - `posix.html#783 <posix.html#783>`_ - - `POSIX_SYNC_IO`:idx: - `posix.html#477 <posix.html#477>`_ - - `POSIX_TYPED_MEM_ALLOCATE`:idx: - `posix.html#692 <posix.html#692>`_ - - `POSIX_TYPED_MEM_ALLOCATE_CONTIG`:idx: - `posix.html#693 <posix.html#693>`_ - - `posix_typed_mem_get_info`:idx: - `posix.html#1088 <posix.html#1088>`_ - - `POSIX_TYPED_MEM_MAP_ALLOCATABLE`:idx: - `posix.html#694 <posix.html#694>`_ - - `posix_typed_mem_open`:idx: - `posix.html#1089 <posix.html#1089>`_ - - `pow`:idx: - `math.html#127 <math.html#127>`_ - - `P_PGID`:idx: - `posix.html#718 <posix.html#718>`_ - - `P_PID`:idx: - `posix.html#717 <posix.html#717>`_ - - `pread`:idx: - `posix.html#1016 <posix.html#1016>`_ - - `pred`:idx: - `system.html#155 <system.html#155>`_ - - `procedural type`:idx: - `manual.html#162 <manual.html#162>`_ - - `procedures`:idx: - `manual.html#200 <manual.html#200>`_ - - `PROT_EXEC`:idx: - `posix.html#676 <posix.html#676>`_ - - `PROT_NONE`:idx: - `posix.html#677 <posix.html#677>`_ - - `PROT_READ`:idx: - `posix.html#674 <posix.html#674>`_ - - `PROT_WRITE`:idx: - `posix.html#675 <posix.html#675>`_ - - `pselect`:idx: - `posix.html#1165 <posix.html#1165>`_ - - `PSQLCHAR`:idx: - `odbcsql.html#116 <odbcsql.html#116>`_ - - `PSQL_DATE_STRUCT`:idx: - `odbcsql.html#232 <odbcsql.html#232>`_ - - `PSQLDOUBLE`:idx: - `odbcsql.html#122 <odbcsql.html#122>`_ - - `PSQLFLOAT`:idx: - `odbcsql.html#123 <odbcsql.html#123>`_ - - `PSQLHANDLE`:idx: - `odbcsql.html#124 <odbcsql.html#124>`_ - - `PSQLINTEGER`:idx: - `odbcsql.html#117 <odbcsql.html#117>`_ - - `PSQLREAL`:idx: - `odbcsql.html#121 <odbcsql.html#121>`_ - - `PSQLSMALLINT`:idx: - `odbcsql.html#119 <odbcsql.html#119>`_ - - `PSQL_TIMESTAMP_STRUCT`:idx: - `odbcsql.html#236 <odbcsql.html#236>`_ - - `PSQL_TIME_STRUCT`:idx: - `odbcsql.html#234 <odbcsql.html#234>`_ - - `PSQLUINTEGER`:idx: - `odbcsql.html#118 <odbcsql.html#118>`_ - - `PSQLUSMALLINT`:idx: - `odbcsql.html#120 <odbcsql.html#120>`_ - - `PStream`:idx: - `streams.html#101 <streams.html#101>`_ - - `PStringStream`:idx: - `streams.html#115 <streams.html#115>`_ - - `PStringTable`:idx: - `strtabs.html#103 <strtabs.html#103>`_ - - `pthread_atfork`:idx: - `posix.html#867 <posix.html#867>`_ - - `pthread_attr_destroy`:idx: - `posix.html#868 <posix.html#868>`_ - - `pthread_attr_getdetachstate`:idx: - `posix.html#869 <posix.html#869>`_ - - `pthread_attr_getguardsize`:idx: - `posix.html#870 <posix.html#870>`_ - - `pthread_attr_getinheritsched`:idx: - `posix.html#871 <posix.html#871>`_ - - `pthread_attr_getschedparam`:idx: - `posix.html#872 <posix.html#872>`_ - - `pthread_attr_getschedpolicy`:idx: - `posix.html#873 <posix.html#873>`_ - - `pthread_attr_getscope`:idx: - `posix.html#874 <posix.html#874>`_ - - `pthread_attr_getstack`:idx: - `posix.html#875 <posix.html#875>`_ - - `pthread_attr_getstackaddr`:idx: - `posix.html#876 <posix.html#876>`_ - - `pthread_attr_getstacksize`:idx: - `posix.html#877 <posix.html#877>`_ - - `pthread_attr_init`:idx: - `posix.html#878 <posix.html#878>`_ - - `pthread_attr_setdetachstate`:idx: - `posix.html#879 <posix.html#879>`_ - - `pthread_attr_setguardsize`:idx: - `posix.html#880 <posix.html#880>`_ - - `pthread_attr_setinheritsched`:idx: - `posix.html#881 <posix.html#881>`_ - - `pthread_attr_setschedparam`:idx: - `posix.html#882 <posix.html#882>`_ - - `pthread_attr_setschedpolicy`:idx: - `posix.html#883 <posix.html#883>`_ - - `pthread_attr_setscope`:idx: - `posix.html#884 <posix.html#884>`_ - - `pthread_attr_setstack`:idx: - `posix.html#885 <posix.html#885>`_ - - `pthread_attr_setstackaddr`:idx: - `posix.html#886 <posix.html#886>`_ - - `pthread_attr_setstacksize`:idx: - `posix.html#887 <posix.html#887>`_ - - `pthread_barrierattr_destroy`:idx: - `posix.html#891 <posix.html#891>`_ - - `pthread_barrierattr_getpshared`:idx: - `posix.html#892 <posix.html#892>`_ - - `pthread_barrierattr_init`:idx: - `posix.html#893 <posix.html#893>`_ - - `pthread_barrierattr_setpshared`:idx: - `posix.html#894 <posix.html#894>`_ - - `pthread_barrier_destroy`:idx: - `posix.html#888 <posix.html#888>`_ - - `pthread_barrier_init`:idx: - `posix.html#889 <posix.html#889>`_ - - `PTHREAD_BARRIER_SERIAL_THREAD`:idx: - `posix.html#451 <posix.html#451>`_ - - `pthread_barrier_wait`:idx: - `posix.html#890 <posix.html#890>`_ - - `pthread_cancel`:idx: - `posix.html#895 <posix.html#895>`_ - - `PTHREAD_CANCEL_ASYNCHRONOUS`:idx: - `posix.html#452 <posix.html#452>`_ - - `PTHREAD_CANCEL_DEFERRED`:idx: - `posix.html#454 <posix.html#454>`_ - - `PTHREAD_CANCEL_DISABLE`:idx: - `posix.html#455 <posix.html#455>`_ - - `PTHREAD_CANCELED`:idx: - `posix.html#456 <posix.html#456>`_ - - `PTHREAD_CANCEL_ENABLE`:idx: - `posix.html#453 <posix.html#453>`_ - - `pthread_cleanup_pop`:idx: - `posix.html#897 <posix.html#897>`_ - - `pthread_cleanup_push`:idx: - `posix.html#896 <posix.html#896>`_ - - `pthread_condattr_destroy`:idx: - `posix.html#904 <posix.html#904>`_ - - `pthread_condattr_getclock`:idx: - `posix.html#905 <posix.html#905>`_ - - `pthread_condattr_getpshared`:idx: - `posix.html#906 <posix.html#906>`_ - - `pthread_condattr_init`:idx: - `posix.html#907 <posix.html#907>`_ - - `pthread_condattr_setclock`:idx: - `posix.html#908 <posix.html#908>`_ - - `pthread_condattr_setpshared`:idx: - `posix.html#909 <posix.html#909>`_ - - `pthread_cond_broadcast`:idx: - `posix.html#898 <posix.html#898>`_ - - `pthread_cond_destroy`:idx: - `posix.html#899 <posix.html#899>`_ - - `pthread_cond_init`:idx: - `posix.html#900 <posix.html#900>`_ - - `PTHREAD_COND_INITIALIZER`:idx: - `posix.html#457 <posix.html#457>`_ - - `pthread_cond_signal`:idx: - `posix.html#901 <posix.html#901>`_ - - `pthread_cond_timedwait`:idx: - `posix.html#902 <posix.html#902>`_ - - `pthread_cond_wait`:idx: - `posix.html#903 <posix.html#903>`_ - - `pthread_create`:idx: - `posix.html#910 <posix.html#910>`_ - - `PTHREAD_CREATE_DETACHED`:idx: - `posix.html#458 <posix.html#458>`_ - - `PTHREAD_CREATE_JOINABLE`:idx: - `posix.html#459 <posix.html#459>`_ - - `pthread_detach`:idx: - `posix.html#911 <posix.html#911>`_ - - `pthread_equal`:idx: - `posix.html#912 <posix.html#912>`_ - - `pthread_exit`:idx: - `posix.html#913 <posix.html#913>`_ - - `PTHREAD_EXPLICIT_SCHED`:idx: - `posix.html#460 <posix.html#460>`_ - - `pthread_getconcurrency`:idx: - `posix.html#914 <posix.html#914>`_ - - `pthread_getcpuclockid`:idx: - `posix.html#915 <posix.html#915>`_ - - `pthread_getschedparam`:idx: - `posix.html#916 <posix.html#916>`_ - - `pthread_getspecific`:idx: - `posix.html#917 <posix.html#917>`_ - - `PTHREAD_INHERIT_SCHED`:idx: - `posix.html#461 <posix.html#461>`_ - - `pthread_join`:idx: - `posix.html#918 <posix.html#918>`_ - - `pthread_key_create`:idx: - `posix.html#919 <posix.html#919>`_ - - `pthread_key_delete`:idx: - `posix.html#920 <posix.html#920>`_ - - `pthread_kill`:idx: - `posix.html#1125 <posix.html#1125>`_ - - `pthread_mutexattr_destroy`:idx: - `posix.html#929 <posix.html#929>`_ - - `pthread_mutexattr_getprioceiling`:idx: - `posix.html#930 <posix.html#930>`_ - - `pthread_mutexattr_getprotocol`:idx: - `posix.html#931 <posix.html#931>`_ - - `pthread_mutexattr_getpshared`:idx: - `posix.html#932 <posix.html#932>`_ - - `pthread_mutexattr_gettype`:idx: - `posix.html#933 <posix.html#933>`_ - - `pthread_mutexattr_init`:idx: - `posix.html#934 <posix.html#934>`_ - - `pthread_mutexattr_setprioceiling`:idx: - `posix.html#935 <posix.html#935>`_ - - `pthread_mutexattr_setprotocol`:idx: - `posix.html#936 <posix.html#936>`_ - - `pthread_mutexattr_setpshared`:idx: - `posix.html#937 <posix.html#937>`_ - - `pthread_mutexattr_settype`:idx: - `posix.html#938 <posix.html#938>`_ - - `PTHREAD_MUTEX_DEFAULT`:idx: - `posix.html#462 <posix.html#462>`_ - - `pthread_mutex_destroy`:idx: - `posix.html#921 <posix.html#921>`_ - - `PTHREAD_MUTEX_ERRORCHECK`:idx: - `posix.html#463 <posix.html#463>`_ - - `pthread_mutex_getprioceiling`:idx: - `posix.html#922 <posix.html#922>`_ - - `pthread_mutex_init`:idx: - `posix.html#923 <posix.html#923>`_ - - `PTHREAD_MUTEX_INITIALIZER`:idx: - `posix.html#464 <posix.html#464>`_ - - `pthread_mutex_lock`:idx: - `posix.html#924 <posix.html#924>`_ - - `PTHREAD_MUTEX_NORMAL`:idx: - `posix.html#465 <posix.html#465>`_ - - `PTHREAD_MUTEX_RECURSIVE`:idx: - `posix.html#466 <posix.html#466>`_ - - `pthread_mutex_setprioceiling`:idx: - `posix.html#925 <posix.html#925>`_ - - `pthread_mutex_timedlock`:idx: - `posix.html#926 <posix.html#926>`_ - - `pthread_mutex_trylock`:idx: - `posix.html#927 <posix.html#927>`_ - - `pthread_mutex_unlock`:idx: - `posix.html#928 <posix.html#928>`_ - - `pthread_once`:idx: - `posix.html#939 <posix.html#939>`_ - - `PTHREAD_ONCE_INIT`:idx: - `posix.html#467 <posix.html#467>`_ - - `PTHREAD_PRIO_INHERIT`:idx: - `posix.html#468 <posix.html#468>`_ - - `PTHREAD_PRIO_NONE`:idx: - `posix.html#469 <posix.html#469>`_ - - `PTHREAD_PRIO_PROTECT`:idx: - `posix.html#470 <posix.html#470>`_ - - `PTHREAD_PROCESS_PRIVATE`:idx: - `posix.html#472 <posix.html#472>`_ - - `PTHREAD_PROCESS_SHARED`:idx: - `posix.html#471 <posix.html#471>`_ - - `pthread_rwlockattr_destroy`:idx: - `posix.html#949 <posix.html#949>`_ - - `pthread_rwlockattr_getpshared`:idx: - `posix.html#950 <posix.html#950>`_ - - `pthread_rwlockattr_init`:idx: - `posix.html#951 <posix.html#951>`_ - - `pthread_rwlockattr_setpshared`:idx: - `posix.html#952 <posix.html#952>`_ - - `pthread_rwlock_destroy`:idx: - `posix.html#940 <posix.html#940>`_ - - `pthread_rwlock_init`:idx: - `posix.html#941 <posix.html#941>`_ - - `pthread_rwlock_rdlock`:idx: - `posix.html#942 <posix.html#942>`_ - - `pthread_rwlock_timedrdlock`:idx: - `posix.html#943 <posix.html#943>`_ - - `pthread_rwlock_timedwrlock`:idx: - `posix.html#944 <posix.html#944>`_ - - `pthread_rwlock_tryrdlock`:idx: - `posix.html#945 <posix.html#945>`_ - - `pthread_rwlock_trywrlock`:idx: - `posix.html#946 <posix.html#946>`_ - - `pthread_rwlock_unlock`:idx: - `posix.html#947 <posix.html#947>`_ - - `pthread_rwlock_wrlock`:idx: - `posix.html#948 <posix.html#948>`_ - - `PTHREAD_SCOPE_PROCESS`:idx: - `posix.html#473 <posix.html#473>`_ - - `PTHREAD_SCOPE_SYSTEM`:idx: - `posix.html#474 <posix.html#474>`_ - - `pthread_self`:idx: - `posix.html#953 <posix.html#953>`_ - - `pthread_setcancelstate`:idx: - `posix.html#954 <posix.html#954>`_ - - `pthread_setcanceltype`:idx: - `posix.html#955 <posix.html#955>`_ - - `pthread_setconcurrency`:idx: - `posix.html#956 <posix.html#956>`_ - - `pthread_setschedparam`:idx: - `posix.html#957 <posix.html#957>`_ - - `pthread_setschedprio`:idx: - `posix.html#958 <posix.html#958>`_ - - `pthread_setspecific`:idx: - `posix.html#959 <posix.html#959>`_ - - `pthread_sigmask`:idx: - `posix.html#1126 <posix.html#1126>`_ - - `pthread_spin_destroy`:idx: - `posix.html#960 <posix.html#960>`_ - - `pthread_spin_init`:idx: - `posix.html#961 <posix.html#961>`_ - - `pthread_spin_lock`:idx: - `posix.html#962 <posix.html#962>`_ - - `pthread_spin_trylock`:idx: - `posix.html#963 <posix.html#963>`_ - - `pthread_spin_unlock`:idx: - `posix.html#964 <posix.html#964>`_ - - `pthread_testcancel`:idx: - `posix.html#965 <posix.html#965>`_ - - `Pulongf`:idx: - `zlib.html#104 <zlib.html#104>`_ - - `push/pop`:idx: - `manual.html#229 <manual.html#229>`_ - - `putEnv`:idx: - `os.html#142 <os.html#142>`_ - - `PWindow`:idx: - `dialogs.html#101 <dialogs.html#101>`_ - - `pwrite`:idx: - `posix.html#1017 <posix.html#1017>`_ - - `Pzip`:idx: - `libzip.html#105 <libzip.html#105>`_ - - `Pzip_file`:idx: - `libzip.html#106 <libzip.html#106>`_ - - `PZipFileStream`:idx: - `zipfiles.html#108 <zipfiles.html#108>`_ - - `Pzip_source`:idx: - `libzip.html#107 <libzip.html#107>`_ - - `Pzip_stat`:idx: - `libzip.html#103 <libzip.html#103>`_ - - `PZstream`:idx: - `zlib.html#114 <zlib.html#114>`_ - - `quit`:idx: - * `system.html#474 <system.html#474>`_ - * `system.html#475 <system.html#475>`_ - - `QuitFailure`:idx: - `system.html#473 <system.html#473>`_ - - `QuitSuccess`:idx: - `system.html#472 <system.html#472>`_ - - `quotation mark`:idx: - `manual.html#128 <manual.html#128>`_ - - `quoteIfSpaceExists`:idx: - `strutils.html#138 <strutils.html#138>`_ - - `RADIXCHAR`:idx: - `posix.html#439 <posix.html#439>`_ - - `raise`:idx: - `posix.html#1127 <posix.html#1127>`_ - - `random`:idx: - `math.html#108 <math.html#108>`_ - - `randomize`:idx: - `math.html#109 <math.html#109>`_ - - `range`:idx: - `system.html#120 <system.html#120>`_ - - `re-raised`:idx: - `manual.html#184 <manual.html#184>`_ - - `read`:idx: - `posix.html#1018 <posix.html#1018>`_ - - `readBool`:idx: - `streams.html#106 <streams.html#106>`_ - - `readBuffer`:idx: - `system.html#502 <system.html#502>`_ - - `ReadBytes`:idx: - `system.html#500 <system.html#500>`_ - - `readChar`:idx: - * `system.html#486 <system.html#486>`_ - * `streams.html#105 <streams.html#105>`_ - - `ReadChars`:idx: - `system.html#501 <system.html#501>`_ - - `readdir`:idx: - `posix.html#802 <posix.html#802>`_ - - `readdir_r`:idx: - `posix.html#803 <posix.html#803>`_ - - `readFile`:idx: - `system.html#488 <system.html#488>`_ - - `readFloat32`:idx: - `streams.html#111 <streams.html#111>`_ - - `readFloat64`:idx: - `streams.html#112 <streams.html#112>`_ - - `readInt16`:idx: - `streams.html#108 <streams.html#108>`_ - - `readInt32`:idx: - `streams.html#109 <streams.html#109>`_ - - `readInt64`:idx: - `streams.html#110 <streams.html#110>`_ - - `readInt8`:idx: - `streams.html#107 <streams.html#107>`_ - - `readLine`:idx: - * `system.html#496 <system.html#496>`_ - * `streams.html#114 <streams.html#114>`_ - - `readlink`:idx: - `posix.html#1019 <posix.html#1019>`_ - - `readStr`:idx: - `streams.html#113 <streams.html#113>`_ - - `realloc`:idx: - `system.html#413 <system.html#413>`_ - - `Recursive module dependancies`:idx: - `manual.html#217 <manual.html#217>`_ - - `register`:idx: - `nimrodc.html#113 <nimrodc.html#113>`_ - - `removeDir`:idx: - `os.html#137 <os.html#137>`_ - - `removeFile`:idx: - `os.html#136 <os.html#136>`_ - - `repeatChar`:idx: - `strutils.html#134 <strutils.html#134>`_ - - `replaceStr`:idx: - * `strutils.html#114 <strutils.html#114>`_ - * `strutils.html#115 <strutils.html#115>`_ - - `repr`:idx: - `system.html#371 <system.html#371>`_ - - `result`:idx: - * `manual.html#191 <manual.html#191>`_ - * `manual.html#202 <manual.html#202>`_ - - `return`:idx: - `manual.html#190 <manual.html#190>`_ - - `rewinddir`:idx: - `posix.html#804 <posix.html#804>`_ - - `rmdir`:idx: - `posix.html#1020 <posix.html#1020>`_ - - `R_OK`:idx: - `posix.html#479 <posix.html#479>`_ - - `round`:idx: - `math.html#116 <math.html#116>`_ - - `RTLD_GLOBAL`:idx: - `posix.html#217 <posix.html#217>`_ - - `RTLD_LAZY`:idx: - `posix.html#215 <posix.html#215>`_ - - `RTLD_LOCAL`:idx: - `posix.html#218 <posix.html#218>`_ - - `RTLD_NOW`:idx: - `posix.html#216 <posix.html#216>`_ - - `safe`:idx: - `manual.html#112 <manual.html#112>`_ - - `safecall`:idx: - `manual.html#167 <manual.html#167>`_ - - `sameFile`:idx: - `os.html#148 <os.html#148>`_ - - `sameFileContent`:idx: - `os.html#149 <os.html#149>`_ - - `SA_NOCLDSTOP`:idx: - `posix.html#754 <posix.html#754>`_ - - `SA_NOCLDWAIT`:idx: - `posix.html#762 <posix.html#762>`_ - - `SA_NODEFER`:idx: - `posix.html#763 <posix.html#763>`_ - - `SA_ONSTACK`:idx: - `posix.html#758 <posix.html#758>`_ - - `SA_RESETHAND`:idx: - `posix.html#759 <posix.html#759>`_ - - `SA_RESTART`:idx: - `posix.html#760 <posix.html#760>`_ - - `SA_SIGINFO`:idx: - `posix.html#761 <posix.html#761>`_ - - `SC_2_C_BIND`:idx: - `posix.html#519 <posix.html#519>`_ - - `SC_2_C_DEV`:idx: - `posix.html#520 <posix.html#520>`_ - - `SC_2_CHAR_TERM`:idx: - `posix.html#521 <posix.html#521>`_ - - `SC_2_FORT_DEV`:idx: - `posix.html#522 <posix.html#522>`_ - - `SC_2_FORT_RUN`:idx: - `posix.html#523 <posix.html#523>`_ - - `SC_2_LOCALEDEF`:idx: - `posix.html#524 <posix.html#524>`_ - - `SC_2_PBS`:idx: - `posix.html#525 <posix.html#525>`_ - - `SC_2_PBS_ACCOUNTING`:idx: - `posix.html#526 <posix.html#526>`_ - - `SC_2_PBS_CHECKPOINT`:idx: - `posix.html#527 <posix.html#527>`_ - - `SC_2_PBS_LOCATE`:idx: - `posix.html#528 <posix.html#528>`_ - - `SC_2_PBS_MESSAGE`:idx: - `posix.html#529 <posix.html#529>`_ - - `SC_2_PBS_TRACK`:idx: - `posix.html#530 <posix.html#530>`_ - - `SC_2_SW_DEV`:idx: - `posix.html#531 <posix.html#531>`_ - - `SC_2_UPE`:idx: - `posix.html#532 <posix.html#532>`_ - - `SC_2_VERSION`:idx: - `posix.html#533 <posix.html#533>`_ - - `SC_ADVISORY_INFO`:idx: - `posix.html#534 <posix.html#534>`_ - - `SC_AIO_LISTIO_MAX`:idx: - `posix.html#535 <posix.html#535>`_ - - `SC_AIO_MAX`:idx: - `posix.html#536 <posix.html#536>`_ - - `SC_AIO_PRIO_DELTA_MAX`:idx: - `posix.html#537 <posix.html#537>`_ - - `SC_ARG_MAX`:idx: - `posix.html#538 <posix.html#538>`_ - - `SC_ASYNCHRONOUS_IO`:idx: - `posix.html#539 <posix.html#539>`_ - - `SC_ATEXIT_MAX`:idx: - `posix.html#540 <posix.html#540>`_ - - `SC_BARRIERS`:idx: - `posix.html#541 <posix.html#541>`_ - - `SC_BC_BASE_MAX`:idx: - `posix.html#542 <posix.html#542>`_ - - `SC_BC_DIM_MAX`:idx: - `posix.html#543 <posix.html#543>`_ - - `SC_BC_SCALE_MAX`:idx: - `posix.html#544 <posix.html#544>`_ - - `SC_BC_STRING_MAX`:idx: - `posix.html#545 <posix.html#545>`_ - - `SC_CHILD_MAX`:idx: - `posix.html#546 <posix.html#546>`_ - - `SC_CLK_TCK`:idx: - `posix.html#547 <posix.html#547>`_ - - `SC_CLOCK_SELECTION`:idx: - `posix.html#548 <posix.html#548>`_ - - `SC_COLL_WEIGHTS_MAX`:idx: - `posix.html#549 <posix.html#549>`_ - - `SC_CPUTIME`:idx: - `posix.html#550 <posix.html#550>`_ - - `SC_DELAYTIMER_MAX`:idx: - `posix.html#551 <posix.html#551>`_ - - `SC_EXPR_NEST_MAX`:idx: - `posix.html#552 <posix.html#552>`_ - - `SC_FSYNC`:idx: - `posix.html#553 <posix.html#553>`_ - - `SC_GETGR_R_SIZE_MAX`:idx: - `posix.html#554 <posix.html#554>`_ - - `SC_GETPW_R_SIZE_MAX`:idx: - `posix.html#555 <posix.html#555>`_ - - `SCHED_FIFO`:idx: - `posix.html#770 <posix.html#770>`_ - - `sched_getparam`:idx: - `posix.html#1154 <posix.html#1154>`_ - - `sched_get_priority_max`:idx: - `posix.html#1152 <posix.html#1152>`_ - - `sched_get_priority_min`:idx: - `posix.html#1153 <posix.html#1153>`_ - - `sched_getscheduler`:idx: - `posix.html#1155 <posix.html#1155>`_ - - `SCHED_OTHER`:idx: - `posix.html#773 <posix.html#773>`_ - - `SCHED_RR`:idx: - `posix.html#771 <posix.html#771>`_ - - `sched_rr_get_interval`:idx: - `posix.html#1156 <posix.html#1156>`_ - - `sched_setparam`:idx: - `posix.html#1157 <posix.html#1157>`_ - - `sched_setscheduler`:idx: - `posix.html#1158 <posix.html#1158>`_ - - `SCHED_SPORADIC`:idx: - `posix.html#772 <posix.html#772>`_ - - `sched_yield`:idx: - `posix.html#1159 <posix.html#1159>`_ - - `SC_HOST_NAME_MAX`:idx: - `posix.html#556 <posix.html#556>`_ - - `SC_IOV_MAX`:idx: - `posix.html#557 <posix.html#557>`_ - - `SC_IPV6`:idx: - `posix.html#558 <posix.html#558>`_ - - `SC_JOB_CONTROL`:idx: - `posix.html#559 <posix.html#559>`_ - - `SC_LINE_MAX`:idx: - `posix.html#560 <posix.html#560>`_ - - `SC_LOGIN_NAME_MAX`:idx: - `posix.html#561 <posix.html#561>`_ - - `SC_MAPPED_FILES`:idx: - `posix.html#562 <posix.html#562>`_ - - `SC_MEMLOCK`:idx: - `posix.html#563 <posix.html#563>`_ - - `SC_MEMLOCK_RANGE`:idx: - `posix.html#564 <posix.html#564>`_ - - `SC_MEMORY_PROTECTION`:idx: - `posix.html#565 <posix.html#565>`_ - - `SC_MESSAGE_PASSING`:idx: - `posix.html#566 <posix.html#566>`_ - - `SC_MONOTONIC_CLOCK`:idx: - `posix.html#567 <posix.html#567>`_ - - `SC_MQ_OPEN_MAX`:idx: - `posix.html#568 <posix.html#568>`_ - - `SC_MQ_PRIO_MAX`:idx: - `posix.html#569 <posix.html#569>`_ - - `SC_NGROUPS_MAX`:idx: - `posix.html#570 <posix.html#570>`_ - - `scope`:idx: - * `manual.html#106 <manual.html#106>`_ - * `manual.html#218 <manual.html#218>`_ - - `SC_OPEN_MAX`:idx: - `posix.html#571 <posix.html#571>`_ - - `SC_PAGE_SIZE`:idx: - `posix.html#572 <posix.html#572>`_ - - `SC_PRIORITIZED_IO`:idx: - `posix.html#573 <posix.html#573>`_ - - `SC_PRIORITY_SCHEDULING`:idx: - `posix.html#574 <posix.html#574>`_ - - `SC_RAW_SOCKETS`:idx: - `posix.html#575 <posix.html#575>`_ - - `SC_READER_WRITER_LOCKS`:idx: - `posix.html#577 <posix.html#577>`_ - - `SC_REALTIME_SIGNALS`:idx: - `posix.html#578 <posix.html#578>`_ - - `SC_RE_DUP_MAX`:idx: - `posix.html#576 <posix.html#576>`_ - - `SC_REGEXP`:idx: - `posix.html#579 <posix.html#579>`_ - - `ScriptExt`:idx: - `os.html#108 <os.html#108>`_ - - `SC_RTSIG_MAX`:idx: - `posix.html#580 <posix.html#580>`_ - - `SC_SAVED_IDS`:idx: - `posix.html#581 <posix.html#581>`_ - - `SC_SEMAPHORES`:idx: - `posix.html#584 <posix.html#584>`_ - - `SC_SEM_NSEMS_MAX`:idx: - `posix.html#582 <posix.html#582>`_ - - `SC_SEM_VALUE_MAX`:idx: - `posix.html#583 <posix.html#583>`_ - - `SC_SHARED_MEMORY_OBJECTS`:idx: - `posix.html#585 <posix.html#585>`_ - - `SC_SHELL`:idx: - `posix.html#586 <posix.html#586>`_ - - `SC_SIGQUEUE_MAX`:idx: - `posix.html#587 <posix.html#587>`_ - - `SC_SPAWN`:idx: - `posix.html#588 <posix.html#588>`_ - - `SC_SPIN_LOCKS`:idx: - `posix.html#589 <posix.html#589>`_ - - `SC_SPORADIC_SERVER`:idx: - `posix.html#590 <posix.html#590>`_ - - `SC_SS_REPL_MAX`:idx: - `posix.html#591 <posix.html#591>`_ - - `SC_STREAM_MAX`:idx: - `posix.html#592 <posix.html#592>`_ - - `SC_SYMLOOP_MAX`:idx: - `posix.html#593 <posix.html#593>`_ - - `SC_SYNCHRONIZED_IO`:idx: - `posix.html#594 <posix.html#594>`_ - - `SC_THREAD_ATTR_STACKADDR`:idx: - `posix.html#595 <posix.html#595>`_ - - `SC_THREAD_ATTR_STACKSIZE`:idx: - `posix.html#596 <posix.html#596>`_ - - `SC_THREAD_CPUTIME`:idx: - `posix.html#597 <posix.html#597>`_ - - `SC_THREAD_DESTRUCTOR_ITERATIONS`:idx: - `posix.html#598 <posix.html#598>`_ - - `SC_THREAD_KEYS_MAX`:idx: - `posix.html#599 <posix.html#599>`_ - - `SC_THREAD_PRIO_INHERIT`:idx: - `posix.html#600 <posix.html#600>`_ - - `SC_THREAD_PRIO_PROTECT`:idx: - `posix.html#601 <posix.html#601>`_ - - `SC_THREAD_PRIORITY_SCHEDULING`:idx: - `posix.html#602 <posix.html#602>`_ - - `SC_THREAD_PROCESS_SHARED`:idx: - `posix.html#603 <posix.html#603>`_ - - `SC_THREADS`:idx: - `posix.html#608 <posix.html#608>`_ - - `SC_THREAD_SAFE_FUNCTIONS`:idx: - `posix.html#604 <posix.html#604>`_ - - `SC_THREAD_SPORADIC_SERVER`:idx: - `posix.html#605 <posix.html#605>`_ - - `SC_THREAD_STACK_MIN`:idx: - `posix.html#606 <posix.html#606>`_ - - `SC_THREAD_THREADS_MAX`:idx: - `posix.html#607 <posix.html#607>`_ - - `SC_TIMEOUTS`:idx: - `posix.html#609 <posix.html#609>`_ - - `SC_TIMER_MAX`:idx: - `posix.html#610 <posix.html#610>`_ - - `SC_TIMERS`:idx: - `posix.html#611 <posix.html#611>`_ - - `SC_TRACE`:idx: - `posix.html#612 <posix.html#612>`_ - - `SC_TRACE_EVENT_FILTER`:idx: - `posix.html#613 <posix.html#613>`_ - - `SC_TRACE_EVENT_NAME_MAX`:idx: - `posix.html#614 <posix.html#614>`_ - - `SC_TRACE_INHERIT`:idx: - `posix.html#615 <posix.html#615>`_ - - `SC_TRACE_LOG`:idx: - `posix.html#616 <posix.html#616>`_ - - `SC_TRACE_NAME_MAX`:idx: - `posix.html#617 <posix.html#617>`_ - - `SC_TRACE_SYS_MAX`:idx: - `posix.html#618 <posix.html#618>`_ - - `SC_TRACE_USER_EVENT_MAX`:idx: - `posix.html#619 <posix.html#619>`_ - - `SC_TTY_NAME_MAX`:idx: - `posix.html#620 <posix.html#620>`_ - - `SC_TYPED_MEMORY_OBJECTS`:idx: - `posix.html#621 <posix.html#621>`_ - - `SC_TZNAME_MAX`:idx: - `posix.html#622 <posix.html#622>`_ - - `SC_V6_ILP32_OFF32`:idx: - `posix.html#623 <posix.html#623>`_ - - `SC_V6_ILP32_OFFBIG`:idx: - `posix.html#624 <posix.html#624>`_ - - `SC_V6_LP64_OFF64`:idx: - `posix.html#625 <posix.html#625>`_ - - `SC_V6_LPBIG_OFFBIG`:idx: - `posix.html#626 <posix.html#626>`_ - - `SC_VERSION`:idx: - `posix.html#627 <posix.html#627>`_ - - `SC_XBS5_ILP32_OFF32`:idx: - `posix.html#628 <posix.html#628>`_ - - `SC_XBS5_ILP32_OFFBIG`:idx: - `posix.html#629 <posix.html#629>`_ - - `SC_XBS5_LP64_OFF64`:idx: - `posix.html#630 <posix.html#630>`_ - - `SC_XBS5_LPBIG_OFFBIG`:idx: - `posix.html#631 <posix.html#631>`_ - - `SC_XOPEN_CRYPT`:idx: - `posix.html#632 <posix.html#632>`_ - - `SC_XOPEN_ENH_I18N`:idx: - `posix.html#633 <posix.html#633>`_ - - `SC_XOPEN_LEGACY`:idx: - `posix.html#634 <posix.html#634>`_ - - `SC_XOPEN_REALTIME`:idx: - `posix.html#635 <posix.html#635>`_ - - `SC_XOPEN_REALTIME_THREADS`:idx: - `posix.html#636 <posix.html#636>`_ - - `SC_XOPEN_SHM`:idx: - `posix.html#637 <posix.html#637>`_ - - `SC_XOPEN_STREAMS`:idx: - `posix.html#638 <posix.html#638>`_ - - `SC_XOPEN_UNIX`:idx: - `posix.html#639 <posix.html#639>`_ - - `SC_XOPEN_VERSION`:idx: - `posix.html#640 <posix.html#640>`_ - - `SEEK_CUR`:idx: - `posix.html#776 <posix.html#776>`_ - - `seekdir`:idx: - `posix.html#805 <posix.html#805>`_ - - `SEEK_END`:idx: - `posix.html#777 <posix.html#777>`_ - - `SEEK_SET`:idx: - `posix.html#775 <posix.html#775>`_ - - `select`:idx: - `posix.html#1166 <posix.html#1166>`_ - - `sem_close`:idx: - `posix.html#1045 <posix.html#1045>`_ - - `sem_destroy`:idx: - `posix.html#1046 <posix.html#1046>`_ - - `SEM_FAILED`:idx: - `posix.html#641 <posix.html#641>`_ - - `sem_getvalue`:idx: - `posix.html#1047 <posix.html#1047>`_ - - `sem_init`:idx: - `posix.html#1048 <posix.html#1048>`_ - - `sem_open`:idx: - `posix.html#1049 <posix.html#1049>`_ - - `sem_post`:idx: - `posix.html#1050 <posix.html#1050>`_ - - `sem_timedwait`:idx: - `posix.html#1051 <posix.html#1051>`_ - - `sem_trywait`:idx: - `posix.html#1052 <posix.html#1052>`_ - - `sem_unlink`:idx: - `posix.html#1053 <posix.html#1053>`_ - - `sem_wait`:idx: - `posix.html#1054 <posix.html#1054>`_ - - `separate compilation`:idx: - `manual.html#215 <manual.html#215>`_ - - `seq`:idx: - `system.html#123 <system.html#123>`_ - - `seqToPtr`:idx: - `system.html#454 <system.html#454>`_ - - `Sequences`:idx: - `manual.html#154 <manual.html#154>`_ - - `set`:idx: - `system.html#124 <system.html#124>`_ - - `set type`:idx: - `manual.html#158 <manual.html#158>`_ - - `setcontext`:idx: - `posix.html#1190 <posix.html#1190>`_ - - `setCurrentDir`:idx: - `os.html#113 <os.html#113>`_ - - `setegid`:idx: - `posix.html#1021 <posix.html#1021>`_ - - `seteuid`:idx: - `posix.html#1022 <posix.html#1022>`_ - - `setFilePos`:idx: - `system.html#506 <system.html#506>`_ - - `setgid`:idx: - `posix.html#1023 <posix.html#1023>`_ - - `setgrent`:idx: - `posix.html#839 <posix.html#839>`_ - - `setLen`:idx: - * `system.html#405 <system.html#405>`_ - * `system.html#415 <system.html#415>`_ - - `setlocale`:idx: - `posix.html#847 <posix.html#847>`_ - - `setpgid`:idx: - `posix.html#1024 <posix.html#1024>`_ - - `setpgrp`:idx: - `posix.html#1025 <posix.html#1025>`_ - - `setpwent`:idx: - `posix.html#865 <posix.html#865>`_ - - `setregid`:idx: - `posix.html#1026 <posix.html#1026>`_ - - `setreuid`:idx: - `posix.html#1027 <posix.html#1027>`_ - - `setsid`:idx: - `posix.html#1028 <posix.html#1028>`_ - - `setuid`:idx: - `posix.html#1029 <posix.html#1029>`_ - - `shl`:idx: - * `system.html#223 <system.html#223>`_ - * `system.html#224 <system.html#224>`_ - * `system.html#225 <system.html#225>`_ - * `system.html#226 <system.html#226>`_ - * `system.html#227 <system.html#227>`_ - - `shm_open`:idx: - `posix.html#1090 <posix.html#1090>`_ - - `shm_unlink`:idx: - `posix.html#1091 <posix.html#1091>`_ - - `shr`:idx: - * `system.html#218 <system.html#218>`_ - * `system.html#219 <system.html#219>`_ - * `system.html#220 <system.html#220>`_ - * `system.html#221 <system.html#221>`_ - * `system.html#222 <system.html#222>`_ - - `S_IFBLK`:idx: - `posix.html#650 <posix.html#650>`_ - - `S_IFCHR`:idx: - `posix.html#651 <posix.html#651>`_ - - `S_IFDIR`:idx: - `posix.html#654 <posix.html#654>`_ - - `S_IFIFO`:idx: - `posix.html#652 <posix.html#652>`_ - - `S_IFLNK`:idx: - `posix.html#655 <posix.html#655>`_ - - `S_IFMT`:idx: - `posix.html#649 <posix.html#649>`_ - - `S_IFREG`:idx: - `posix.html#653 <posix.html#653>`_ - - `S_IFSOCK`:idx: - `posix.html#656 <posix.html#656>`_ - - `SIGABRT`:idx: - `posix.html#726 <posix.html#726>`_ - - `sigaction`:idx: - `posix.html#1128 <posix.html#1128>`_ - - `sigaddset`:idx: - `posix.html#1129 <posix.html#1129>`_ - - `SIGALRM`:idx: - `posix.html#727 <posix.html#727>`_ - - `sigaltstack`:idx: - `posix.html#1130 <posix.html#1130>`_ - - `SIG_BLOCK`:idx: - `posix.html#755 <posix.html#755>`_ - - `SIGBUS`:idx: - `posix.html#728 <posix.html#728>`_ - - `SIGCHLD`:idx: - `posix.html#729 <posix.html#729>`_ - - `SIGCONT`:idx: - `posix.html#730 <posix.html#730>`_ - - `sigdelset`:idx: - `posix.html#1131 <posix.html#1131>`_ - - `SIG_DFL`:idx: - `posix.html#719 <posix.html#719>`_ - - `sigemptyset`:idx: - `posix.html#1132 <posix.html#1132>`_ - - `SIG_ERR`:idx: - `posix.html#720 <posix.html#720>`_ - - `SIGEV_NONE`:idx: - `posix.html#723 <posix.html#723>`_ - - `SIGEV_SIGNAL`:idx: - `posix.html#724 <posix.html#724>`_ - - `SIGEV_THREAD`:idx: - `posix.html#725 <posix.html#725>`_ - - `sigfillset`:idx: - `posix.html#1133 <posix.html#1133>`_ - - `SIGFPE`:idx: - `posix.html#731 <posix.html#731>`_ - - `sighold`:idx: - `posix.html#1134 <posix.html#1134>`_ - - `SIGHUP`:idx: - `posix.html#732 <posix.html#732>`_ - - `SIG_IGN`:idx: - `posix.html#722 <posix.html#722>`_ - - `sigignore`:idx: - `posix.html#1135 <posix.html#1135>`_ - - `SIGILL`:idx: - `posix.html#733 <posix.html#733>`_ - - `SIGINT`:idx: - `posix.html#734 <posix.html#734>`_ - - `siginterrupt`:idx: - `posix.html#1136 <posix.html#1136>`_ - - `sigismember`:idx: - `posix.html#1137 <posix.html#1137>`_ - - `SIGKILL`:idx: - `posix.html#735 <posix.html#735>`_ - - `signal`:idx: - `posix.html#1138 <posix.html#1138>`_ - - `sigpause`:idx: - `posix.html#1139 <posix.html#1139>`_ - - `sigpending`:idx: - `posix.html#1140 <posix.html#1140>`_ - - `SIGPIPE`:idx: - `posix.html#736 <posix.html#736>`_ - - `SIGPOLL`:idx: - `posix.html#746 <posix.html#746>`_ - - `sigprocmask`:idx: - `posix.html#1141 <posix.html#1141>`_ - - `SIGPROF`:idx: - `posix.html#747 <posix.html#747>`_ - - `sigqueue`:idx: - `posix.html#1142 <posix.html#1142>`_ - - `SIGQUIT`:idx: - `posix.html#737 <posix.html#737>`_ - - `sigrelse`:idx: - `posix.html#1143 <posix.html#1143>`_ - - `SIGSEGV`:idx: - `posix.html#738 <posix.html#738>`_ - - `sigset`:idx: - `posix.html#1144 <posix.html#1144>`_ - - `SIG_SETMASK`:idx: - `posix.html#757 <posix.html#757>`_ - - `SIGSTKSZ`:idx: - `posix.html#767 <posix.html#767>`_ - - `SIGSTOP`:idx: - `posix.html#739 <posix.html#739>`_ - - `sigsuspend`:idx: - `posix.html#1145 <posix.html#1145>`_ - - `SIGSYS`:idx: - `posix.html#748 <posix.html#748>`_ - - `SIGTERM`:idx: - `posix.html#740 <posix.html#740>`_ - - `sigtimedwait`:idx: - `posix.html#1146 <posix.html#1146>`_ - - `SIGTRAP`:idx: - `posix.html#749 <posix.html#749>`_ - - `SIGTSTP`:idx: - `posix.html#741 <posix.html#741>`_ - - `SIGTTIN`:idx: - `posix.html#742 <posix.html#742>`_ - - `SIGTTOU`:idx: - `posix.html#743 <posix.html#743>`_ - - `SIG_UNBLOCK`:idx: - `posix.html#756 <posix.html#756>`_ - - `SIGURG`:idx: - `posix.html#750 <posix.html#750>`_ - - `SIGUSR1`:idx: - `posix.html#744 <posix.html#744>`_ - - `SIGUSR2`:idx: - `posix.html#745 <posix.html#745>`_ - - `SIGVTALRM`:idx: - `posix.html#751 <posix.html#751>`_ - - `sigwait`:idx: - `posix.html#1147 <posix.html#1147>`_ - - `sigwaitinfo`:idx: - `posix.html#1148 <posix.html#1148>`_ - - `SIGXCPU`:idx: - `posix.html#752 <posix.html#752>`_ - - `SIGXFSZ`:idx: - `posix.html#753 <posix.html#753>`_ - - `simple assertions`:idx: - `regexprs.html#103 <regexprs.html#103>`_ - - `simple statements`:idx: - `manual.html#175 <manual.html#175>`_ - - `sinh`:idx: - `math.html#124 <math.html#124>`_ - - `S_IRGRP`:idx: - `posix.html#662 <posix.html#662>`_ - - `S_IROTH`:idx: - `posix.html#666 <posix.html#666>`_ - - `S_IRUSR`:idx: - `posix.html#658 <posix.html#658>`_ - - `S_IRWXG`:idx: - `posix.html#661 <posix.html#661>`_ - - `S_IRWXO`:idx: - `posix.html#665 <posix.html#665>`_ - - `S_IRWXU`:idx: - `posix.html#657 <posix.html#657>`_ - - `S_ISBLK`:idx: - `posix.html#1067 <posix.html#1067>`_ - - `S_ISCHR`:idx: - `posix.html#1068 <posix.html#1068>`_ - - `S_ISDIR`:idx: - `posix.html#1069 <posix.html#1069>`_ - - `S_ISFIFO`:idx: - `posix.html#1070 <posix.html#1070>`_ - - `S_ISGID`:idx: - `posix.html#670 <posix.html#670>`_ - - `S_ISLNK`:idx: - `posix.html#1072 <posix.html#1072>`_ - - `S_ISREG`:idx: - `posix.html#1071 <posix.html#1071>`_ - - `S_ISSOCK`:idx: - `posix.html#1073 <posix.html#1073>`_ - - `S_ISUID`:idx: - `posix.html#669 <posix.html#669>`_ - - `S_ISVTX`:idx: - `posix.html#671 <posix.html#671>`_ - - `S_IWGRP`:idx: - `posix.html#663 <posix.html#663>`_ - - `S_IWOTH`:idx: - `posix.html#667 <posix.html#667>`_ - - `S_IWUSR`:idx: - `posix.html#659 <posix.html#659>`_ - - `S_IXGRP`:idx: - `posix.html#664 <posix.html#664>`_ - - `S_IXOTH`:idx: - `posix.html#668 <posix.html#668>`_ - - `S_IXUSR`:idx: - `posix.html#660 <posix.html#660>`_ - - `sizeof`:idx: - `system.html#153 <system.html#153>`_ - - `sleep`:idx: - `posix.html#1030 <posix.html#1030>`_ - - `split`:idx: - `strutils.html#118 <strutils.html#118>`_ - - `SplitFilename`:idx: - `os.html#125 <os.html#125>`_ - - `splitLines`:idx: - `strutils.html#119 <strutils.html#119>`_ - - `splitLinesSeq`:idx: - `strutils.html#120 <strutils.html#120>`_ - - `SplitPath`:idx: - `os.html#121 <os.html#121>`_ - - `splitSeq`:idx: - `strutils.html#121 <strutils.html#121>`_ - - `SQL_ACCESS_MODE`:idx: - `odbcsql.html#406 <odbcsql.html#406>`_ - - `SQL_ADD`:idx: - `odbcsql.html#317 <odbcsql.html#317>`_ - - `SQLAllocHandle`:idx: - `odbcsql.html#627 <odbcsql.html#627>`_ - - `SQL_ALL_TYPES`:idx: - `odbcsql.html#492 <odbcsql.html#492>`_ - - `SQL_API_SQLDESCRIBEPARAM`:idx: - `odbcsql.html#229 <odbcsql.html#229>`_ - - `SQL_ARD_TYPE`:idx: - `odbcsql.html#494 <odbcsql.html#494>`_ - - `SQL_ASYNC_ENABLE`:idx: - `odbcsql.html#383 <odbcsql.html#383>`_ - - `SQL_ATTR_ACCESS_MODE`:idx: - `odbcsql.html#415 <odbcsql.html#415>`_ - - `SQL_ATTR_APP_PARAM_DESC`:idx: - `odbcsql.html#374 <odbcsql.html#374>`_ - - `SQL_ATTR_APP_ROW_DESC`:idx: - `odbcsql.html#373 <odbcsql.html#373>`_ - - `SQL_ATTR_AUTOCOMMIT`:idx: - `odbcsql.html#400 <odbcsql.html#400>`_ - - `SQL_ATTR_AUTO_IPD`:idx: - `odbcsql.html#371 <odbcsql.html#371>`_ - - `SQL_ATTR_CONCURRENCY`:idx: - `odbcsql.html#395 <odbcsql.html#395>`_ - - `SQL_ATTR_CONNECTION_DEAD`:idx: - `odbcsql.html#416 <odbcsql.html#416>`_ - - `SQL_ATTR_CONNECTION_TIMEOUT`:idx: - `odbcsql.html#417 <odbcsql.html#417>`_ - - `SQL_ATTR_CURRENT_CATALOG`:idx: - `odbcsql.html#418 <odbcsql.html#418>`_ - - `SQL_ATTR_CURSOR_SCROLLABLE`:idx: - `odbcsql.html#377 <odbcsql.html#377>`_ - - `SQL_ATTR_CURSOR_SENSITIVITY`:idx: - `odbcsql.html#378 <odbcsql.html#378>`_ - - `SQL_ATTR_CURSOR_TYPE`:idx: - `odbcsql.html#394 <odbcsql.html#394>`_ - - `SQL_ATTR_DISCONNECT_BEHAVIOR`:idx: - `odbcsql.html#419 <odbcsql.html#419>`_ - - `SQL_ATTR_ENLIST_IN_DTC`:idx: - `odbcsql.html#420 <odbcsql.html#420>`_ - - `SQL_ATTR_ENLIST_IN_XA`:idx: - `odbcsql.html#421 <odbcsql.html#421>`_ - - `SQL_ATTR_FETCH_BOOKMARK_PTR`:idx: - `odbcsql.html#396 <odbcsql.html#396>`_ - - `SQL_ATTR_IMP_PARAM_DESC`:idx: - `odbcsql.html#376 <odbcsql.html#376>`_ - - `SQL_ATTR_IMP_ROW_DESC`:idx: - `odbcsql.html#375 <odbcsql.html#375>`_ - - `SQL_ATTR_LOGIN_TIMEOUT`:idx: - `odbcsql.html#422 <odbcsql.html#422>`_ - - `SQL_ATTR_MAX_ROWS`:idx: - `odbcsql.html#404 <odbcsql.html#404>`_ - - `SQL_ATTR_METADATA_ID`:idx: - `odbcsql.html#372 <odbcsql.html#372>`_ - - `SQL_ATTR_ODBC_CURSORS`:idx: - `odbcsql.html#341 <odbcsql.html#341>`_ - - `SQL_ATTR_ODBC_VERSION`:idx: - `odbcsql.html#240 <odbcsql.html#240>`_ - - `SQL_ATTR_OUTPUT_NTS`:idx: - `odbcsql.html#370 <odbcsql.html#370>`_ - - `SQL_ATTR_PACKET_SIZE`:idx: - `odbcsql.html#423 <odbcsql.html#423>`_ - - `SQL_ATTR_QUIET_MODE`:idx: - `odbcsql.html#424 <odbcsql.html#424>`_ - - `SQL_ATTR_ROW_ARRAY_SIZE`:idx: - `odbcsql.html#620 <odbcsql.html#620>`_ - - `SQL_ATTR_ROW_NUMBER`:idx: - `odbcsql.html#401 <odbcsql.html#401>`_ - - `SQL_ATTR_ROWS_FETCHED_PTR`:idx: - `odbcsql.html#398 <odbcsql.html#398>`_ - - `SQL_ATTR_ROW_STATUS_PTR`:idx: - `odbcsql.html#397 <odbcsql.html#397>`_ - - `SQL_ATTR_TRACE`:idx: - `odbcsql.html#425 <odbcsql.html#425>`_ - - `SQL_ATTR_TRACEFILE`:idx: - `odbcsql.html#426 <odbcsql.html#426>`_ - - `SQL_ATTR_TRANSLATE_LIB`:idx: - `odbcsql.html#427 <odbcsql.html#427>`_ - - `SQL_ATTR_TRANSLATE_OPTION`:idx: - `odbcsql.html#428 <odbcsql.html#428>`_ - - `SQL_ATTR_TXN_ISOLATION`:idx: - `odbcsql.html#403 <odbcsql.html#403>`_ - - `SQL_ATTR_USE_BOOKMARKS`:idx: - `odbcsql.html#405 <odbcsql.html#405>`_ - - `SQL_AUTOCOMMIT`:idx: - `odbcsql.html#399 <odbcsql.html#399>`_ - - `SQL_AUTOCOMMIT_DEFAULT`:idx: - `odbcsql.html#434 <odbcsql.html#434>`_ - - `SQL_AUTOCOMMIT_OFF`:idx: - `odbcsql.html#432 <odbcsql.html#432>`_ - - `SQL_AUTOCOMMIT_ON`:idx: - `odbcsql.html#433 <odbcsql.html#433>`_ - - `SQL_BEST_ROWID`:idx: - `odbcsql.html#523 <odbcsql.html#523>`_ - - `SQL_BIGINT`:idx: - `odbcsql.html#130 <odbcsql.html#130>`_ - - `SQL_BINARY`:idx: - `odbcsql.html#127 <odbcsql.html#127>`_ - - `SQLBindCol`:idx: - `odbcsql.html#652 <odbcsql.html#652>`_ - - `SQLBindParameter`:idx: - `odbcsql.html#660 <odbcsql.html#660>`_ - - `SQL_BIND_TYPE`:idx: - `odbcsql.html#384 <odbcsql.html#384>`_ - - `SQL_BIT`:idx: - `odbcsql.html#132 <odbcsql.html#132>`_ - - `SQL_BOOKMARK_PERSISTENCE`:idx: - `odbcsql.html#262 <odbcsql.html#262>`_ - - `SQL_BP_CLOSE`:idx: - `odbcsql.html#264 <odbcsql.html#264>`_ - - `SQL_BP_DELETE`:idx: - `odbcsql.html#265 <odbcsql.html#265>`_ - - `SQL_BP_DROP`:idx: - `odbcsql.html#266 <odbcsql.html#266>`_ - - `SQL_BP_OTHER_HSTMT`:idx: - `odbcsql.html#269 <odbcsql.html#269>`_ - - `SQL_BP_SCROLL`:idx: - `odbcsql.html#270 <odbcsql.html#270>`_ - - `SQL_BP_TRANSACTION`:idx: - `odbcsql.html#267 <odbcsql.html#267>`_ - - `SQL_BP_UPDATE`:idx: - `odbcsql.html#268 <odbcsql.html#268>`_ - - `SQLBrowseConnect`:idx: - `odbcsql.html#636 <odbcsql.html#636>`_ - - `SQLBulkOperations`:idx: - `odbcsql.html#650 <odbcsql.html#650>`_ - - `SQL_CA1_ABSOLUTE`:idx: - `odbcsql.html#282 <odbcsql.html#282>`_ - - `SQL_CA1_BOOKMARK`:idx: - `odbcsql.html#284 <odbcsql.html#284>`_ - - `SQL_CA1_BULK_ADD`:idx: - `odbcsql.html#295 <odbcsql.html#295>`_ - - `SQL_CA1_BULK_DELETE_BY_BOOKMARK`:idx: - `odbcsql.html#297 <odbcsql.html#297>`_ - - `SQL_CA1_BULK_FETCH_BY_BOOKMARK`:idx: - `odbcsql.html#298 <odbcsql.html#298>`_ - - `SQL_CA1_BULK_UPDATE_BY_BOOKMARK`:idx: - `odbcsql.html#296 <odbcsql.html#296>`_ - - `SQL_CA1_LOCK_EXCLUSIVE`:idx: - `odbcsql.html#286 <odbcsql.html#286>`_ - - `SQL_CA1_LOCK_NO_CHANGE`:idx: - `odbcsql.html#285 <odbcsql.html#285>`_ - - `SQL_CA1_LOCK_UNLOCK`:idx: - `odbcsql.html#287 <odbcsql.html#287>`_ - - `SQL_CA1_NEXT`:idx: - `odbcsql.html#281 <odbcsql.html#281>`_ - - `SQL_CA1_POS_DELETE`:idx: - `odbcsql.html#290 <odbcsql.html#290>`_ - - `SQL_CA1_POSITIONED_DELETE`:idx: - `odbcsql.html#293 <odbcsql.html#293>`_ - - `SQL_CA1_POSITIONED_UPDATE`:idx: - `odbcsql.html#292 <odbcsql.html#292>`_ - - `SQL_CA1_POS_POSITION`:idx: - `odbcsql.html#288 <odbcsql.html#288>`_ - - `SQL_CA1_POS_REFRESH`:idx: - `odbcsql.html#291 <odbcsql.html#291>`_ - - `SQL_CA1_POS_UPDATE`:idx: - `odbcsql.html#289 <odbcsql.html#289>`_ - - `SQL_CA1_RELATIVE`:idx: - `odbcsql.html#283 <odbcsql.html#283>`_ - - `SQL_CA1_SELECT_FOR_UPDATE`:idx: - `odbcsql.html#294 <odbcsql.html#294>`_ - - `SQL_CA2_CRC_APPROXIMATE`:idx: - `odbcsql.html#313 <odbcsql.html#313>`_ - - `SQL_CA2_CRC_EXACT`:idx: - `odbcsql.html#312 <odbcsql.html#312>`_ - - `SQL_CA2_LOCK_CONCURRENCY`:idx: - `odbcsql.html#300 <odbcsql.html#300>`_ - - `SQL_CA2_MAX_ROWS_AFFECTS_ALL`:idx: - `odbcsql.html#311 <odbcsql.html#311>`_ - - `SQL_CA2_MAX_ROWS_CATALOG`:idx: - `odbcsql.html#310 <odbcsql.html#310>`_ - - `SQL_CA2_MAX_ROWS_DELETE`:idx: - `odbcsql.html#308 <odbcsql.html#308>`_ - - `SQL_CA2_MAX_ROWS_INSERT`:idx: - `odbcsql.html#307 <odbcsql.html#307>`_ - - `SQL_CA2_MAX_ROWS_SELECT`:idx: - `odbcsql.html#306 <odbcsql.html#306>`_ - - `SQL_CA2_MAX_ROWS_UPDATE`:idx: - `odbcsql.html#309 <odbcsql.html#309>`_ - - `SQL_CA2_OPT_ROWVER_CONCURRENCY`:idx: - `odbcsql.html#301 <odbcsql.html#301>`_ - - `SQL_CA2_OPT_VALUES_CONCURRENCY`:idx: - `odbcsql.html#302 <odbcsql.html#302>`_ - - `SQL_CA2_READ_ONLY_CONCURRENCY`:idx: - `odbcsql.html#299 <odbcsql.html#299>`_ - - `SQL_CA2_SENSITIVITY_ADDITIONS`:idx: - `odbcsql.html#303 <odbcsql.html#303>`_ - - `SQL_CA2_SENSITIVITY_DELETIONS`:idx: - `odbcsql.html#304 <odbcsql.html#304>`_ - - `SQL_CA2_SENSITIVITY_UPDATES`:idx: - `odbcsql.html#305 <odbcsql.html#305>`_ - - `SQL_CA2_SIMULATE_NON_UNIQUE`:idx: - `odbcsql.html#314 <odbcsql.html#314>`_ - - `SQL_CA2_SIMULATE_TRY_UNIQUE`:idx: - `odbcsql.html#315 <odbcsql.html#315>`_ - - `SQL_CA2_SIMULATE_UNIQUE`:idx: - `odbcsql.html#316 <odbcsql.html#316>`_ - - `SQL_CATALOG_NAME`:idx: - `odbcsql.html#545 <odbcsql.html#545>`_ - - `SQL_C_BINARY`:idx: - `odbcsql.html#212 <odbcsql.html#212>`_ - - `SQL_C_BIT`:idx: - `odbcsql.html#213 <odbcsql.html#213>`_ - - `SQL_C_BOOKMARK`:idx: - `odbcsql.html#223 <odbcsql.html#223>`_ - - `SQL_C_CHAR`:idx: - `odbcsql.html#184 <odbcsql.html#184>`_ - - `SQL_C_DATE`:idx: - `odbcsql.html#193 <odbcsql.html#193>`_ - - `SQL_C_DEFAULT`:idx: - `odbcsql.html#190 <odbcsql.html#190>`_ - - `SQL_C_DOUBLE`:idx: - `odbcsql.html#188 <odbcsql.html#188>`_ - - `SQL_C_FLOAT`:idx: - `odbcsql.html#187 <odbcsql.html#187>`_ - - `SQL_C_GUID`:idx: - `odbcsql.html#224 <odbcsql.html#224>`_ - - `SQL_CHAR`:idx: - `odbcsql.html#136 <odbcsql.html#136>`_ - - `SQL_C_INTERVAL_DAY`:idx: - `odbcsql.html#201 <odbcsql.html#201>`_ - - `SQL_C_INTERVAL_DAY_TO_HOUR`:idx: - `odbcsql.html#206 <odbcsql.html#206>`_ - - `SQL_C_INTERVAL_DAY_TO_MINUTE`:idx: - `odbcsql.html#207 <odbcsql.html#207>`_ - - `SQL_C_INTERVAL_DAY_TO_SECOND`:idx: - `odbcsql.html#208 <odbcsql.html#208>`_ - - `SQL_C_INTERVAL_HOUR`:idx: - `odbcsql.html#202 <odbcsql.html#202>`_ - - `SQL_C_INTERVAL_HOUR_TO_MINUTE`:idx: - `odbcsql.html#209 <odbcsql.html#209>`_ - - `SQL_C_INTERVAL_HOUR_TO_SECOND`:idx: - `odbcsql.html#210 <odbcsql.html#210>`_ - - `SQL_C_INTERVAL_MINUTE`:idx: - `odbcsql.html#203 <odbcsql.html#203>`_ - - `SQL_C_INTERVAL_MINUTE_TO_SECOND`:idx: - `odbcsql.html#211 <odbcsql.html#211>`_ - - `SQL_C_INTERVAL_MONTH`:idx: - `odbcsql.html#200 <odbcsql.html#200>`_ - - `SQL_C_INTERVAL_SECOND`:idx: - `odbcsql.html#204 <odbcsql.html#204>`_ - - `SQL_C_INTERVAL_YEAR`:idx: - `odbcsql.html#199 <odbcsql.html#199>`_ - - `SQL_C_INTERVAL_YEAR_TO_MONTH`:idx: - `odbcsql.html#205 <odbcsql.html#205>`_ - - `SQL_C_LONG`:idx: - `odbcsql.html#185 <odbcsql.html#185>`_ - - `SQL_CLOSE`:idx: - `odbcsql.html#503 <odbcsql.html#503>`_ - - `SQLCloseCursor`:idx: - `odbcsql.html#639 <odbcsql.html#639>`_ - - `SQL_C_NUMERIC`:idx: - `odbcsql.html#189 <odbcsql.html#189>`_ - - `SQL_CODE_DATE`:idx: - `odbcsql.html#495 <odbcsql.html#495>`_ - - `SQL_CODE_DAY`:idx: - `odbcsql.html#156 <odbcsql.html#156>`_ - - `SQL_CODE_DAY_TO_HOUR`:idx: - `odbcsql.html#161 <odbcsql.html#161>`_ - - `SQL_CODE_DAY_TO_MINUTE`:idx: - `odbcsql.html#162 <odbcsql.html#162>`_ - - `SQL_CODE_DAY_TO_SECOND`:idx: - `odbcsql.html#163 <odbcsql.html#163>`_ - - `SQL_CODE_HOUR`:idx: - `odbcsql.html#157 <odbcsql.html#157>`_ - - `SQL_CODE_HOUR_TO_MINUTE`:idx: - `odbcsql.html#164 <odbcsql.html#164>`_ - - `SQL_CODE_HOUR_TO_SECOND`:idx: - `odbcsql.html#165 <odbcsql.html#165>`_ - - `SQL_CODE_MINUTE`:idx: - `odbcsql.html#158 <odbcsql.html#158>`_ - - `SQL_CODE_MINUTE_TO_SECOND`:idx: - `odbcsql.html#166 <odbcsql.html#166>`_ - - `SQL_CODE_MONTH`:idx: - `odbcsql.html#155 <odbcsql.html#155>`_ - - `SQL_CODE_SECOND`:idx: - `odbcsql.html#159 <odbcsql.html#159>`_ - - `SQL_CODE_TIME`:idx: - `odbcsql.html#496 <odbcsql.html#496>`_ - - `SQL_CODE_TIMESTAMP`:idx: - `odbcsql.html#497 <odbcsql.html#497>`_ - - `SQL_CODE_YEAR`:idx: - `odbcsql.html#154 <odbcsql.html#154>`_ - - `SQL_CODE_YEAR_TO_MONTH`:idx: - `odbcsql.html#160 <odbcsql.html#160>`_ - - `SQL_COLATT_OPT_MAX`:idx: - `odbcsql.html#588 <odbcsql.html#588>`_ - - `SQLColAttribute`:idx: - `odbcsql.html#662 <odbcsql.html#662>`_ - - `SQL_COLLATION_SEQ`:idx: - `odbcsql.html#546 <odbcsql.html#546>`_ - - `SQL_COLUMN_AUTO_INCREMENT`:idx: - `odbcsql.html#580 <odbcsql.html#580>`_ - - `SQL_COLUMN_CASE_SENSITIVE`:idx: - `odbcsql.html#581 <odbcsql.html#581>`_ - - `SQL_COLUMN_COUNT`:idx: - `odbcsql.html#569 <odbcsql.html#569>`_ - - `SQL_COLUMN_DISPLAY_SIZE`:idx: - `odbcsql.html#575 <odbcsql.html#575>`_ - - `SQL_COLUMN_DRIVER_START`:idx: - `odbcsql.html#589 <odbcsql.html#589>`_ - - `SQL_COLUMN_LABEL`:idx: - `odbcsql.html#587 <odbcsql.html#587>`_ - - `SQL_COLUMN_LENGTH`:idx: - `odbcsql.html#572 <odbcsql.html#572>`_ - - `SQL_COLUMN_MONEY`:idx: - `odbcsql.html#578 <odbcsql.html#578>`_ - - `SQL_COLUMN_NAME`:idx: - `odbcsql.html#570 <odbcsql.html#570>`_ - - `SQL_COLUMN_NULLABLE`:idx: - `odbcsql.html#576 <odbcsql.html#576>`_ - - `SQL_COLUMN_OWNER_NAME`:idx: - `odbcsql.html#585 <odbcsql.html#585>`_ - - `SQL_COLUMN_PRECISION`:idx: - `odbcsql.html#573 <odbcsql.html#573>`_ - - `SQL_COLUMN_QUALIFIER_NAME`:idx: - `odbcsql.html#586 <odbcsql.html#586>`_ - - `SQLColumns`:idx: - `odbcsql.html#665 <odbcsql.html#665>`_ - - `SQL_COLUMN_SCALE`:idx: - `odbcsql.html#574 <odbcsql.html#574>`_ - - `SQL_COLUMN_SEARCHABLE`:idx: - `odbcsql.html#582 <odbcsql.html#582>`_ - - `SQL_COLUMN_TABLE_NAME`:idx: - `odbcsql.html#584 <odbcsql.html#584>`_ - - `SQL_COLUMN_TYPE`:idx: - `odbcsql.html#571 <odbcsql.html#571>`_ - - `SQL_COLUMN_TYPE_NAME`:idx: - `odbcsql.html#583 <odbcsql.html#583>`_ - - `SQL_COLUMN_UNSIGNED`:idx: - `odbcsql.html#577 <odbcsql.html#577>`_ - - `SQL_COLUMN_UPDATABLE`:idx: - `odbcsql.html#579 <odbcsql.html#579>`_ - - `SQL_COMMIT`:idx: - `odbcsql.html#618 <odbcsql.html#618>`_ - - `SQL_CONCUR_DEFAULT`:idx: - `odbcsql.html#446 <odbcsql.html#446>`_ - - `SQL_CONCUR_LOCK`:idx: - `odbcsql.html#443 <odbcsql.html#443>`_ - - `SQL_CONCUR_READ_ONLY`:idx: - `odbcsql.html#442 <odbcsql.html#442>`_ - - `SQL_CONCURRENCY`:idx: - `odbcsql.html#386 <odbcsql.html#386>`_ - - `SQL_CONCUR_ROWVER`:idx: - `odbcsql.html#444 <odbcsql.html#444>`_ - - `SQL_CONCUR_VALUES`:idx: - `odbcsql.html#445 <odbcsql.html#445>`_ - - `SQLConnect`:idx: - `odbcsql.html#633 <odbcsql.html#633>`_ - - `SQL_C_SBIGINT`:idx: - `odbcsql.html#214 <odbcsql.html#214>`_ - - `SQL_C_SHORT`:idx: - `odbcsql.html#186 <odbcsql.html#186>`_ - - `SQL_C_SLONG`:idx: - `odbcsql.html#217 <odbcsql.html#217>`_ - - `SQL_C_SSHORT`:idx: - `odbcsql.html#218 <odbcsql.html#218>`_ - - `SQL_C_STINYINT`:idx: - `odbcsql.html#219 <odbcsql.html#219>`_ - - `SQL_C_TIME`:idx: - `odbcsql.html#194 <odbcsql.html#194>`_ - - `SQL_C_TIMESTAMP`:idx: - `odbcsql.html#195 <odbcsql.html#195>`_ - - `SQL_C_TINYINT`:idx: - `odbcsql.html#216 <odbcsql.html#216>`_ - - `SQL_C_TYPE_DATE`:idx: - `odbcsql.html#196 <odbcsql.html#196>`_ - - `SQL_C_TYPE_TIME`:idx: - `odbcsql.html#197 <odbcsql.html#197>`_ - - `SQL_C_TYPE_TIMESTAMP`:idx: - `odbcsql.html#198 <odbcsql.html#198>`_ - - `SQL_C_UBIGINT`:idx: - `odbcsql.html#215 <odbcsql.html#215>`_ - - `SQL_C_ULONG`:idx: - `odbcsql.html#220 <odbcsql.html#220>`_ - - `SQL_CUR_DEFAULT`:idx: - `odbcsql.html#345 <odbcsql.html#345>`_ - - `SQL_CURRENT_QUALIFIER`:idx: - `odbcsql.html#412 <odbcsql.html#412>`_ - - `SQL_CURSOR_DYNAMIC`:idx: - `odbcsql.html#439 <odbcsql.html#439>`_ - - `SQL_CURSOR_FORWARD_ONLY`:idx: - `odbcsql.html#437 <odbcsql.html#437>`_ - - `SQL_CURSOR_KEYSET_DRIVEN`:idx: - `odbcsql.html#438 <odbcsql.html#438>`_ - - `SQL_CURSOR_SENSITIVITY`:idx: - `odbcsql.html#543 <odbcsql.html#543>`_ - - `SQL_CURSOR_STATIC`:idx: - `odbcsql.html#440 <odbcsql.html#440>`_ - - `SQL_CURSOR_TYPE`:idx: - `odbcsql.html#385 <odbcsql.html#385>`_ - - `SQL_CURSOR_TYPE_DEFAULT`:idx: - `odbcsql.html#441 <odbcsql.html#441>`_ - - `SQL_CUR_USE_DRIVER`:idx: - `odbcsql.html#344 <odbcsql.html#344>`_ - - `SQL_CUR_USE_IF_NEEDED`:idx: - `odbcsql.html#342 <odbcsql.html#342>`_ - - `SQL_CUR_USE_ODBC`:idx: - `odbcsql.html#343 <odbcsql.html#343>`_ - - `SQL_C_USHORT`:idx: - `odbcsql.html#221 <odbcsql.html#221>`_ - - `SQL_C_UTINYINT`:idx: - `odbcsql.html#222 <odbcsql.html#222>`_ - - `SQL_C_VARBOOKMARK`:idx: - `odbcsql.html#228 <odbcsql.html#228>`_ - - `SQL_DATA_AT_EXEC`:idx: - `odbcsql.html#353 <odbcsql.html#353>`_ - - `SQLDataSources`:idx: - `odbcsql.html#654 <odbcsql.html#654>`_ - - `SQL_DATE`:idx: - `odbcsql.html#149 <odbcsql.html#149>`_ - - `SQL_DATE_LEN`:idx: - `odbcsql.html#363 <odbcsql.html#363>`_ - - `SQL_DATE_STRUCT`:idx: - `odbcsql.html#231 <odbcsql.html#231>`_ - - `SQL_DATETIME`:idx: - `odbcsql.html#144 <odbcsql.html#144>`_ - - `SQL_DECIMAL`:idx: - `odbcsql.html#138 <odbcsql.html#138>`_ - - `SQL_DEFAULT`:idx: - `odbcsql.html#493 <odbcsql.html#493>`_ - - `SQL_DELETE`:idx: - `odbcsql.html#325 <odbcsql.html#325>`_ - - `SQL_DELETE_BY_BOOKMARK`:idx: - `odbcsql.html#320 <odbcsql.html#320>`_ - - `SQL_DESC_ALLOC_TYPE`:idx: - `odbcsql.html#460 <odbcsql.html#460>`_ - - `SQL_DESC_ARRAY_SIZE`:idx: - `odbcsql.html#590 <odbcsql.html#590>`_ - - `SQL_DESC_ARRAY_STATUS_PTR`:idx: - `odbcsql.html#591 <odbcsql.html#591>`_ - - `SQL_DESC_AUTO_UNIQUE_VALUE`:idx: - `odbcsql.html#592 <odbcsql.html#592>`_ - - `SQL_DESC_BASE_COLUMN_NAME`:idx: - `odbcsql.html#593 <odbcsql.html#593>`_ - - `SQL_DESC_BASE_TABLE_NAME`:idx: - `odbcsql.html#594 <odbcsql.html#594>`_ - - `SQL_DESC_BIND_OFFSET_PTR`:idx: - `odbcsql.html#595 <odbcsql.html#595>`_ - - `SQL_DESC_BIND_TYPE`:idx: - `odbcsql.html#596 <odbcsql.html#596>`_ - - `SQL_DESC_CASE_SENSITIVE`:idx: - `odbcsql.html#597 <odbcsql.html#597>`_ - - `SQL_DESC_CATALOG_NAME`:idx: - `odbcsql.html#598 <odbcsql.html#598>`_ - - `SQL_DESC_CONCISE_TYPE`:idx: - `odbcsql.html#599 <odbcsql.html#599>`_ - - `SQL_DESC_COUNT`:idx: - `odbcsql.html#447 <odbcsql.html#447>`_ - - `SQL_DESC_DATA_PTR`:idx: - `odbcsql.html#456 <odbcsql.html#456>`_ - - `SQL_DESC_DATETIME_INTERVAL_CODE`:idx: - `odbcsql.html#453 <odbcsql.html#453>`_ - - `SQL_DESC_DATETIME_INTERVAL_PRECISION`:idx: - `odbcsql.html#600 <odbcsql.html#600>`_ - - `SQL_DESC_DISPLAY_SIZE`:idx: - `odbcsql.html#601 <odbcsql.html#601>`_ - - `SQL_DESC_FIXED_PREC_SCALE`:idx: - `odbcsql.html#602 <odbcsql.html#602>`_ - - `SQL_DESC_INDICATOR_PTR`:idx: - `odbcsql.html#455 <odbcsql.html#455>`_ - - `SQL_DESC_LABEL`:idx: - `odbcsql.html#603 <odbcsql.html#603>`_ - - `SQL_DESC_LENGTH`:idx: - `odbcsql.html#449 <odbcsql.html#449>`_ - - `SQL_DESC_LITERAL_PREFIX`:idx: - `odbcsql.html#604 <odbcsql.html#604>`_ - - `SQL_DESC_LITERAL_SUFFIX`:idx: - `odbcsql.html#605 <odbcsql.html#605>`_ - - `SQL_DESC_LOCAL_TYPE_NAME`:idx: - `odbcsql.html#606 <odbcsql.html#606>`_ - - `SQL_DESC_MAXIMUM_SCALE`:idx: - `odbcsql.html#607 <odbcsql.html#607>`_ - - `SQL_DESC_MINIMUM_SCALE`:idx: - `odbcsql.html#608 <odbcsql.html#608>`_ - - `SQL_DESC_NAME`:idx: - `odbcsql.html#457 <odbcsql.html#457>`_ - - `SQL_DESC_NULLABLE`:idx: - `odbcsql.html#454 <odbcsql.html#454>`_ - - `SQL_DESC_NUM_PREC_RADIX`:idx: - `odbcsql.html#609 <odbcsql.html#609>`_ - - `SQL_DESC_OCTET_LENGTH`:idx: - `odbcsql.html#459 <odbcsql.html#459>`_ - - `SQL_DESC_OCTET_LENGTH_PTR`:idx: - `odbcsql.html#450 <odbcsql.html#450>`_ - - `SQL_DESC_PARAMETER_TYPE`:idx: - `odbcsql.html#610 <odbcsql.html#610>`_ - - `SQL_DESC_PRECISION`:idx: - `odbcsql.html#451 <odbcsql.html#451>`_ - - `SQLDescribeCol`:idx: - `odbcsql.html#643 <odbcsql.html#643>`_ - - `SQL_DESCRIBE_PARAMETER`:idx: - `odbcsql.html#544 <odbcsql.html#544>`_ - - `SQL_DESC_ROWS_PROCESSED_PTR`:idx: - `odbcsql.html#611 <odbcsql.html#611>`_ - - `SQL_DESC_SCALE`:idx: - `odbcsql.html#452 <odbcsql.html#452>`_ - - `SQL_DESC_SCHEMA_NAME`:idx: - `odbcsql.html#612 <odbcsql.html#612>`_ - - `SQL_DESC_SEARCHABLE`:idx: - `odbcsql.html#613 <odbcsql.html#613>`_ - - `SQL_DESC_TABLE_NAME`:idx: - `odbcsql.html#615 <odbcsql.html#615>`_ - - `SQL_DESC_TYPE`:idx: - `odbcsql.html#448 <odbcsql.html#448>`_ - - `SQL_DESC_TYPE_NAME`:idx: - `odbcsql.html#614 <odbcsql.html#614>`_ - - `SQL_DESC_UNNAMED`:idx: - `odbcsql.html#458 <odbcsql.html#458>`_ - - `SQL_DESC_UNSIGNED`:idx: - `odbcsql.html#616 <odbcsql.html#616>`_ - - `SQL_DESC_UPDATABLE`:idx: - `odbcsql.html#617 <odbcsql.html#617>`_ - - `SQL_DIAG_ALTER_TABLE`:idx: - `odbcsql.html#473 <odbcsql.html#473>`_ - - `SQL_DIAG_CLASS_ORIGIN`:idx: - `odbcsql.html#468 <odbcsql.html#468>`_ - - `SQL_DIAG_CONNECTION_NAME`:idx: - `odbcsql.html#470 <odbcsql.html#470>`_ - - `SQL_DIAG_CREATE_INDEX`:idx: - `odbcsql.html#474 <odbcsql.html#474>`_ - - `SQL_DIAG_CREATE_TABLE`:idx: - `odbcsql.html#475 <odbcsql.html#475>`_ - - `SQL_DIAG_CREATE_VIEW`:idx: - `odbcsql.html#476 <odbcsql.html#476>`_ - - `SQL_DIAG_DELETE_WHERE`:idx: - `odbcsql.html#477 <odbcsql.html#477>`_ - - `SQL_DIAG_DROP_INDEX`:idx: - `odbcsql.html#478 <odbcsql.html#478>`_ - - `SQL_DIAG_DROP_TABLE`:idx: - `odbcsql.html#479 <odbcsql.html#479>`_ - - `SQL_DIAG_DROP_VIEW`:idx: - `odbcsql.html#480 <odbcsql.html#480>`_ - - `SQL_DIAG_DYNAMIC_DELETE_CURSOR`:idx: - `odbcsql.html#481 <odbcsql.html#481>`_ - - `SQL_DIAG_DYNAMIC_FUNCTION`:idx: - `odbcsql.html#467 <odbcsql.html#467>`_ - - `SQL_DIAG_DYNAMIC_FUNCTION_CODE`:idx: - `odbcsql.html#472 <odbcsql.html#472>`_ - - `SQL_DIAG_DYNAMIC_UPDATE_CURSOR`:idx: - `odbcsql.html#482 <odbcsql.html#482>`_ - - `SQL_DIAG_GRANT`:idx: - `odbcsql.html#483 <odbcsql.html#483>`_ - - `SQL_DIAG_INSERT`:idx: - `odbcsql.html#484 <odbcsql.html#484>`_ - - `SQL_DIAG_MESSAGE_TEXT`:idx: - `odbcsql.html#466 <odbcsql.html#466>`_ - - `SQL_DIAG_NATIVE`:idx: - `odbcsql.html#465 <odbcsql.html#465>`_ - - `SQL_DIAG_NUMBER`:idx: - `odbcsql.html#462 <odbcsql.html#462>`_ - - `SQL_DIAG_RETURNCODE`:idx: - `odbcsql.html#461 <odbcsql.html#461>`_ - - `SQL_DIAG_REVOKE`:idx: - `odbcsql.html#485 <odbcsql.html#485>`_ - - `SQL_DIAG_ROW_COUNT`:idx: - `odbcsql.html#463 <odbcsql.html#463>`_ - - `SQL_DIAG_SELECT_CURSOR`:idx: - `odbcsql.html#486 <odbcsql.html#486>`_ - - `SQL_DIAG_SERVER_NAME`:idx: - `odbcsql.html#471 <odbcsql.html#471>`_ - - `SQL_DIAG_SQLSTATE`:idx: - `odbcsql.html#464 <odbcsql.html#464>`_ - - `SQL_DIAG_SUBCLASS_ORIGIN`:idx: - `odbcsql.html#469 <odbcsql.html#469>`_ - - `SQL_DIAG_UNKNOWN_STATEMENT`:idx: - `odbcsql.html#487 <odbcsql.html#487>`_ - - `SQL_DIAG_UPDATE_WHERE`:idx: - `odbcsql.html#488 <odbcsql.html#488>`_ - - `SQLDisconnect`:idx: - `odbcsql.html#634 <odbcsql.html#634>`_ - - `SQL_DOUBLE`:idx: - `odbcsql.html#143 <odbcsql.html#143>`_ - - `SQL_DRIVER_COMPLETE`:idx: - `odbcsql.html#242 <odbcsql.html#242>`_ - - `SQL_DRIVER_COMPLETE_REQUIRED`:idx: - `odbcsql.html#244 <odbcsql.html#244>`_ - - `SQLDriverConnect`:idx: - `odbcsql.html#635 <odbcsql.html#635>`_ - - `SQL_DRIVER_NOPROMPT`:idx: - `odbcsql.html#241 <odbcsql.html#241>`_ - - `SQL_DRIVER_PROMPT`:idx: - `odbcsql.html#243 <odbcsql.html#243>`_ - - `SQLDrivers`:idx: - `odbcsql.html#655 <odbcsql.html#655>`_ - - `SQL_DROP`:idx: - `odbcsql.html#504 <odbcsql.html#504>`_ - - `SQL_DYNAMIC_CURSOR_ATTRIBUTES1`:idx: - `odbcsql.html#271 <odbcsql.html#271>`_ - - `SQL_DYNAMIC_CURSOR_ATTRIBUTES2`:idx: - `odbcsql.html#272 <odbcsql.html#272>`_ - - `SQLEndTran`:idx: - `odbcsql.html#663 <odbcsql.html#663>`_ - - `SQL_ENSURE`:idx: - `odbcsql.html#529 <odbcsql.html#529>`_ - - `SQL_ERROR`:idx: - `odbcsql.html#357 <odbcsql.html#357>`_ - - `SQLExecDirect`:idx: - `odbcsql.html#637 <odbcsql.html#637>`_ - - `SQLExecute`:idx: - `odbcsql.html#640 <odbcsql.html#640>`_ - - `SQLExtendedFetch`:idx: - `odbcsql.html#645 <odbcsql.html#645>`_ - - `SQL_FALSE`:idx: - `odbcsql.html#498 <odbcsql.html#498>`_ - - `SQLFetch`:idx: - `odbcsql.html#641 <odbcsql.html#641>`_ - - `SQL_FETCH_ABSOLUTE`:idx: - `odbcsql.html#513 <odbcsql.html#513>`_ - - `SQL_FETCH_BOOKMARK`:idx: - `odbcsql.html#250 <odbcsql.html#250>`_ - - `SQL_FETCH_BY_BOOKMARK`:idx: - `odbcsql.html#321 <odbcsql.html#321>`_ - - `SQL_FETCH_FIRST`:idx: - `odbcsql.html#508 <odbcsql.html#508>`_ - - `SQL_FETCH_FIRST_SYSTEM`:idx: - `odbcsql.html#510 <odbcsql.html#510>`_ - - `SQL_FETCH_FIRST_USER`:idx: - `odbcsql.html#509 <odbcsql.html#509>`_ - - `SQL_FETCH_LAST`:idx: - `odbcsql.html#511 <odbcsql.html#511>`_ - - `SQL_FETCH_NEXT`:idx: - `odbcsql.html#507 <odbcsql.html#507>`_ - - `SQL_FETCH_PRIOR`:idx: - `odbcsql.html#512 <odbcsql.html#512>`_ - - `SQL_FETCH_RELATIVE`:idx: - `odbcsql.html#514 <odbcsql.html#514>`_ - - `SQLFetchScroll`:idx: - `odbcsql.html#644 <odbcsql.html#644>`_ - - `SQL_FLOAT`:idx: - `odbcsql.html#141 <odbcsql.html#141>`_ - - `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1`:idx: - `odbcsql.html#273 <odbcsql.html#273>`_ - - `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2`:idx: - `odbcsql.html#274 <odbcsql.html#274>`_ - - `SQLFreeHandle`:idx: - `odbcsql.html#630 <odbcsql.html#630>`_ - - `SQLFreeStmt`:idx: - `odbcsql.html#661 <odbcsql.html#661>`_ - - `SQL_GET_BOOKMARK`:idx: - `odbcsql.html#392 <odbcsql.html#392>`_ - - `SQLGetCursorName`:idx: - `odbcsql.html#657 <odbcsql.html#657>`_ - - `SQLGetData`:idx: - `odbcsql.html#646 <odbcsql.html#646>`_ - - `SQLGetDiagField`:idx: - `odbcsql.html#632 <odbcsql.html#632>`_ - - `SQLGetDiagRec`:idx: - `odbcsql.html#631 <odbcsql.html#631>`_ - - `SQLGetEnvAttr`:idx: - `odbcsql.html#629 <odbcsql.html#629>`_ - - `SQLGetInfo`:idx: - `odbcsql.html#649 <odbcsql.html#649>`_ - - `SQLGetStmtAttr`:idx: - `odbcsql.html#648 <odbcsql.html#648>`_ - - `SQL_GUID`:idx: - `odbcsql.html#153 <odbcsql.html#153>`_ - - `SQL_HANDLE_DBC`:idx: - `odbcsql.html#367 <odbcsql.html#367>`_ - - `SQL_HANDLE_DESC`:idx: - `odbcsql.html#369 <odbcsql.html#369>`_ - - `SQL_HANDLE_ENV`:idx: - `odbcsql.html#366 <odbcsql.html#366>`_ - - `SQL_HANDLE_STMT`:idx: - `odbcsql.html#368 <odbcsql.html#368>`_ - - `SQL_INDEX_ALL`:idx: - `odbcsql.html#527 <odbcsql.html#527>`_ - - `SQL_INDEX_CLUSTERED`:idx: - `odbcsql.html#531 <odbcsql.html#531>`_ - - `SQL_INDEX_HASHED`:idx: - `odbcsql.html#532 <odbcsql.html#532>`_ - - `SQL_INDEX_KEYWORDS`:idx: - `odbcsql.html#275 <odbcsql.html#275>`_ - - `SQL_INDEX_OTHER`:idx: - `odbcsql.html#533 <odbcsql.html#533>`_ - - `SQL_INDEX_UNIQUE`:idx: - `odbcsql.html#526 <odbcsql.html#526>`_ - - `SQL_INFO_SCHEMA_VIEWS`:idx: - `odbcsql.html#276 <odbcsql.html#276>`_ - - `SQL_INSENSITIVE`:idx: - `odbcsql.html#490 <odbcsql.html#490>`_ - - `SQL_INTEGER`:idx: - `odbcsql.html#139 <odbcsql.html#139>`_ - - `SQL_INTERVAL`:idx: - `odbcsql.html#152 <odbcsql.html#152>`_ - - `SQL_INTERVAL_DAY`:idx: - `odbcsql.html#169 <odbcsql.html#169>`_ - - `SQL_INTERVAL_DAY_TO_HOUR`:idx: - `odbcsql.html#174 <odbcsql.html#174>`_ - - `SQL_INTERVAL_DAY_TO_MINUTE`:idx: - `odbcsql.html#175 <odbcsql.html#175>`_ - - `SQL_INTERVAL_DAY_TO_SECOND`:idx: - `odbcsql.html#176 <odbcsql.html#176>`_ - - `SQL_INTERVAL_HOUR`:idx: - `odbcsql.html#170 <odbcsql.html#170>`_ - - `SQL_INTERVAL_HOUR_TO_MINUTE`:idx: - `odbcsql.html#177 <odbcsql.html#177>`_ - - `SQL_INTERVAL_HOUR_TO_SECOND`:idx: - `odbcsql.html#178 <odbcsql.html#178>`_ - - `SQL_INTERVAL_MINUTE`:idx: - `odbcsql.html#171 <odbcsql.html#171>`_ - - `SQL_INTERVAL_MINUTE_TO_SECOND`:idx: - `odbcsql.html#179 <odbcsql.html#179>`_ - - `SQL_INTERVAL_MONTH`:idx: - `odbcsql.html#168 <odbcsql.html#168>`_ - - `SQL_INTERVAL_SECOND`:idx: - `odbcsql.html#172 <odbcsql.html#172>`_ - - `SQL_INTERVAL_YEAR`:idx: - `odbcsql.html#167 <odbcsql.html#167>`_ - - `SQL_INTERVAL_YEAR_TO_MONTH`:idx: - `odbcsql.html#173 <odbcsql.html#173>`_ - - `SQL_INVALID_HANDLE`:idx: - `odbcsql.html#358 <odbcsql.html#358>`_ - - `SQL_IS_INTEGER`:idx: - `odbcsql.html#247 <odbcsql.html#247>`_ - - `SQL_IS_POINTER`:idx: - `odbcsql.html#245 <odbcsql.html#245>`_ - - `SQL_IS_SMALLINT`:idx: - `odbcsql.html#249 <odbcsql.html#249>`_ - - `SQL_IS_UINTEGER`:idx: - `odbcsql.html#246 <odbcsql.html#246>`_ - - `SQL_IS_USMALLINT`:idx: - `odbcsql.html#248 <odbcsql.html#248>`_ - - `SQL_KEYSET_CURSOR_ATTRIBUTES1`:idx: - `odbcsql.html#277 <odbcsql.html#277>`_ - - `SQL_KEYSET_CURSOR_ATTRIBUTES2`:idx: - `odbcsql.html#278 <odbcsql.html#278>`_ - - `SQL_KEYSET_SIZE`:idx: - `odbcsql.html#387 <odbcsql.html#387>`_ - - `SQL_LOCK_EXCLUSIVE`:idx: - `odbcsql.html#327 <odbcsql.html#327>`_ - - `SQL_LOCK_NO_CHANGE`:idx: - `odbcsql.html#326 <odbcsql.html#326>`_ - - `SQL_LOCK_UNLOCK`:idx: - `odbcsql.html#328 <odbcsql.html#328>`_ - - `SQL_LOGIN_TIMEOUT`:idx: - `odbcsql.html#407 <odbcsql.html#407>`_ - - `SQL_LONGVARBINARY`:idx: - `odbcsql.html#129 <odbcsql.html#129>`_ - - `SQL_LONGVARCHAR`:idx: - `odbcsql.html#126 <odbcsql.html#126>`_ - - `SQL_MAX_DSN_LENGTH`:idx: - `odbcsql.html#338 <odbcsql.html#338>`_ - - `SQL_MAX_IDENTIFIER_LEN`:idx: - `odbcsql.html#547 <odbcsql.html#547>`_ - - `SQL_MAXIMUM_IDENTIFIER_LENGTH`:idx: - `odbcsql.html#548 <odbcsql.html#548>`_ - - `SQL_MAX_LENGTH`:idx: - `odbcsql.html#382 <odbcsql.html#382>`_ - - `SQL_MAX_MESSAGE_LENGTH`:idx: - `odbcsql.html#362 <odbcsql.html#362>`_ - - `SQL_MAX_OPTION_STRING_LENGTH`:idx: - `odbcsql.html#339 <odbcsql.html#339>`_ - - `SQL_MAX_ROWS`:idx: - `odbcsql.html#380 <odbcsql.html#380>`_ - - `SQL_MODE_DEFAULT`:idx: - `odbcsql.html#431 <odbcsql.html#431>`_ - - `SQL_MODE_READ_ONLY`:idx: - `odbcsql.html#430 <odbcsql.html#430>`_ - - `SQL_MODE_READ_WRITE`:idx: - `odbcsql.html#429 <odbcsql.html#429>`_ - - `SQL_NAME_LEN`:idx: - `odbcsql.html#237 <odbcsql.html#237>`_ - - `SQL_NEED_DATA`:idx: - `odbcsql.html#360 <odbcsql.html#360>`_ - - `SQL_NO_DATA`:idx: - `odbcsql.html#356 <odbcsql.html#356>`_ - - `SQL_NONSCROLLABLE`:idx: - `odbcsql.html#435 <odbcsql.html#435>`_ - - `SQL_NO_NULLS`:idx: - `odbcsql.html#500 <odbcsql.html#500>`_ - - `SQL_NOSCAN`:idx: - `odbcsql.html#381 <odbcsql.html#381>`_ - - `SQL_NO_TOTAL`:idx: - `odbcsql.html#230 <odbcsql.html#230>`_ - - `SQL_NTS`:idx: - `odbcsql.html#361 <odbcsql.html#361>`_ - - `SQL_NULLABLE`:idx: - `odbcsql.html#501 <odbcsql.html#501>`_ - - `SQL_NULLABLE_UNKNOWN`:idx: - `odbcsql.html#502 <odbcsql.html#502>`_ - - `SQL_NULL_DATA`:idx: - `odbcsql.html#352 <odbcsql.html#352>`_ - - `SQL_NULL_HANDLE`:idx: - `odbcsql.html#519 <odbcsql.html#519>`_ - - `SQL_NULL_HDBC`:idx: - `odbcsql.html#516 <odbcsql.html#516>`_ - - `SQL_NULL_HDESC`:idx: - `odbcsql.html#518 <odbcsql.html#518>`_ - - `SQL_NULL_HENV`:idx: - `odbcsql.html#515 <odbcsql.html#515>`_ - - `SQL_NULL_HSTMT`:idx: - `odbcsql.html#517 <odbcsql.html#517>`_ - - `SQL_NUMERIC`:idx: - `odbcsql.html#137 <odbcsql.html#137>`_ - - `SQLNumResultCols`:idx: - `odbcsql.html#642 <odbcsql.html#642>`_ - - `SQL_ODBC_CURSORS`:idx: - `odbcsql.html#340 <odbcsql.html#340>`_ - - `SQL_OJ_CAPABILITIES`:idx: - `odbcsql.html#540 <odbcsql.html#540>`_ - - `SQL_OPT_TRACE`:idx: - `odbcsql.html#408 <odbcsql.html#408>`_ - - `SQL_OPT_TRACEFILE`:idx: - `odbcsql.html#409 <odbcsql.html#409>`_ - - `SQL_OUTER_JOIN_CAPABILITIES`:idx: - `odbcsql.html#541 <odbcsql.html#541>`_ - - `SQL_OV_ODBC2`:idx: - `odbcsql.html#239 <odbcsql.html#239>`_ - - `SQL_OV_ODBC3`:idx: - `odbcsql.html#238 <odbcsql.html#238>`_ - - `SQL_PACKET_SIZE`:idx: - `odbcsql.html#414 <odbcsql.html#414>`_ - - `SQL_PARAM_INPUT`:idx: - `odbcsql.html#347 <odbcsql.html#347>`_ - - `SQL_PARAM_INPUT_OUTPUT`:idx: - `odbcsql.html#348 <odbcsql.html#348>`_ - - `SQL_PARAM_OUTPUT`:idx: - `odbcsql.html#350 <odbcsql.html#350>`_ - - `SQL_PARAM_TYPE_UNKNOWN`:idx: - `odbcsql.html#346 <odbcsql.html#346>`_ - - `SQL_POSITION`:idx: - `odbcsql.html#322 <odbcsql.html#322>`_ - - `SQLPrepare`:idx: - `odbcsql.html#638 <odbcsql.html#638>`_ - - `SQLPrimaryKeys`:idx: - `odbcsql.html#668 <odbcsql.html#668>`_ - - `SQLProcedureColumns`:idx: - `odbcsql.html#669 <odbcsql.html#669>`_ - - `SQLProcedures`:idx: - `odbcsql.html#667 <odbcsql.html#667>`_ - - `SQLPutData`:idx: - `odbcsql.html#651 <odbcsql.html#651>`_ - - `SQL_QUERY_TIMEOUT`:idx: - `odbcsql.html#379 <odbcsql.html#379>`_ - - `SQL_QUICK`:idx: - `odbcsql.html#528 <odbcsql.html#528>`_ - - `SQL_QUIET_MODE`:idx: - `odbcsql.html#413 <odbcsql.html#413>`_ - - `SQL_REAL`:idx: - `odbcsql.html#142 <odbcsql.html#142>`_ - - `SQL_REFRESH`:idx: - `odbcsql.html#323 <odbcsql.html#323>`_ - - `SQL_RESET_PARAMS`:idx: - `odbcsql.html#506 <odbcsql.html#506>`_ - - `SQL_RESULT_COL`:idx: - `odbcsql.html#349 <odbcsql.html#349>`_ - - `SQL_RETRIEVE_DATA`:idx: - `odbcsql.html#390 <odbcsql.html#390>`_ - - `SQL_RETURN_VALUE`:idx: - `odbcsql.html#351 <odbcsql.html#351>`_ - - `SQL_ROLLBACK`:idx: - `odbcsql.html#619 <odbcsql.html#619>`_ - - `SQL_ROW_ADDED`:idx: - `odbcsql.html#333 <odbcsql.html#333>`_ - - `SQLRowCount`:idx: - `odbcsql.html#659 <odbcsql.html#659>`_ - - `SQL_ROW_DELETED`:idx: - `odbcsql.html#330 <odbcsql.html#330>`_ - - `SQL_ROW_ERROR`:idx: - `odbcsql.html#334 <odbcsql.html#334>`_ - - `SQL_ROW_IDENTIFIER`:idx: - `odbcsql.html#525 <odbcsql.html#525>`_ - - `SQL_ROW_IGNORE`:idx: - `odbcsql.html#337 <odbcsql.html#337>`_ - - `SQL_ROW_NOROW`:idx: - `odbcsql.html#332 <odbcsql.html#332>`_ - - `SQL_ROW_NUMBER`:idx: - `odbcsql.html#393 <odbcsql.html#393>`_ - - `SQL_ROW_PROCEED`:idx: - `odbcsql.html#336 <odbcsql.html#336>`_ - - `SQL_ROWSET_SIZE`:idx: - `odbcsql.html#388 <odbcsql.html#388>`_ - - `SQL_ROW_SUCCESS`:idx: - `odbcsql.html#329 <odbcsql.html#329>`_ - - `SQL_ROW_SUCCESS_WITH_INFO`:idx: - `odbcsql.html#335 <odbcsql.html#335>`_ - - `SQL_ROW_UPDATED`:idx: - `odbcsql.html#331 <odbcsql.html#331>`_ - - `SQL_ROWVER`:idx: - `odbcsql.html#524 <odbcsql.html#524>`_ - - `SQL_SCCO_LOCK`:idx: - `odbcsql.html#550 <odbcsql.html#550>`_ - - `SQL_SCCO_OPT_ROWVER`:idx: - `odbcsql.html#551 <odbcsql.html#551>`_ - - `SQL_SCCO_OPT_VALUES`:idx: - `odbcsql.html#552 <odbcsql.html#552>`_ - - `SQL_SCCO_READ_ONLY`:idx: - `odbcsql.html#549 <odbcsql.html#549>`_ - - `SQL_SCOPE_CURROW`:idx: - `odbcsql.html#520 <odbcsql.html#520>`_ - - `SQL_SCOPE_SESSION`:idx: - `odbcsql.html#522 <odbcsql.html#522>`_ - - `SQL_SCOPE_TRANSACTION`:idx: - `odbcsql.html#521 <odbcsql.html#521>`_ - - `SQL_SCROLLABLE`:idx: - `odbcsql.html#436 <odbcsql.html#436>`_ - - `SQL_SCROLL_CONCURRENCY`:idx: - `odbcsql.html#534 <odbcsql.html#534>`_ - - `SQL_SCROLL_OPTIONS`:idx: - `odbcsql.html#251 <odbcsql.html#251>`_ - - `SQL_SENSITIVE`:idx: - `odbcsql.html#491 <odbcsql.html#491>`_ - - `SQLSetConnectAttr`:idx: - `odbcsql.html#656 <odbcsql.html#656>`_ - - `SQLSetCursorName`:idx: - `odbcsql.html#658 <odbcsql.html#658>`_ - - `SQLSetEnvAttr`:idx: - `odbcsql.html#628 <odbcsql.html#628>`_ - - `SQLSetPos`:idx: - `odbcsql.html#653 <odbcsql.html#653>`_ - - `SQL_SETPOS_MAX_OPTION_VALUE`:idx: - `odbcsql.html#318 <odbcsql.html#318>`_ - - `SQLSetStmtAttr`:idx: - `odbcsql.html#647 <odbcsql.html#647>`_ - - `SQL_SIGNED_OFFSET`:idx: - `odbcsql.html#191 <odbcsql.html#191>`_ - - `SQL_SIMULATE_CURSOR`:idx: - `odbcsql.html#389 <odbcsql.html#389>`_ - - `SQL_SMALLINT`:idx: - `odbcsql.html#140 <odbcsql.html#140>`_ - - `SQL_SO_DYNAMIC`:idx: - `odbcsql.html#259 <odbcsql.html#259>`_ - - `SQL_SO_FORWARD_ONLY`:idx: - `odbcsql.html#257 <odbcsql.html#257>`_ - - `SQL_SO_KEYSET_DRIVEN`:idx: - `odbcsql.html#258 <odbcsql.html#258>`_ - - `SQL_SO_MIXED`:idx: - `odbcsql.html#260 <odbcsql.html#260>`_ - - `SQL_SO_STATIC`:idx: - `odbcsql.html#261 <odbcsql.html#261>`_ - - `SQLSpecialColumns`:idx: - `odbcsql.html#666 <odbcsql.html#666>`_ - - `SQL_SS_ADDITIONS`:idx: - `odbcsql.html#566 <odbcsql.html#566>`_ - - `SQL_SS_DELETIONS`:idx: - `odbcsql.html#567 <odbcsql.html#567>`_ - - `SQL_SS_UPDATES`:idx: - `odbcsql.html#568 <odbcsql.html#568>`_ - - `SQL_STATIC_CURSOR_ATTRIBUTES1`:idx: - `odbcsql.html#279 <odbcsql.html#279>`_ - - `SQL_STATIC_CURSOR_ATTRIBUTES2`:idx: - `odbcsql.html#280 <odbcsql.html#280>`_ - - `SQL_STATIC_SENSITIVITY`:idx: - `odbcsql.html#263 <odbcsql.html#263>`_ - - `SQLStatistics`:idx: - `odbcsql.html#670 <odbcsql.html#670>`_ - - `SQL_STILL_EXECUTING`:idx: - `odbcsql.html#359 <odbcsql.html#359>`_ - - `SQL_SUCCESS`:idx: - `odbcsql.html#354 <odbcsql.html#354>`_ - - `SQL_SUCCESS_WITH_INFO`:idx: - `odbcsql.html#355 <odbcsql.html#355>`_ - - `SQLTables`:idx: - `odbcsql.html#664 <odbcsql.html#664>`_ - - `SQL_TABLE_STAT`:idx: - `odbcsql.html#530 <odbcsql.html#530>`_ - - `SQL_TC_ALL`:idx: - `odbcsql.html#555 <odbcsql.html#555>`_ - - `SQL_TC_DDL_COMMIT`:idx: - `odbcsql.html#556 <odbcsql.html#556>`_ - - `SQL_TC_DDL_IGNORE`:idx: - `odbcsql.html#557 <odbcsql.html#557>`_ - - `SQL_TC_DML`:idx: - `odbcsql.html#554 <odbcsql.html#554>`_ - - `SQL_TC_NONE`:idx: - `odbcsql.html#553 <odbcsql.html#553>`_ - - `SQL_TIME`:idx: - `odbcsql.html#150 <odbcsql.html#150>`_ - - `SQL_TIME_LEN`:idx: - `odbcsql.html#364 <odbcsql.html#364>`_ - - `SQL_TIMESTAMP`:idx: - `odbcsql.html#151 <odbcsql.html#151>`_ - - `SQL_TIMESTAMP_LEN`:idx: - `odbcsql.html#365 <odbcsql.html#365>`_ - - `SQL_TIMESTAMP_STRUCT`:idx: - `odbcsql.html#235 <odbcsql.html#235>`_ - - `SQL_TIME_STRUCT`:idx: - `odbcsql.html#233 <odbcsql.html#233>`_ - - `SQL_TINYINT`:idx: - `odbcsql.html#131 <odbcsql.html#131>`_ - - `SQL_TRANSACTION_CAPABLE`:idx: - `odbcsql.html#536 <odbcsql.html#536>`_ - - `SQL_TRANSACTION_ISOLATION_OPTION`:idx: - `odbcsql.html#539 <odbcsql.html#539>`_ - - `SQL_TRANSACTION_READ_COMMITTED`:idx: - `odbcsql.html#561 <odbcsql.html#561>`_ - - `SQL_TRANSACTION_READ_UNCOMMITTED`:idx: - `odbcsql.html#559 <odbcsql.html#559>`_ - - `SQL_TRANSACTION_REPEATABLE_READ`:idx: - `odbcsql.html#563 <odbcsql.html#563>`_ - - `SQL_TRANSACTION_SERIALIZABLE`:idx: - `odbcsql.html#565 <odbcsql.html#565>`_ - - `SQL_TRANSLATE_DLL`:idx: - `odbcsql.html#410 <odbcsql.html#410>`_ - - `SQL_TRANSLATE_OPTION`:idx: - `odbcsql.html#411 <odbcsql.html#411>`_ - - `SQL_TRUE`:idx: - `odbcsql.html#499 <odbcsql.html#499>`_ - - `SQL_TXN_CAPABLE`:idx: - `odbcsql.html#535 <odbcsql.html#535>`_ - - `SQL_TXN_ISOLATION`:idx: - `odbcsql.html#402 <odbcsql.html#402>`_ - - `SQL_TXN_ISOLATION_OPTION`:idx: - `odbcsql.html#538 <odbcsql.html#538>`_ - - `SQL_TXN_READ_COMMITTED`:idx: - `odbcsql.html#560 <odbcsql.html#560>`_ - - `SQL_TXN_READ_UNCOMMITTED`:idx: - `odbcsql.html#558 <odbcsql.html#558>`_ - - `SQL_TXN_REPEATABLE_READ`:idx: - `odbcsql.html#562 <odbcsql.html#562>`_ - - `SQL_TXN_SERIALIZABLE`:idx: - `odbcsql.html#564 <odbcsql.html#564>`_ - - `SQL_TYPE_DATE`:idx: - `odbcsql.html#146 <odbcsql.html#146>`_ - - `SQL_TYPE_MAX`:idx: - `odbcsql.html#227 <odbcsql.html#227>`_ - - `SQL_TYPE_MIN`:idx: - `odbcsql.html#226 <odbcsql.html#226>`_ - - `SQL_TYPE_NULL`:idx: - `odbcsql.html#225 <odbcsql.html#225>`_ - - `SQL_TYPE_TIME`:idx: - `odbcsql.html#147 <odbcsql.html#147>`_ - - `SQL_TYPE_TIMESTAMP`:idx: - `odbcsql.html#148 <odbcsql.html#148>`_ - - `SQL_UB_DEFAULT`:idx: - `odbcsql.html#254 <odbcsql.html#254>`_ - - `SQL_UB_FIXED`:idx: - `odbcsql.html#255 <odbcsql.html#255>`_ - - `SQL_UB_OFF`:idx: - `odbcsql.html#252 <odbcsql.html#252>`_ - - `SQL_UB_ON`:idx: - `odbcsql.html#253 <odbcsql.html#253>`_ - - `SQL_UB_VARIABLE`:idx: - `odbcsql.html#256 <odbcsql.html#256>`_ - - `SQL_UNBIND`:idx: - `odbcsql.html#505 <odbcsql.html#505>`_ - - `SQL_UNICODE`:idx: - `odbcsql.html#180 <odbcsql.html#180>`_ - - `SQL_UNICODE_CHAR`:idx: - `odbcsql.html#183 <odbcsql.html#183>`_ - - `SQL_UNICODE_LONGVARCHAR`:idx: - `odbcsql.html#182 <odbcsql.html#182>`_ - - `SQL_UNICODE_VARCHAR`:idx: - `odbcsql.html#181 <odbcsql.html#181>`_ - - `SQL_UNKNOWN_TYPE`:idx: - `odbcsql.html#125 <odbcsql.html#125>`_ - - `SQL_UNSIGNED_OFFSET`:idx: - `odbcsql.html#192 <odbcsql.html#192>`_ - - `SQL_UNSPECIFIED`:idx: - `odbcsql.html#489 <odbcsql.html#489>`_ - - `SQL_UPDATE`:idx: - `odbcsql.html#324 <odbcsql.html#324>`_ - - `SQL_UPDATE_BY_BOOKMARK`:idx: - `odbcsql.html#319 <odbcsql.html#319>`_ - - `SQL_USE_BOOKMARKS`:idx: - `odbcsql.html#391 <odbcsql.html#391>`_ - - `SQL_USER_NAME`:idx: - `odbcsql.html#537 <odbcsql.html#537>`_ - - `SQL_VARBINARY`:idx: - `odbcsql.html#128 <odbcsql.html#128>`_ - - `SQL_VARCHAR`:idx: - `odbcsql.html#145 <odbcsql.html#145>`_ - - `SQL_WCHAR`:idx: - `odbcsql.html#133 <odbcsql.html#133>`_ - - `SQL_WLONGVARCHAR`:idx: - `odbcsql.html#135 <odbcsql.html#135>`_ - - `SQL_WVARCHAR`:idx: - `odbcsql.html#134 <odbcsql.html#134>`_ - - `SQL_XOPEN_CLI_YEAR`:idx: - `odbcsql.html#542 <odbcsql.html#542>`_ - - `sqrt`:idx: - * `math.html#110 <math.html#110>`_ - * `complex.html#109 <complex.html#109>`_ - - `SS_DISABLE`:idx: - `posix.html#765 <posix.html#765>`_ - - `SS_ONSTACK`:idx: - `posix.html#764 <posix.html#764>`_ - - `stack_trace`:idx: - `nimrodc.html#109 <nimrodc.html#109>`_ - - `startsWith`:idx: - `strutils.html#135 <strutils.html#135>`_ - - `stat`:idx: - `posix.html#1065 <posix.html#1065>`_ - - `Statements`:idx: - `manual.html#174 <manual.html#174>`_ - - `static error`:idx: - `manual.html#109 <manual.html#109>`_ - - `static type`:idx: - `manual.html#103 <manual.html#103>`_ - - `statvfs`:idx: - `posix.html#1056 <posix.html#1056>`_ - - `stdcall`:idx: - `manual.html#165 <manual.html#165>`_ - - `stderr`:idx: - `system.html#481 <system.html#481>`_ - - `STDERR_FILENO`:idx: - `posix.html#127 <posix.html#127>`_ - - `stdin`:idx: - `system.html#479 <system.html#479>`_ - - `STDIN_FILENO`:idx: - `posix.html#128 <posix.html#128>`_ - - `stdout`:idx: - `system.html#480 <system.html#480>`_ - - `STDOUT_FILENO`:idx: - `posix.html#129 <posix.html#129>`_ - - `ST_NOSUID`:idx: - `posix.html#673 <posix.html#673>`_ - - `ST_RDONLY`:idx: - `posix.html#672 <posix.html#672>`_ - - `strerror`:idx: - `posix.html#1160 <posix.html#1160>`_ - - `strfmon`:idx: - `posix.html#848 <posix.html#848>`_ - - `strftime`:idx: - `posix.html#1110 <posix.html#1110>`_ - - `string`:idx: - * `manual.html#151 <manual.html#151>`_ - * `system.html#111 <system.html#111>`_ - - `strip`:idx: - `strutils.html#105 <strutils.html#105>`_ - - `strptime`:idx: - `posix.html#1111 <posix.html#1111>`_ - - `strStart`:idx: - `strutils.html#103 <strutils.html#103>`_ - - `structured type`:idx: - `manual.html#152 <manual.html#152>`_ - - `strutils`:idx: - `nimrodc.html#117 <nimrodc.html#117>`_ - - `style-insensitive`:idx: - `manual.html#118 <manual.html#118>`_ - - `S_TYPEISMQ`:idx: - `posix.html#1074 <posix.html#1074>`_ - - `S_TYPEISSEM`:idx: - `posix.html#1075 <posix.html#1075>`_ - - `S_TYPEISSHM`:idx: - `posix.html#1076 <posix.html#1076>`_ - - `S_TYPEISTMO`:idx: - `posix.html#1077 <posix.html#1077>`_ - - `subrange`:idx: - `manual.html#150 <manual.html#150>`_ - - `succ`:idx: - `system.html#154 <system.html#154>`_ - - `swab`:idx: - `posix.html#1031 <posix.html#1031>`_ - - `swap`:idx: - `system.html#417 <system.html#417>`_ - - `swapcontext`:idx: - `posix.html#1191 <posix.html#1191>`_ - - `symlink`:idx: - `posix.html#1032 <posix.html#1032>`_ - - `sync`:idx: - `posix.html#1033 <posix.html#1033>`_ - - `syscall`:idx: - `manual.html#172 <manual.html#172>`_ - - `sysconf`:idx: - `posix.html#1034 <posix.html#1034>`_ - - `system`:idx: - `manual.html#219 <manual.html#219>`_ - - `tabulator`:idx: - `manual.html#125 <manual.html#125>`_ - - `TAddress`:idx: - `system.html#372 <system.html#372>`_ - - `Taiocb`:idx: - `posix.html#204 <posix.html#204>`_ - - `TAllocfunc`:idx: - `zlib.html#108 <zlib.html#108>`_ - - `tan`:idx: - `math.html#125 <math.html#125>`_ - - `tanh`:idx: - `math.html#126 <math.html#126>`_ - - `TBaseLexer`:idx: - `lexbase.html#103 <lexbase.html#103>`_ - - `Tblkcnt`:idx: - `posix.html#143 <posix.html#143>`_ - - `Tblksize`:idx: - `posix.html#144 <posix.html#144>`_ - - `TCfgEvent`:idx: - `parsecfg.html#102 <parsecfg.html#102>`_ - - `TCfgEventKind`:idx: - `parsecfg.html#101 <parsecfg.html#101>`_ - - `TCfgParser`:idx: - `parsecfg.html#103 <parsecfg.html#103>`_ - - `tcgetpgrp`:idx: - `posix.html#1035 <posix.html#1035>`_ - - `TCharSet`:idx: - `strutils.html#101 <strutils.html#101>`_ - - `TClock`:idx: - `posix.html#145 <posix.html#145>`_ - - `TClockId`:idx: - `posix.html#146 <posix.html#146>`_ - - `TCmdLineKind`:idx: - `parseopt.html#101 <parseopt.html#101>`_ - - `TComplex`:idx: - `complex.html#101 <complex.html#101>`_ - - `tcsetpgrp`:idx: - `posix.html#1036 <posix.html#1036>`_ - - `TDev`:idx: - `posix.html#147 <posix.html#147>`_ - - `TDIR`:idx: - `posix.html#130 <posix.html#130>`_ - - `Tdirent`:idx: - `posix.html#131 <posix.html#131>`_ - - `telldir`:idx: - `posix.html#806 <posix.html#806>`_ - - `template`:idx: - `manual.html#210 <manual.html#210>`_ - - `TEndian`:idx: - `system.html#385 <system.html#385>`_ - - `Tfd_set`:idx: - `posix.html#201 <posix.html#201>`_ - - `Tfenv`:idx: - `posix.html#133 <posix.html#133>`_ - - `Tfexcept`:idx: - `posix.html#134 <posix.html#134>`_ - - `TFile`:idx: - `system.html#476 <system.html#476>`_ - - `TFileHandle`:idx: - `system.html#478 <system.html#478>`_ - - `TFileMode`:idx: - `system.html#477 <system.html#477>`_ - - `TFileStream`:idx: - `streams.html#119 <streams.html#119>`_ - - `TFloatClass`:idx: - `math.html#103 <math.html#103>`_ - - `Tflock`:idx: - `posix.html#132 <posix.html#132>`_ - - `T_FMT`:idx: - `posix.html#392 <posix.html#392>`_ - - `T_FMT_AMPM`:idx: - `posix.html#393 <posix.html#393>`_ - - `TFormatFlag`:idx: - `strtabs.html#111 <strtabs.html#111>`_ - - `TFreeFunc`:idx: - `zlib.html#109 <zlib.html#109>`_ - - `Tfsblkcnt`:idx: - `posix.html#148 <posix.html#148>`_ - - `Tfsfilcnt`:idx: - `posix.html#149 <posix.html#149>`_ - - `TFTW`:idx: - `posix.html#135 <posix.html#135>`_ - - `TGC_Strategy`:idx: - `system.html#460 <system.html#460>`_ - - `TGid`:idx: - `posix.html#150 <posix.html#150>`_ - - `TGlob`:idx: - `posix.html#136 <posix.html#136>`_ - - `TGroup`:idx: - `posix.html#137 <posix.html#137>`_ - - `THash`:idx: - `hashes.html#101 <hashes.html#101>`_ - - `THOUSEP`:idx: - `posix.html#440 <posix.html#440>`_ - - `Ticonv`:idx: - `posix.html#138 <posix.html#138>`_ - - `Tid`:idx: - `posix.html#151 <posix.html#151>`_ - - `time`:idx: - `posix.html#1112 <posix.html#1112>`_ - - `TimeInfoToTime`:idx: - `times.html#108 <times.html#108>`_ - - `TIMER_ABSTIME`:idx: - `posix.html#699 <posix.html#699>`_ - - `timer_create`:idx: - `posix.html#1113 <posix.html#1113>`_ - - `timer_delete`:idx: - `posix.html#1114 <posix.html#1114>`_ - - `timer_getoverrun`:idx: - `posix.html#1116 <posix.html#1116>`_ - - `timer_gettime`:idx: - `posix.html#1115 <posix.html#1115>`_ - - `timer_settime`:idx: - `posix.html#1117 <posix.html#1117>`_ - - `times`:idx: - `nimrodc.html#119 <nimrodc.html#119>`_ - - `timezone`:idx: - `posix.html#702 <posix.html#702>`_ - - `Tino`:idx: - `posix.html#152 <posix.html#152>`_ - - `TInternalState`:idx: - `zlib.html#110 <zlib.html#110>`_ - - `Tipc_perm`:idx: - `posix.html#182 <posix.html#182>`_ - - `titimerspec`:idx: - `posix.html#188 <posix.html#188>`_ - - `TKey`:idx: - `posix.html#153 <posix.html#153>`_ - - `Tlconv`:idx: - `posix.html#139 <posix.html#139>`_ - - `Tmcontext`:idx: - `posix.html#202 <posix.html#202>`_ - - `TMode`:idx: - `posix.html#154 <posix.html#154>`_ - - `TMonth`:idx: - `times.html#101 <times.html#101>`_ - - `TMqAttr`:idx: - `posix.html#141 <posix.html#141>`_ - - `TMqd`:idx: - `posix.html#140 <posix.html#140>`_ - - `Tnl_catd`:idx: - `posix.html#198 <posix.html#198>`_ - - `TNlink`:idx: - `posix.html#155 <posix.html#155>`_ - - `Tnl_item`:idx: - `posix.html#197 <posix.html#197>`_ - - `toBiggestFloat`:idx: - `system.html#399 <system.html#399>`_ - - `toBiggestInt`:idx: - `system.html#401 <system.html#401>`_ - - `toBin`:idx: - `strutils.html#140 <strutils.html#140>`_ - - `TObject`:idx: - `system.html#128 <system.html#128>`_ - - `TOff`:idx: - `posix.html#156 <posix.html#156>`_ - - `toFloat`:idx: - `system.html#398 <system.html#398>`_ - - `toHex`:idx: - `strutils.html#126 <strutils.html#126>`_ - - `toInt`:idx: - `system.html#400 <system.html#400>`_ - - `toLower`:idx: - * `strutils.html#106 <strutils.html#106>`_ - * `strutils.html#107 <strutils.html#107>`_ - - `toOct`:idx: - `strutils.html#139 <strutils.html#139>`_ - - `toOctal`:idx: - `strutils.html#117 <strutils.html#117>`_ - - `TOptParser`:idx: - `parseopt.html#102 <parseopt.html#102>`_ - - `toString`:idx: - `strutils.html#131 <strutils.html#131>`_ - - `toU16`:idx: - `system.html#176 <system.html#176>`_ - - `toU32`:idx: - `system.html#177 <system.html#177>`_ - - `toU8`:idx: - `system.html#175 <system.html#175>`_ - - `toUpper`:idx: - * `strutils.html#108 <strutils.html#108>`_ - * `strutils.html#109 <strutils.html#109>`_ - - `TPasswd`:idx: - `posix.html#142 <posix.html#142>`_ - - `TPathComponent`:idx: - `os.html#154 <os.html#154>`_ - - `TPid`:idx: - `posix.html#157 <posix.html#157>`_ - - `Tposix_spawnattr`:idx: - `posix.html#205 <posix.html#205>`_ - - `Tposix_spawn_file_actions`:idx: - `posix.html#206 <posix.html#206>`_ - - `Tposix_typed_mem_info`:idx: - `posix.html#185 <posix.html#185>`_ - - `Tpthread`:idx: - `posix.html#170 <posix.html#170>`_ - - `Tpthread_attr`:idx: - `posix.html#158 <posix.html#158>`_ - - `Tpthread_barrier`:idx: - `posix.html#159 <posix.html#159>`_ - - `Tpthread_barrierattr`:idx: - `posix.html#160 <posix.html#160>`_ - - `Tpthread_cond`:idx: - `posix.html#161 <posix.html#161>`_ - - `Tpthread_condattr`:idx: - `posix.html#162 <posix.html#162>`_ - - `Tpthread_key`:idx: - `posix.html#163 <posix.html#163>`_ - - `Tpthread_mutex`:idx: - `posix.html#164 <posix.html#164>`_ - - `Tpthread_mutexattr`:idx: - `posix.html#165 <posix.html#165>`_ - - `Tpthread_once`:idx: - `posix.html#166 <posix.html#166>`_ - - `Tpthread_rwlock`:idx: - `posix.html#167 <posix.html#167>`_ - - `Tpthread_rwlockattr`:idx: - `posix.html#168 <posix.html#168>`_ - - `Tpthread_spinlock`:idx: - `posix.html#169 <posix.html#169>`_ - - `traced`:idx: - `manual.html#160 <manual.html#160>`_ - - `TResult`:idx: - `system.html#152 <system.html#152>`_ - - `truncate`:idx: - `posix.html#1037 <posix.html#1037>`_ - - `try`:idx: - `manual.html#186 <manual.html#186>`_ - - `Tsched_param`:idx: - `posix.html#199 <posix.html#199>`_ - - `TSem`:idx: - `posix.html#181 <posix.html#181>`_ - - `TSigaction`:idx: - `posix.html#193 <posix.html#193>`_ - - `Tsig_atomic`:idx: - `posix.html#189 <posix.html#189>`_ - - `TsigEvent`:idx: - `posix.html#191 <posix.html#191>`_ - - `TsigInfo`:idx: - `posix.html#196 <posix.html#196>`_ - - `Tsigset`:idx: - `posix.html#190 <posix.html#190>`_ - - `TSigStack`:idx: - `posix.html#195 <posix.html#195>`_ - - `TsigVal`:idx: - `posix.html#192 <posix.html#192>`_ - - `TSqlChar`:idx: - `odbcsql.html#101 <odbcsql.html#101>`_ - - `TSqlDouble`:idx: - `odbcsql.html#113 <odbcsql.html#113>`_ - - `TSqlFloat`:idx: - `odbcsql.html#114 <odbcsql.html#114>`_ - - `TSqlHandle`:idx: - `odbcsql.html#104 <odbcsql.html#104>`_ - - `TSqlHDBC`:idx: - `odbcsql.html#106 <odbcsql.html#106>`_ - - `TSqlHDesc`:idx: - `odbcsql.html#108 <odbcsql.html#108>`_ - - `TSqlHEnv`:idx: - `odbcsql.html#105 <odbcsql.html#105>`_ - - `TSqlHStmt`:idx: - `odbcsql.html#107 <odbcsql.html#107>`_ - - `TSqlHWND`:idx: - `odbcsql.html#115 <odbcsql.html#115>`_ - - `TSqlInteger`:idx: - `odbcsql.html#109 <odbcsql.html#109>`_ - - `TSqlPointer`:idx: - `odbcsql.html#111 <odbcsql.html#111>`_ - - `TSqlReal`:idx: - `odbcsql.html#112 <odbcsql.html#112>`_ - - `TSqlSmallInt`:idx: - `odbcsql.html#102 <odbcsql.html#102>`_ - - `TSqlUInteger`:idx: - `odbcsql.html#110 <odbcsql.html#110>`_ - - `TSqlUSmallInt`:idx: - `odbcsql.html#103 <odbcsql.html#103>`_ - - `TStack`:idx: - `posix.html#194 <posix.html#194>`_ - - `TStat`:idx: - `posix.html#183 <posix.html#183>`_ - - `TStatvfs`:idx: - `posix.html#184 <posix.html#184>`_ - - `TStream`:idx: - `streams.html#102 <streams.html#102>`_ - - `TStringStream`:idx: - `streams.html#116 <streams.html#116>`_ - - `TStringTable`:idx: - `strtabs.html#102 <strtabs.html#102>`_ - - `TStringTableMode`:idx: - `strtabs.html#101 <strtabs.html#101>`_ - - `Tsuseconds`:idx: - `posix.html#171 <posix.html#171>`_ - - `Ttime`:idx: - `posix.html#172 <posix.html#172>`_ - - `TTime`:idx: - `times.html#103 <times.html#103>`_ - - `TTimeInfo`:idx: - `times.html#104 <times.html#104>`_ - - `Ttimer`:idx: - `posix.html#173 <posix.html#173>`_ - - `Ttimespec`:idx: - `posix.html#187 <posix.html#187>`_ - - `Ttimeval`:idx: - `posix.html#200 <posix.html#200>`_ - - `Ttm`:idx: - `posix.html#186 <posix.html#186>`_ - - `Ttrace_attr`:idx: - `posix.html#174 <posix.html#174>`_ - - `Ttrace_event_id`:idx: - `posix.html#175 <posix.html#175>`_ - - `Ttrace_event_set`:idx: - `posix.html#176 <posix.html#176>`_ - - `Ttrace_id`:idx: - `posix.html#177 <posix.html#177>`_ - - `ttyname`:idx: - `posix.html#1038 <posix.html#1038>`_ - - `ttyname_r`:idx: - `posix.html#1039 <posix.html#1039>`_ - - `Tucontext`:idx: - `posix.html#203 <posix.html#203>`_ - - `Tuid`:idx: - `posix.html#178 <posix.html#178>`_ - - `tuple`:idx: - `manual.html#155 <manual.html#155>`_ - - `Tuseconds`:idx: - `posix.html#179 <posix.html#179>`_ - - `Tutsname`:idx: - `posix.html#180 <posix.html#180>`_ - - `TWeekDay`:idx: - `times.html#102 <times.html#102>`_ - - `type`:idx: - * `manual.html#102 <manual.html#102>`_ - * `manual.html#141 <manual.html#141>`_ - * `manual.html#207 <manual.html#207>`_ - - `type parameters`:idx: - `manual.html#209 <manual.html#209>`_ - - `type suffix`:idx: - `manual.html#138 <manual.html#138>`_ - - `TZipArchive`:idx: - `zipfiles.html#101 <zipfiles.html#101>`_ - - `Tzip_source_callback`:idx: - `libzip.html#102 <libzip.html#102>`_ - - `Tzip_source_cmd`:idx: - `libzip.html#101 <libzip.html#101>`_ - - `Tzip_stat`:idx: - `libzip.html#104 <libzip.html#104>`_ - - `tzset`:idx: - `posix.html#1118 <posix.html#1118>`_ - - `TZStream`:idx: - `zlib.html#112 <zlib.html#112>`_ - - `TZStreamRec`:idx: - `zlib.html#113 <zlib.html#113>`_ - - `ualarm`:idx: - `posix.html#1040 <posix.html#1040>`_ - - `Uint`:idx: - `zlib.html#101 <zlib.html#101>`_ - - `Ulong`:idx: - `zlib.html#102 <zlib.html#102>`_ - - `Ulongf`:idx: - `zlib.html#103 <zlib.html#103>`_ - - `umask`:idx: - `posix.html#1066 <posix.html#1066>`_ - - `uname`:idx: - `posix.html#866 <posix.html#866>`_ - - `unchecked runtime error`:idx: - `manual.html#111 <manual.html#111>`_ - - `uncompress`:idx: - `zlib.html#156 <zlib.html#156>`_ - - `undef`:idx: - `manual.html#224 <manual.html#224>`_ - - `UnixToNativePath`:idx: - `os.html#124 <os.html#124>`_ - - `unlink`:idx: - `posix.html#1041 <posix.html#1041>`_ - - `unsigned integer`:idx: - `manual.html#143 <manual.html#143>`_ - - `unsigned operations`:idx: - `manual.html#144 <manual.html#144>`_ - - `untraced`:idx: - `manual.html#161 <manual.html#161>`_ - - `usleep`:idx: - `posix.html#1042 <posix.html#1042>`_ - - `Var`:idx: - `manual.html#179 <manual.html#179>`_ - - `varargs`:idx: - `nimrodc.html#106 <nimrodc.html#106>`_ - - `variant`:idx: - `manual.html#157 <manual.html#157>`_ - - `vertical tabulator`:idx: - `manual.html#126 <manual.html#126>`_ - - `vfork`:idx: - `posix.html#1043 <posix.html#1043>`_ - - `volatile`:idx: - `nimrodc.html#112 <nimrodc.html#112>`_ - - `wait`:idx: - `posix.html#1119 <posix.html#1119>`_ - - `waitid`:idx: - `posix.html#1120 <posix.html#1120>`_ - - `waitpid`:idx: - `posix.html#1121 <posix.html#1121>`_ - - `walkDir`:idx: - `os.html#155 <os.html#155>`_ - - `walkFiles`:idx: - * `os.html#153 <os.html#153>`_ - * `zipfiles.html#110 <zipfiles.html#110>`_ - - `warning`:idx: - * `manual.html#221 <manual.html#221>`_ - * `manual.html#227 <manual.html#227>`_ - * `dialogs.html#103 <dialogs.html#103>`_ - - `WCONTINUED`:idx: - `posix.html#714 <posix.html#714>`_ - - `WEXITED`:idx: - `posix.html#712 <posix.html#712>`_ - - `WEXITSTATUS`:idx: - `posix.html#705 <posix.html#705>`_ - - `when`:idx: - `manual.html#183 <manual.html#183>`_ - - `while`:idx: - `manual.html#195 <manual.html#195>`_ - - `Whitespace`:idx: - `strutils.html#102 <strutils.html#102>`_ - - `WIFCONTINUED`:idx: - `posix.html#706 <posix.html#706>`_ - - `WIFEXITED`:idx: - `posix.html#707 <posix.html#707>`_ - - `WIFSIGNALED`:idx: - `posix.html#708 <posix.html#708>`_ - - `WIFSTOPPED`:idx: - `posix.html#709 <posix.html#709>`_ - - `WNOHANG`:idx: - `posix.html#703 <posix.html#703>`_ - - `WNOWAIT`:idx: - `posix.html#715 <posix.html#715>`_ - - `W_OK`:idx: - `posix.html#480 <posix.html#480>`_ - - `write`:idx: - * `system.html#489 <system.html#489>`_ - * `system.html#490 <system.html#490>`_ - * `system.html#491 <system.html#491>`_ - * `system.html#492 <system.html#492>`_ - * `system.html#493 <system.html#493>`_ - * `system.html#494 <system.html#494>`_ - * `system.html#495 <system.html#495>`_ - * `posix.html#1044 <posix.html#1044>`_ - * `streams.html#103 <streams.html#103>`_ - * `streams.html#104 <streams.html#104>`_ - - `writeBuffer`:idx: - `system.html#505 <system.html#505>`_ - - `writeBytes`:idx: - `system.html#503 <system.html#503>`_ - - `writeChars`:idx: - `system.html#504 <system.html#504>`_ - - `writeln`:idx: - * `system.html#497 <system.html#497>`_ - * `system.html#498 <system.html#498>`_ - - `WSTOPPED`:idx: - `posix.html#713 <posix.html#713>`_ - - `WSTOPSIG`:idx: - `posix.html#710 <posix.html#710>`_ - - `WTERMSIG`:idx: - `posix.html#711 <posix.html#711>`_ - - `WUNTRACED`:idx: - `posix.html#704 <posix.html#704>`_ - - `X_OK`:idx: - `posix.html#481 <posix.html#481>`_ - - `xor`:idx: - * `system.html#238 <system.html#238>`_ - * `system.html#239 <system.html#239>`_ - * `system.html#240 <system.html#240>`_ - * `system.html#241 <system.html#241>`_ - * `system.html#242 <system.html#242>`_ - * `system.html#322 <system.html#322>`_ - - `YESEXPR`:idx: - `posix.html#441 <posix.html#441>`_ - - `yield`:idx: - `manual.html#192 <manual.html#192>`_ - - `Z_ASCII`:idx: - `zlib.html#138 <zlib.html#138>`_ - - `Z_BEST_COMPRESSION`:idx: - `zlib.html#132 <zlib.html#132>`_ - - `Z_BEST_SPEED`:idx: - `zlib.html#131 <zlib.html#131>`_ - - `Z_BINARY`:idx: - `zlib.html#137 <zlib.html#137>`_ - - `Z_BUF_ERROR`:idx: - `zlib.html#128 <zlib.html#128>`_ - - `Z_DATA_ERROR`:idx: - `zlib.html#126 <zlib.html#126>`_ - - `Z_DEFAULT_COMPRESSION`:idx: - `zlib.html#133 <zlib.html#133>`_ - - `Z_DEFAULT_STRATEGY`:idx: - `zlib.html#136 <zlib.html#136>`_ - - `Z_DEFLATED`:idx: - `zlib.html#140 <zlib.html#140>`_ - - `ze`:idx: - * `system.html#169 <system.html#169>`_ - * `system.html#170 <system.html#170>`_ - - `ze64`:idx: - * `system.html#171 <system.html#171>`_ - * `system.html#172 <system.html#172>`_ - * `system.html#173 <system.html#173>`_ - * `system.html#174 <system.html#174>`_ - - `zeroMem`:idx: - `system.html#407 <system.html#407>`_ - - `Z_ERRNO`:idx: - `zlib.html#124 <zlib.html#124>`_ - - `zError`:idx: - `zlib.html#184 <zlib.html#184>`_ - - `Z_FILTERED`:idx: - `zlib.html#134 <zlib.html#134>`_ - - `Z_FINISH`:idx: - `zlib.html#120 <zlib.html#120>`_ - - `Z_FULL_FLUSH`:idx: - `zlib.html#119 <zlib.html#119>`_ - - `Z_HUFFMAN_ONLY`:idx: - `zlib.html#135 <zlib.html#135>`_ - - `zip_add`:idx: - `libzip.html#170 <libzip.html#170>`_ - - `zip_add_dir`:idx: - `libzip.html#171 <libzip.html#171>`_ - - `ZIP_AFL_TORRENT`:idx: - `libzip.html#116 <libzip.html#116>`_ - - `ZIP_CHECKCONS`:idx: - `libzip.html#110 <libzip.html#110>`_ - - `zip_close`:idx: - `libzip.html#172 <libzip.html#172>`_ - - `ZIP_CM_BZIP2`:idx: - `libzip.html#155 <libzip.html#155>`_ - - `ZIP_CM_DEFAULT`:idx: - `libzip.html#144 <libzip.html#144>`_ - - `ZIP_CM_DEFLATE`:idx: - `libzip.html#152 <libzip.html#152>`_ - - `ZIP_CM_DEFLATE64`:idx: - `libzip.html#153 <libzip.html#153>`_ - - `ZIP_CM_IMPLODE`:idx: - `libzip.html#151 <libzip.html#151>`_ - - `ZIP_CM_LZ77`:idx: - `libzip.html#158 <libzip.html#158>`_ - - `ZIP_CM_LZMA`:idx: - `libzip.html#156 <libzip.html#156>`_ - - `ZIP_CM_PKWARE_IMPLODE`:idx: - `libzip.html#154 <libzip.html#154>`_ - - `ZIP_CM_PPMD`:idx: - `libzip.html#160 <libzip.html#160>`_ - - `ZIP_CM_REDUCE_1`:idx: - `libzip.html#147 <libzip.html#147>`_ - - `ZIP_CM_REDUCE_2`:idx: - `libzip.html#148 <libzip.html#148>`_ - - `ZIP_CM_REDUCE_3`:idx: - `libzip.html#149 <libzip.html#149>`_ - - `ZIP_CM_REDUCE_4`:idx: - `libzip.html#150 <libzip.html#150>`_ - - `ZIP_CM_SHRINK`:idx: - `libzip.html#146 <libzip.html#146>`_ - - `ZIP_CM_STORE`:idx: - `libzip.html#145 <libzip.html#145>`_ - - `ZIP_CM_TERSE`:idx: - `libzip.html#157 <libzip.html#157>`_ - - `ZIP_CM_WAVPACK`:idx: - `libzip.html#159 <libzip.html#159>`_ - - `ZIP_CREATE`:idx: - `libzip.html#108 <libzip.html#108>`_ - - `zip_delete`:idx: - `libzip.html#173 <libzip.html#173>`_ - - `ZIP_EM_NONE`:idx: - `libzip.html#161 <libzip.html#161>`_ - - `ZIP_EM_TRAD_PKWARE`:idx: - `libzip.html#162 <libzip.html#162>`_ - - `ZIP_EM_UNKNOWN`:idx: - `libzip.html#163 <libzip.html#163>`_ - - `ZIP_ER_CHANGED`:idx: - `libzip.html#132 <libzip.html#132>`_ - - `ZIP_ER_CLOSE`:idx: - `libzip.html#120 <libzip.html#120>`_ - - `ZIP_ER_COMPNOTSUPP`:idx: - `libzip.html#133 <libzip.html#133>`_ - - `ZIP_ER_CRC`:idx: - `libzip.html#124 <libzip.html#124>`_ - - `ZIP_ER_DELETED`:idx: - `libzip.html#140 <libzip.html#140>`_ - - `ZIP_ER_EOF`:idx: - `libzip.html#134 <libzip.html#134>`_ - - `ZIP_ER_EXISTS`:idx: - `libzip.html#127 <libzip.html#127>`_ - - `ZIP_ER_INCONS`:idx: - `libzip.html#138 <libzip.html#138>`_ - - `ZIP_ER_INTERNAL`:idx: - `libzip.html#137 <libzip.html#137>`_ - - `ZIP_ER_INVAL`:idx: - `libzip.html#135 <libzip.html#135>`_ - - `ZIP_ER_MEMORY`:idx: - `libzip.html#131 <libzip.html#131>`_ - - `ZIP_ER_MULTIDISK`:idx: - `libzip.html#118 <libzip.html#118>`_ - - `ZIP_ER_NOENT`:idx: - `libzip.html#126 <libzip.html#126>`_ - - `ZIP_ER_NOZIP`:idx: - `libzip.html#136 <libzip.html#136>`_ - - `ZIP_ER_OK`:idx: - `libzip.html#117 <libzip.html#117>`_ - - `ZIP_ER_OPEN`:idx: - `libzip.html#128 <libzip.html#128>`_ - - `ZIP_ER_READ`:idx: - `libzip.html#122 <libzip.html#122>`_ - - `ZIP_ER_REMOVE`:idx: - `libzip.html#139 <libzip.html#139>`_ - - `ZIP_ER_RENAME`:idx: - `libzip.html#119 <libzip.html#119>`_ - - `zip_error_clear`:idx: - `libzip.html#174 <libzip.html#174>`_ - - `zip_error_get`:idx: - `libzip.html#175 <libzip.html#175>`_ - - `zip_error_get_sys_type`:idx: - `libzip.html#176 <libzip.html#176>`_ - - `zip_error_to_str`:idx: - `libzip.html#177 <libzip.html#177>`_ - - `ZIP_ER_SEEK`:idx: - `libzip.html#121 <libzip.html#121>`_ - - `ZIP_ER_TMPOPEN`:idx: - `libzip.html#129 <libzip.html#129>`_ - - `ZIP_ER_WRITE`:idx: - `libzip.html#123 <libzip.html#123>`_ - - `ZIP_ER_ZIPCLOSED`:idx: - `libzip.html#125 <libzip.html#125>`_ - - `ZIP_ER_ZLIB`:idx: - `libzip.html#130 <libzip.html#130>`_ - - `ZIP_ET_NONE`:idx: - `libzip.html#141 <libzip.html#141>`_ - - `ZIP_ET_SYS`:idx: - `libzip.html#142 <libzip.html#142>`_ - - `ZIP_ET_ZLIB`:idx: - `libzip.html#143 <libzip.html#143>`_ - - `ZIP_EXCL`:idx: - `libzip.html#109 <libzip.html#109>`_ - - `zip_fclose`:idx: - `libzip.html#178 <libzip.html#178>`_ - - `zip_file_error_clear`:idx: - `libzip.html#179 <libzip.html#179>`_ - - `zip_file_error_get`:idx: - `libzip.html#180 <libzip.html#180>`_ - - `zip_file_strerror`:idx: - `libzip.html#181 <libzip.html#181>`_ - - `ZIP_FL_COMPRESSED`:idx: - `libzip.html#113 <libzip.html#113>`_ - - `ZIP_FL_NOCASE`:idx: - `libzip.html#111 <libzip.html#111>`_ - - `ZIP_FL_NODIR`:idx: - `libzip.html#112 <libzip.html#112>`_ - - `ZIP_FL_RECOMPRESS`:idx: - `libzip.html#115 <libzip.html#115>`_ - - `ZIP_FL_UNCHANGED`:idx: - `libzip.html#114 <libzip.html#114>`_ - - `zip_fopen`:idx: - `libzip.html#182 <libzip.html#182>`_ - - `zip_fopen_index`:idx: - `libzip.html#183 <libzip.html#183>`_ - - `zip_fread`:idx: - `libzip.html#184 <libzip.html#184>`_ - - `zip_get_archive_comment`:idx: - `libzip.html#185 <libzip.html#185>`_ - - `zip_get_archive_flag`:idx: - `libzip.html#186 <libzip.html#186>`_ - - `zip_get_file_comment`:idx: - `libzip.html#187 <libzip.html#187>`_ - - `zip_get_name`:idx: - `libzip.html#188 <libzip.html#188>`_ - - `zip_get_num_files`:idx: - `libzip.html#189 <libzip.html#189>`_ - - `zip_name_locate`:idx: - `libzip.html#190 <libzip.html#190>`_ - - `zip_open`:idx: - `libzip.html#191 <libzip.html#191>`_ - - `zip_rename`:idx: - `libzip.html#192 <libzip.html#192>`_ - - `zip_replace`:idx: - `libzip.html#193 <libzip.html#193>`_ - - `zip_set_archive_comment`:idx: - `libzip.html#194 <libzip.html#194>`_ - - `zip_set_archive_flag`:idx: - `libzip.html#195 <libzip.html#195>`_ - - `zip_set_file_comment`:idx: - `libzip.html#196 <libzip.html#196>`_ - - `zip_source_buffer`:idx: - `libzip.html#197 <libzip.html#197>`_ - - `ZIP_SOURCE_CLOSE`:idx: - `libzip.html#166 <libzip.html#166>`_ - - `ZIP_SOURCE_ERROR`:idx: - `libzip.html#168 <libzip.html#168>`_ - - `zip_source_file`:idx: - `libzip.html#198 <libzip.html#198>`_ - - `zip_source_filep`:idx: - `libzip.html#199 <libzip.html#199>`_ - - `zip_source_free`:idx: - `libzip.html#200 <libzip.html#200>`_ - - `zip_source_function`:idx: - `libzip.html#201 <libzip.html#201>`_ - - `ZIP_SOURCE_OPEN`:idx: - `libzip.html#164 <libzip.html#164>`_ - - `ZIP_SOURCE_READ`:idx: - `libzip.html#165 <libzip.html#165>`_ - - `ZIP_SOURCE_STAT`:idx: - `libzip.html#167 <libzip.html#167>`_ - - `zip_source_zip`:idx: - `libzip.html#202 <libzip.html#202>`_ - - `zip_stat`:idx: - `libzip.html#203 <libzip.html#203>`_ - - `zip_stat_index`:idx: - `libzip.html#204 <libzip.html#204>`_ - - `zip_stat_init`:idx: - `libzip.html#205 <libzip.html#205>`_ - - `zip_strerror`:idx: - `libzip.html#206 <libzip.html#206>`_ - - `zip_unchange`:idx: - `libzip.html#207 <libzip.html#207>`_ - - `zip_unchange_all`:idx: - `libzip.html#208 <libzip.html#208>`_ - - `zip_unchange_archive`:idx: - `libzip.html#209 <libzip.html#209>`_ - - `zlibAllocMem`:idx: - `zlib.html#187 <zlib.html#187>`_ - - `zlibFreeMem`:idx: - `zlib.html#188 <zlib.html#188>`_ - - `zlibVersion`:idx: - `zlib.html#142 <zlib.html#142>`_ - - `Z_MEM_ERROR`:idx: - `zlib.html#127 <zlib.html#127>`_ - - `Z_NEED_DICT`:idx: - `zlib.html#123 <zlib.html#123>`_ - - `Z_NO_COMPRESSION`:idx: - `zlib.html#130 <zlib.html#130>`_ - - `Z_NO_FLUSH`:idx: - `zlib.html#116 <zlib.html#116>`_ - - `Z_NULL`:idx: - `zlib.html#141 <zlib.html#141>`_ - - `z_off_t`:idx: - `zlib.html#105 <zlib.html#105>`_ - - `Z_OK`:idx: - `zlib.html#121 <zlib.html#121>`_ - - `Z_PARTIAL_FLUSH`:idx: - `zlib.html#117 <zlib.html#117>`_ - - `Z_STREAM_END`:idx: - `zlib.html#122 <zlib.html#122>`_ - - `Z_STREAM_ERROR`:idx: - `zlib.html#125 <zlib.html#125>`_ - - `Z_SYNC_FLUSH`:idx: - `zlib.html#118 <zlib.html#118>`_ - - `Z_UNKNOWN`:idx: - `zlib.html#139 <zlib.html#139>`_ - - `Z_VERSION_ERROR`:idx: + +===== +Index +===== + +.. index:: + + + `!=`:idx: + `system.html#351 <system.html#351>`_ + + `$`:idx: + * `system.html#422 <system.html#422>`_ + * `system.html#423 <system.html#423>`_ + * `system.html#424 <system.html#424>`_ + * `system.html#425 <system.html#425>`_ + * `system.html#426 <system.html#426>`_ + * `system.html#427 <system.html#427>`_ + * `system.html#428 <system.html#428>`_ + * `system.html#429 <system.html#429>`_ + * `times.html#109 <times.html#109>`_ + * `times.html#110 <times.html#110>`_ + + `%`:idx: + * `strutils.html#134 <strutils.html#134>`_ + * `strutils.html#135 <strutils.html#135>`_ + * `strtabs.html#112 <strtabs.html#112>`_ + + `%%`:idx: + * `system.html#296 <system.html#296>`_ + * `system.html#297 <system.html#297>`_ + * `system.html#298 <system.html#298>`_ + * `system.html#299 <system.html#299>`_ + * `system.html#300 <system.html#300>`_ + + `&`:idx: + * `system.html#362 <system.html#362>`_ + * `system.html#363 <system.html#363>`_ + * `system.html#364 <system.html#364>`_ + * `system.html#365 <system.html#365>`_ + * `system.html#453 <system.html#453>`_ + * `system.html#454 <system.html#454>`_ + * `system.html#455 <system.html#455>`_ + * `system.html#456 <system.html#456>`_ + + `*`:idx: + * `system.html#206 <system.html#206>`_ + * `system.html#207 <system.html#207>`_ + * `system.html#208 <system.html#208>`_ + * `system.html#209 <system.html#209>`_ + * `system.html#210 <system.html#210>`_ + * `system.html#315 <system.html#315>`_ + * `system.html#323 <system.html#323>`_ + * `complex.html#107 <complex.html#107>`_ + + `*%`:idx: + * `system.html#286 <system.html#286>`_ + * `system.html#287 <system.html#287>`_ + * `system.html#288 <system.html#288>`_ + * `system.html#289 <system.html#289>`_ + * `system.html#290 <system.html#290>`_ + + `+`:idx: + * `system.html#181 <system.html#181>`_ + * `system.html#182 <system.html#182>`_ + * `system.html#183 <system.html#183>`_ + * `system.html#184 <system.html#184>`_ + * `system.html#185 <system.html#185>`_ + * `system.html#196 <system.html#196>`_ + * `system.html#197 <system.html#197>`_ + * `system.html#198 <system.html#198>`_ + * `system.html#199 <system.html#199>`_ + * `system.html#200 <system.html#200>`_ + * `system.html#311 <system.html#311>`_ + * `system.html#313 <system.html#313>`_ + * `system.html#324 <system.html#324>`_ + * `complex.html#103 <complex.html#103>`_ + + `+%`:idx: + * `system.html#276 <system.html#276>`_ + * `system.html#277 <system.html#277>`_ + * `system.html#278 <system.html#278>`_ + * `system.html#279 <system.html#279>`_ + * `system.html#280 <system.html#280>`_ + + `-`:idx: + * `system.html#186 <system.html#186>`_ + * `system.html#187 <system.html#187>`_ + * `system.html#188 <system.html#188>`_ + * `system.html#189 <system.html#189>`_ + * `system.html#190 <system.html#190>`_ + * `system.html#201 <system.html#201>`_ + * `system.html#202 <system.html#202>`_ + * `system.html#203 <system.html#203>`_ + * `system.html#204 <system.html#204>`_ + * `system.html#205 <system.html#205>`_ + * `system.html#312 <system.html#312>`_ + * `system.html#314 <system.html#314>`_ + * `system.html#325 <system.html#325>`_ + * `complex.html#104 <complex.html#104>`_ + * `complex.html#105 <complex.html#105>`_ + * `times.html#113 <times.html#113>`_ + + `-%`:idx: + * `system.html#281 <system.html#281>`_ + * `system.html#282 <system.html#282>`_ + * `system.html#283 <system.html#283>`_ + * `system.html#284 <system.html#284>`_ + * `system.html#285 <system.html#285>`_ + + `-+-`:idx: + `system.html#326 <system.html#326>`_ + + `/`:idx: + * `system.html#316 <system.html#316>`_ + * `os.html#119 <os.html#119>`_ + * `complex.html#106 <complex.html#106>`_ + + `/%`:idx: + * `system.html#291 <system.html#291>`_ + * `system.html#292 <system.html#292>`_ + * `system.html#293 <system.html#293>`_ + * `system.html#294 <system.html#294>`_ + * `system.html#295 <system.html#295>`_ + + `/../`:idx: + `os.html#123 <os.html#123>`_ + + `<`:idx: + * `system.html#256 <system.html#256>`_ + * `system.html#257 <system.html#257>`_ + * `system.html#258 <system.html#258>`_ + * `system.html#259 <system.html#259>`_ + * `system.html#260 <system.html#260>`_ + * `system.html#319 <system.html#319>`_ + * `system.html#343 <system.html#343>`_ + * `system.html#344 <system.html#344>`_ + * `system.html#345 <system.html#345>`_ + * `system.html#346 <system.html#346>`_ + * `system.html#347 <system.html#347>`_ + * `system.html#348 <system.html#348>`_ + * `system.html#349 <system.html#349>`_ + * `system.html#350 <system.html#350>`_ + * `times.html#114 <times.html#114>`_ + + `<%`:idx: + * `system.html#306 <system.html#306>`_ + * `system.html#307 <system.html#307>`_ + * `system.html#308 <system.html#308>`_ + * `system.html#309 <system.html#309>`_ + * `system.html#310 <system.html#310>`_ + + `<=`:idx: + * `system.html#251 <system.html#251>`_ + * `system.html#252 <system.html#252>`_ + * `system.html#253 <system.html#253>`_ + * `system.html#254 <system.html#254>`_ + * `system.html#255 <system.html#255>`_ + * `system.html#318 <system.html#318>`_ + * `system.html#336 <system.html#336>`_ + * `system.html#337 <system.html#337>`_ + * `system.html#338 <system.html#338>`_ + * `system.html#339 <system.html#339>`_ + * `system.html#340 <system.html#340>`_ + * `system.html#341 <system.html#341>`_ + * `system.html#342 <system.html#342>`_ + + `<=`:idx: + `times.html#115 <times.html#115>`_ + + `<=%`:idx: + * `system.html#301 <system.html#301>`_ + * `system.html#302 <system.html#302>`_ + * `system.html#303 <system.html#303>`_ + * `system.html#304 <system.html#304>`_ + * `system.html#305 <system.html#305>`_ + + `==`:idx: + * `system.html#246 <system.html#246>`_ + * `system.html#247 <system.html#247>`_ + * `system.html#248 <system.html#248>`_ + * `system.html#249 <system.html#249>`_ + * `system.html#250 <system.html#250>`_ + * `system.html#317 <system.html#317>`_ + * `system.html#327 <system.html#327>`_ + * `system.html#328 <system.html#328>`_ + * `system.html#329 <system.html#329>`_ + * `system.html#330 <system.html#330>`_ + * `system.html#331 <system.html#331>`_ + * `system.html#332 <system.html#332>`_ + * `system.html#333 <system.html#333>`_ + * `system.html#334 <system.html#334>`_ + * `system.html#335 <system.html#335>`_ + * `system.html#458 <system.html#458>`_ + * `complex.html#102 <complex.html#102>`_ + + `>`:idx: + `system.html#353 <system.html#353>`_ + + `>%`:idx: + `system.html#421 <system.html#421>`_ + + `>=`:idx: + `system.html#352 <system.html#352>`_ + + `>=%`:idx: + `system.html#420 <system.html#420>`_ + + `@`:idx: + `system.html#361 <system.html#361>`_ + + `[]`:idx: + `strtabs.html#107 <strtabs.html#107>`_ + + `[]=`:idx: + `strtabs.html#106 <strtabs.html#106>`_ + + `[ESC]`:idx: + `manual.html#134 <manual.html#134>`_ + + `ABDAY_1`:idx: + `posix.html#403 <posix.html#403>`_ + + `ABDAY_2`:idx: + `posix.html#404 <posix.html#404>`_ + + `ABDAY_3`:idx: + `posix.html#405 <posix.html#405>`_ + + `ABDAY_4`:idx: + `posix.html#406 <posix.html#406>`_ + + `ABDAY_5`:idx: + `posix.html#407 <posix.html#407>`_ + + `ABDAY_6`:idx: + `posix.html#408 <posix.html#408>`_ + + `ABDAY_7`:idx: + `posix.html#409 <posix.html#409>`_ + + `ABMON_1`:idx: + `posix.html#422 <posix.html#422>`_ + + `ABMON_10`:idx: + `posix.html#431 <posix.html#431>`_ + + `ABMON_11`:idx: + `posix.html#432 <posix.html#432>`_ + + `ABMON_12`:idx: + `posix.html#433 <posix.html#433>`_ + + `ABMON_2`:idx: + `posix.html#423 <posix.html#423>`_ + + `ABMON_3`:idx: + `posix.html#424 <posix.html#424>`_ + + `ABMON_4`:idx: + `posix.html#425 <posix.html#425>`_ + + `ABMON_5`:idx: + `posix.html#426 <posix.html#426>`_ + + `ABMON_6`:idx: + `posix.html#427 <posix.html#427>`_ + + `ABMON_7`:idx: + `posix.html#428 <posix.html#428>`_ + + `ABMON_8`:idx: + `posix.html#429 <posix.html#429>`_ + + `ABMON_9`:idx: + `posix.html#430 <posix.html#430>`_ + + `abs`:idx: + * `system.html#261 <system.html#261>`_ + * `system.html#262 <system.html#262>`_ + * `system.html#263 <system.html#263>`_ + * `system.html#264 <system.html#264>`_ + * `system.html#265 <system.html#265>`_ + * `system.html#320 <system.html#320>`_ + * `complex.html#108 <complex.html#108>`_ + + `access`:idx: + `posix.html#966 <posix.html#966>`_ + + `acyclic`:idx: + `nimrodc.html#113 <nimrodc.html#113>`_ + + `add`:idx: + * `system.html#366 <system.html#366>`_ + * `system.html#367 <system.html#367>`_ + * `system.html#368 <system.html#368>`_ + * `system.html#369 <system.html#369>`_ + * `system.html#370 <system.html#370>`_ + + `addFile`:idx: + * `zipfiles.html#105 <zipfiles.html#105>`_ + * `zipfiles.html#106 <zipfiles.html#106>`_ + * `zipfiles.html#107 <zipfiles.html#107>`_ + + `addQuitProc`:idx: + `system.html#404 <system.html#404>`_ + + `adler32`:idx: + `zlib.html#174 <zlib.html#174>`_ + + `AIO_ALLDONE`:idx: + `posix.html#207 <posix.html#207>`_ + + `aio_cancel`:idx: + `posix.html#784 <posix.html#784>`_ + + `AIO_CANCELED`:idx: + `posix.html#208 <posix.html#208>`_ + + `aio_error`:idx: + `posix.html#785 <posix.html#785>`_ + + `aio_fsync`:idx: + `posix.html#786 <posix.html#786>`_ + + `AIO_NOTCANCELED`:idx: + `posix.html#209 <posix.html#209>`_ + + `aio_read`:idx: + `posix.html#787 <posix.html#787>`_ + + `aio_return`:idx: + `posix.html#788 <posix.html#788>`_ + + `aio_suspend`:idx: + `posix.html#789 <posix.html#789>`_ + + `aio_write`:idx: + `posix.html#790 <posix.html#790>`_ + + `alarm`:idx: + `posix.html#967 <posix.html#967>`_ + + `alert`:idx: + `manual.html#131 <manual.html#131>`_ + + `allCharsInSet`:idx: + `strutils.html#139 <strutils.html#139>`_ + + `alloc`:idx: + `system.html#413 <system.html#413>`_ + + `alloc0`:idx: + `system.html#414 <system.html#414>`_ + + `ALT_DIGITS`:idx: + `posix.html#438 <posix.html#438>`_ + + `AltSep`:idx: + `os.html#104 <os.html#104>`_ + + `AM_STR`:idx: + `posix.html#394 <posix.html#394>`_ + + `and`:idx: + * `system.html#116 <system.html#116>`_ + * `system.html#231 <system.html#231>`_ + * `system.html#232 <system.html#232>`_ + * `system.html#233 <system.html#233>`_ + * `system.html#234 <system.html#234>`_ + * `system.html#235 <system.html#235>`_ + + `apostrophe`:idx: + `manual.html#129 <manual.html#129>`_ + + `AppendFileExt`:idx: + `os.html#131 <os.html#131>`_ + + `arccos`:idx: + `math.html#117 <math.html#117>`_ + + `arcsin`:idx: + `math.html#118 <math.html#118>`_ + + `arctan`:idx: + `math.html#119 <math.html#119>`_ + + `arctan2`:idx: + `math.html#120 <math.html#120>`_ + + `arithmetic bit shifts`:idx: + `tut1.html#110 <tut1.html#110>`_ + + `array`:idx: + * `tut1.html#117 <tut1.html#117>`_ + * `system.html#124 <system.html#124>`_ + + `array properties`:idx: + `tut2.html#105 <tut2.html#105>`_ + + `Arrays`:idx: + `manual.html#152 <manual.html#152>`_ + + `asctime`:idx: + `posix.html#1092 <posix.html#1092>`_ + + `asctime_r`:idx: + `posix.html#1093 <posix.html#1093>`_ + + `assembler`:idx: + `manual.html#196 <manual.html#196>`_ + + `assert`:idx: + `system.html#418 <system.html#418>`_ + + `Automatic type conversion`:idx: + * `manual.html#144 <manual.html#144>`_ + * `tut1.html#111 <tut1.html#111>`_ + + `backslash`:idx: + * `manual.html#127 <manual.html#127>`_ + * `regexprs.html#101 <regexprs.html#101>`_ + + `backspace`:idx: + `manual.html#132 <manual.html#132>`_ + + `basename`:idx: + `posix.html#844 <posix.html#844>`_ + + `BiggestFloat`:idx: + `system.html#374 <system.html#374>`_ + + `BiggestInt`:idx: + `system.html#373 <system.html#373>`_ + + `block`:idx: + `manual.html#192 <manual.html#192>`_ + + `bool`:idx: + `system.html#109 <system.html#109>`_ + + `boolean`:idx: + * `manual.html#146 <manual.html#146>`_ + * `tut1.html#107 <tut1.html#107>`_ + + `break`:idx: + `manual.html#193 <manual.html#193>`_ + + `breakpoint`:idx: + `endb.html#103 <endb.html#103>`_ + + `bsd_signal`:idx: + `posix.html#1122 <posix.html#1122>`_ + + `Byte`:idx: + `system.html#128 <system.html#128>`_ + + `calling conventions`:idx: + `manual.html#163 <manual.html#163>`_ + + `capitalize`:idx: + `strutils.html#110 <strutils.html#110>`_ + + `card`:idx: + `system.html#169 <system.html#169>`_ + + `carriage return`:idx: + `manual.html#122 <manual.html#122>`_ + + `case`:idx: + `manual.html#181 <manual.html#181>`_ + + `catclose`:idx: + `posix.html#1149 <posix.html#1149>`_ + + `catgets`:idx: + `posix.html#1150 <posix.html#1150>`_ + + `catopen`:idx: + `posix.html#1151 <posix.html#1151>`_ + + `cchar`:idx: + `system.html#375 <system.html#375>`_ + + `cdecl`:idx: + `manual.html#165 <manual.html#165>`_ + + `cdouble`:idx: + `system.html#382 <system.html#382>`_ + + `cfloat`:idx: + `system.html#381 <system.html#381>`_ + + `ChangeFileExt`:idx: + `os.html#132 <os.html#132>`_ + + `char`:idx: + `system.html#110 <system.html#110>`_ + + `character type`:idx: + `manual.html#147 <manual.html#147>`_ + + `character with decimal value d`:idx: + `manual.html#130 <manual.html#130>`_ + + `character with hex value HH`:idx: + `manual.html#135 <manual.html#135>`_ + + `chdir`:idx: + `posix.html#968 <posix.html#968>`_ + + `checked runtime error`:idx: + `manual.html#110 <manual.html#110>`_ + + `chmod`:idx: + `posix.html#1058 <posix.html#1058>`_ + + `ChooseDir`:idx: + `dialogs.html#108 <dialogs.html#108>`_ + + `ChooseFilesToOpen`:idx: + `dialogs.html#106 <dialogs.html#106>`_ + + `ChooseFileToOpen`:idx: + `dialogs.html#105 <dialogs.html#105>`_ + + `ChooseFileToSave`:idx: + `dialogs.html#107 <dialogs.html#107>`_ + + `chown`:idx: + `posix.html#969 <posix.html#969>`_ + + `chr`:idx: + `system.html#171 <system.html#171>`_ + + `cint`:idx: + `system.html#378 <system.html#378>`_ + + `C_IRGRP`:idx: + `posix.html#104 <posix.html#104>`_ + + `C_IROTH`:idx: + `posix.html#107 <posix.html#107>`_ + + `C_IRUSR`:idx: + `posix.html#101 <posix.html#101>`_ + + `C_ISBLK`:idx: + `posix.html#116 <posix.html#116>`_ + + `C_ISCHR`:idx: + `posix.html#117 <posix.html#117>`_ + + `C_ISCTG`:idx: + `posix.html#118 <posix.html#118>`_ + + `C_ISDIR`:idx: + `posix.html#113 <posix.html#113>`_ + + `C_ISFIFO`:idx: + `posix.html#114 <posix.html#114>`_ + + `C_ISGID`:idx: + `posix.html#111 <posix.html#111>`_ + + `C_ISLNK`:idx: + `posix.html#119 <posix.html#119>`_ + + `C_ISREG`:idx: + `posix.html#115 <posix.html#115>`_ + + `C_ISSOCK`:idx: + `posix.html#120 <posix.html#120>`_ + + `C_ISUID`:idx: + `posix.html#110 <posix.html#110>`_ + + `C_ISVTX`:idx: + `posix.html#112 <posix.html#112>`_ + + `C_IWGRP`:idx: + `posix.html#105 <posix.html#105>`_ + + `C_IWOTH`:idx: + `posix.html#108 <posix.html#108>`_ + + `C_IWUSR`:idx: + `posix.html#102 <posix.html#102>`_ + + `C_IXGRP`:idx: + `posix.html#106 <posix.html#106>`_ + + `C_IXOTH`:idx: + `posix.html#109 <posix.html#109>`_ + + `C_IXUSR`:idx: + `posix.html#103 <posix.html#103>`_ + + `classify`:idx: + `math.html#104 <math.html#104>`_ + + `clock`:idx: + `posix.html#1094 <posix.html#1094>`_ + + `clock_getcpuclockid`:idx: + `posix.html#1095 <posix.html#1095>`_ + + `clock_getres`:idx: + `posix.html#1096 <posix.html#1096>`_ + + `clock_gettime`:idx: + `posix.html#1097 <posix.html#1097>`_ + + `CLOCK_MONOTONIC`:idx: + `posix.html#700 <posix.html#700>`_ + + `clock_nanosleep`:idx: + `posix.html#1098 <posix.html#1098>`_ + + `CLOCK_PROCESS_CPUTIME_ID`:idx: + `posix.html#696 <posix.html#696>`_ + + `CLOCK_REALTIME`:idx: + `posix.html#698 <posix.html#698>`_ + + `clock_settime`:idx: + `posix.html#1099 <posix.html#1099>`_ + + `CLOCKS_PER_SEC`:idx: + `posix.html#695 <posix.html#695>`_ + + `CLOCK_THREAD_CPUTIME_ID`:idx: + `posix.html#697 <posix.html#697>`_ + + `clong`:idx: + `system.html#379 <system.html#379>`_ + + `clongdouble`:idx: + `system.html#383 <system.html#383>`_ + + `clonglong`:idx: + `system.html#380 <system.html#380>`_ + + `close`:idx: + * `posix.html#970 <posix.html#970>`_ + * `lexbase.html#105 <lexbase.html#105>`_ + * `parsecfg.html#105 <parsecfg.html#105>`_ + * `zipfiles.html#103 <zipfiles.html#103>`_ + + `closedir`:idx: + `posix.html#800 <posix.html#800>`_ + + `CloseFile`:idx: + `system.html#488 <system.html#488>`_ + + `closure`:idx: + `manual.html#170 <manual.html#170>`_ + + `cmp`:idx: + * `system.html#359 <system.html#359>`_ + * `system.html#360 <system.html#360>`_ + + `cmpIgnoreCase`:idx: + `strutils.html#123 <strutils.html#123>`_ + + `cmpIgnoreStyle`:idx: + `strutils.html#124 <strutils.html#124>`_ + + `cmpPaths`:idx: + `os.html#130 <os.html#130>`_ + + `CODESET`:idx: + `posix.html#389 <posix.html#389>`_ + + `comment pieces`:idx: + * `manual.html#115 <manual.html#115>`_ + * `tut1.html#103 <tut1.html#103>`_ + + `Comments`:idx: + * `manual.html#114 <manual.html#114>`_ + * `tut1.html#102 <tut1.html#102>`_ + + `CompileDate`:idx: + `system.html#391 <system.html#391>`_ + + `CompileTime`:idx: + `system.html#392 <system.html#392>`_ + + `complex statements`:idx: + `manual.html#175 <manual.html#175>`_ + + `compress`:idx: + `zlib.html#154 <zlib.html#154>`_ + + `compress2`:idx: + `zlib.html#155 <zlib.html#155>`_ + + `confstr`:idx: + `posix.html#971 <posix.html#971>`_ + + `const`:idx: + `manual.html#179 <manual.html#179>`_ + + `constant expressions`:idx: + `manual.html#108 <manual.html#108>`_ + + `Constants`:idx: + * `manual.html#139 <manual.html#139>`_ + * `tut1.html#104 <tut1.html#104>`_ + + `constZIP_SOURCE_FREE`:idx: + `libzip.html#169 <libzip.html#169>`_ + + `contains`:idx: + * `system.html#354 <system.html#354>`_ + * `strutils.html#125 <strutils.html#125>`_ + * `strutils.html#126 <strutils.html#126>`_ + * `strutils.html#127 <strutils.html#127>`_ + + `continue`:idx: + `manual.html#195 <manual.html#195>`_ + + `copy`:idx: + * `system.html#405 <system.html#405>`_ + * `system.html#406 <system.html#406>`_ + + `copyFile`:idx: + `os.html#134 <os.html#134>`_ + + `copyMem`:idx: + `system.html#410 <system.html#410>`_ + + `cos`:idx: + `math.html#121 <math.html#121>`_ + + `cosh`:idx: + `math.html#122 <math.html#122>`_ + + `countBits`:idx: + `math.html#107 <math.html#107>`_ + + `countdown`:idx: + `system.html#439 <system.html#439>`_ + + `countup`:idx: + `system.html#440 <system.html#440>`_ + + `cpuEndian`:idx: + `system.html#397 <system.html#397>`_ + + `crc32`:idx: + `zlib.html#175 <zlib.html#175>`_ + + `creat`:idx: + `posix.html#811 <posix.html#811>`_ + + `createDir`:idx: + * `os.html#138 <os.html#138>`_ + * `zipfiles.html#104 <zipfiles.html#104>`_ + + `CRNCYSTR`:idx: + `posix.html#443 <posix.html#443>`_ + + `crypt`:idx: + `posix.html#972 <posix.html#972>`_ + + `cschar`:idx: + `system.html#376 <system.html#376>`_ + + `cshort`:idx: + `system.html#377 <system.html#377>`_ + + `cSIG_HOLD`:idx: + `posix.html#721 <posix.html#721>`_ + + `CS_PATH`:idx: + `posix.html#482 <posix.html#482>`_ + + `CS_POSIX_V6_ILP32_OFF32_CFLAGS`:idx: + `posix.html#483 <posix.html#483>`_ + + `CS_POSIX_V6_ILP32_OFF32_LDFLAGS`:idx: + `posix.html#484 <posix.html#484>`_ + + `CS_POSIX_V6_ILP32_OFF32_LIBS`:idx: + `posix.html#485 <posix.html#485>`_ + + `CS_POSIX_V6_ILP32_OFFBIG_CFLAGS`:idx: + `posix.html#486 <posix.html#486>`_ + + `CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS`:idx: + `posix.html#487 <posix.html#487>`_ + + `CS_POSIX_V6_ILP32_OFFBIG_LIBS`:idx: + `posix.html#488 <posix.html#488>`_ + + `CS_POSIX_V6_LP64_OFF64_CFLAGS`:idx: + `posix.html#489 <posix.html#489>`_ + + `CS_POSIX_V6_LP64_OFF64_LDFLAGS`:idx: + `posix.html#490 <posix.html#490>`_ + + `CS_POSIX_V6_LP64_OFF64_LIBS`:idx: + `posix.html#491 <posix.html#491>`_ + + `CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS`:idx: + `posix.html#492 <posix.html#492>`_ + + `CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS`:idx: + `posix.html#493 <posix.html#493>`_ + + `CS_POSIX_V6_LPBIG_OFFBIG_LIBS`:idx: + `posix.html#494 <posix.html#494>`_ + + `CS_POSIX_V6_WIDTH_RESTRICTED_ENVS`:idx: + `posix.html#495 <posix.html#495>`_ + + `cstring`:idx: + `system.html#112 <system.html#112>`_ + + `cstringArray`:idx: + `system.html#384 <system.html#384>`_ + + `ctermid`:idx: + `posix.html#973 <posix.html#973>`_ + + `ctime`:idx: + `posix.html#1100 <posix.html#1100>`_ + + `ctime_r`:idx: + `posix.html#1101 <posix.html#1101>`_ + + `CurDir`:idx: + `os.html#101 <os.html#101>`_ + + `dangling else problem`:idx: + `manual.html#176 <manual.html#176>`_ + + `DAY_1`:idx: + `posix.html#396 <posix.html#396>`_ + + `DAY_2`:idx: + `posix.html#397 <posix.html#397>`_ + + `DAY_3`:idx: + `posix.html#398 <posix.html#398>`_ + + `DAY_4`:idx: + `posix.html#399 <posix.html#399>`_ + + `DAY_5`:idx: + `posix.html#400 <posix.html#400>`_ + + `DAY_6`:idx: + `posix.html#401 <posix.html#401>`_ + + `DAY_7`:idx: + `posix.html#402 <posix.html#402>`_ + + `daylight`:idx: + `posix.html#701 <posix.html#701>`_ + + `dbgLineHook`:idx: + `system.html#435 <system.html#435>`_ + + `dead_code_elim`:idx: + `nimrodc.html#114 <nimrodc.html#114>`_ + + `dealloc`:idx: + `system.html#416 <system.html#416>`_ + + `debugger`:idx: + `nimrodc.html#110 <nimrodc.html#110>`_ + + `dec`:idx: + `system.html#160 <system.html#160>`_ + + `define`:idx: + `manual.html#222 <manual.html#222>`_ + + `defined`:idx: + `system.html#114 <system.html#114>`_ + + `deflate`:idx: + `zlib.html#143 <zlib.html#143>`_ + + `deflateCopy`:idx: + `zlib.html#148 <zlib.html#148>`_ + + `deflateEnd`:idx: + `zlib.html#144 <zlib.html#144>`_ + + `deflateInit`:idx: + `zlib.html#178 <zlib.html#178>`_ + + `deflateInit2`:idx: + `zlib.html#182 <zlib.html#182>`_ + + `deflateInit2u`:idx: + `zlib.html#180 <zlib.html#180>`_ + + `deflateInitu`:idx: + `zlib.html#176 <zlib.html#176>`_ + + `deflateParams`:idx: + `zlib.html#150 <zlib.html#150>`_ + + `deflateReset`:idx: + `zlib.html#149 <zlib.html#149>`_ + + `deflateSetDictionary`:idx: + `zlib.html#147 <zlib.html#147>`_ + + `deleteStr`:idx: + `strutils.html#117 <strutils.html#117>`_ + + `D_FMT`:idx: + `posix.html#391 <posix.html#391>`_ + + `difftime`:idx: + `posix.html#1102 <posix.html#1102>`_ + + `dirname`:idx: + `posix.html#845 <posix.html#845>`_ + + `DirSep`:idx: + `os.html#103 <os.html#103>`_ + + `discard`:idx: + `manual.html#177 <manual.html#177>`_ + + `div`:idx: + * `system.html#211 <system.html#211>`_ + * `system.html#212 <system.html#212>`_ + * `system.html#213 <system.html#213>`_ + * `system.html#214 <system.html#214>`_ + * `system.html#215 <system.html#215>`_ + + `dlclose`:idx: + `posix.html#807 <posix.html#807>`_ + + `dlerror`:idx: + `posix.html#808 <posix.html#808>`_ + + `dlopen`:idx: + `posix.html#809 <posix.html#809>`_ + + `dlsym`:idx: + `posix.html#810 <posix.html#810>`_ + + `dom`:idx: + `nimrodc.html#120 <nimrodc.html#120>`_ + + `domain specific languages`:idx: + * `manual.html#211 <manual.html#211>`_ + * `tut2.html#112 <tut2.html#112>`_ + + `D_T_FMT`:idx: + `posix.html#390 <posix.html#390>`_ + + `dup`:idx: + `posix.html#974 <posix.html#974>`_ + + `dup2`:idx: + `posix.html#975 <posix.html#975>`_ + + `dynamic type`:idx: + `manual.html#104 <manual.html#104>`_ + + `dynlib`:idx: + `nimrodc.html#103 <nimrodc.html#103>`_ + + `E`:idx: + `math.html#102 <math.html#102>`_ + + `E2BIG`:idx: + `posix.html#220 <posix.html#220>`_ + + `EACCES`:idx: + `posix.html#221 <posix.html#221>`_ + + `EAccessViolation`:idx: + `system.html#143 <system.html#143>`_ + + `EADDRINUSE`:idx: + `posix.html#222 <posix.html#222>`_ + + `EADDRNOTAVAIL`:idx: + `posix.html#223 <posix.html#223>`_ + + `EAFNOSUPPORT`:idx: + `posix.html#224 <posix.html#224>`_ + + `EAGAIN`:idx: + `posix.html#225 <posix.html#225>`_ + + `EALREADY`:idx: + `posix.html#226 <posix.html#226>`_ + + `EArithmetic`:idx: + `system.html#140 <system.html#140>`_ + + `EAssertionFailed`:idx: + `system.html#144 <system.html#144>`_ + + `EAsynch`:idx: + `system.html#134 <system.html#134>`_ + + `EBADF`:idx: + `posix.html#227 <posix.html#227>`_ + + `EBADMSG`:idx: + `posix.html#228 <posix.html#228>`_ + + `E_Base`:idx: + `system.html#133 <system.html#133>`_ + + `EBUSY`:idx: + `posix.html#229 <posix.html#229>`_ + + `ECANCELED`:idx: + `posix.html#230 <posix.html#230>`_ + + `ECHILD`:idx: + `posix.html#231 <posix.html#231>`_ + + `echo`:idx: + * `system.html#474 <system.html#474>`_ + * `system.html#475 <system.html#475>`_ + + `ECMAScript`:idx: + `nimrodc.html#115 <nimrodc.html#115>`_ + + `ECONNABORTED`:idx: + `posix.html#232 <posix.html#232>`_ + + `ECONNREFUSED`:idx: + `posix.html#233 <posix.html#233>`_ + + `ECONNRESET`:idx: + `posix.html#234 <posix.html#234>`_ + + `EControlC`:idx: + `system.html#145 <system.html#145>`_ + + `EDEADLK`:idx: + `posix.html#235 <posix.html#235>`_ + + `EDESTADDRREQ`:idx: + `posix.html#236 <posix.html#236>`_ + + `editDistance`:idx: + `strutils.html#144 <strutils.html#144>`_ + + `EDivByZero`:idx: + `system.html#141 <system.html#141>`_ + + `EDOM`:idx: + `posix.html#237 <posix.html#237>`_ + + `EDQUOT`:idx: + `posix.html#238 <posix.html#238>`_ + + `EEXIST`:idx: + `posix.html#239 <posix.html#239>`_ + + `EFAULT`:idx: + `posix.html#240 <posix.html#240>`_ + + `EFBIG`:idx: + `posix.html#241 <posix.html#241>`_ + + `EHOSTUNREACH`:idx: + `posix.html#242 <posix.html#242>`_ + + `EIDRM`:idx: + `posix.html#243 <posix.html#243>`_ + + `EILSEQ`:idx: + `posix.html#244 <posix.html#244>`_ + + `EINPROGRESS`:idx: + `posix.html#245 <posix.html#245>`_ + + `EINTR`:idx: + `posix.html#246 <posix.html#246>`_ + + `EINVAL`:idx: + `posix.html#247 <posix.html#247>`_ + + `EInvalidField`:idx: + `system.html#149 <system.html#149>`_ + + `EInvalidIndex`:idx: + `system.html#148 <system.html#148>`_ + + `EInvalidObjectAssignment`:idx: + `system.html#153 <system.html#153>`_ + + `EInvalidObjectConversion`:idx: + `system.html#154 <system.html#154>`_ + + `EInvalidRegEx`:idx: + `regexprs.html#104 <regexprs.html#104>`_ + + `EInvalidValue`:idx: + `system.html#146 <system.html#146>`_ + + `EIO`:idx: + * `posix.html#248 <posix.html#248>`_ + * `system.html#137 <system.html#137>`_ + + `EISCONN`:idx: + `posix.html#249 <posix.html#249>`_ + + `EISDIR`:idx: + `posix.html#250 <posix.html#250>`_ + + `ELOOP`:idx: + `posix.html#251 <posix.html#251>`_ + + `Embedded Nimrod Debugger`:idx: + `endb.html#101 <endb.html#101>`_ + + `EMFILE`:idx: + `posix.html#252 <posix.html#252>`_ + + `EMLINK`:idx: + `posix.html#253 <posix.html#253>`_ + + `EMSGSIZE`:idx: + `posix.html#254 <posix.html#254>`_ + + `EMULTIHOP`:idx: + `posix.html#255 <posix.html#255>`_ + + `ENAMETOOLONG`:idx: + `posix.html#256 <posix.html#256>`_ + + `encrypt`:idx: + `posix.html#976 <posix.html#976>`_ + + `ENDB`:idx: + `endb.html#102 <endb.html#102>`_ + + `endgrent`:idx: + `posix.html#838 <posix.html#838>`_ + + `EndOfFile`:idx: + * `system.html#489 <system.html#489>`_ + * `lexbase.html#101 <lexbase.html#101>`_ + + `endpwent`:idx: + `posix.html#863 <posix.html#863>`_ + + `endsWith`:idx: + `strutils.html#138 <strutils.html#138>`_ + + `ENETDOWN`:idx: + `posix.html#257 <posix.html#257>`_ + + `ENETRESET`:idx: + `posix.html#258 <posix.html#258>`_ + + `ENETUNREACH`:idx: + `posix.html#259 <posix.html#259>`_ + + `ENFILE`:idx: + `posix.html#260 <posix.html#260>`_ + + `ENOBUFS`:idx: + `posix.html#261 <posix.html#261>`_ + + `ENODATA`:idx: + `posix.html#262 <posix.html#262>`_ + + `ENODEV`:idx: + `posix.html#263 <posix.html#263>`_ + + `ENOENT`:idx: + `posix.html#264 <posix.html#264>`_ + + `ENoExceptionToReraise`:idx: + * `manual.html#184 <manual.html#184>`_ + * `system.html#152 <system.html#152>`_ + + `ENOEXEC`:idx: + `posix.html#265 <posix.html#265>`_ + + `ENOLCK`:idx: + `posix.html#266 <posix.html#266>`_ + + `ENOLINK`:idx: + `posix.html#267 <posix.html#267>`_ + + `ENOMEM`:idx: + `posix.html#268 <posix.html#268>`_ + + `ENOMSG`:idx: + `posix.html#269 <posix.html#269>`_ + + `ENOPROTOOPT`:idx: + `posix.html#270 <posix.html#270>`_ + + `ENOSPC`:idx: + `posix.html#271 <posix.html#271>`_ + + `ENOSR`:idx: + `posix.html#272 <posix.html#272>`_ + + `ENOSTR`:idx: + `posix.html#273 <posix.html#273>`_ + + `ENOSYS`:idx: + `posix.html#274 <posix.html#274>`_ + + `ENOTCONN`:idx: + `posix.html#275 <posix.html#275>`_ + + `ENOTDIR`:idx: + `posix.html#276 <posix.html#276>`_ + + `ENOTEMPTY`:idx: + `posix.html#277 <posix.html#277>`_ + + `ENOTSOCK`:idx: + `posix.html#278 <posix.html#278>`_ + + `ENOTSUP`:idx: + `posix.html#279 <posix.html#279>`_ + + `ENOTTY`:idx: + `posix.html#280 <posix.html#280>`_ + + `Enumeration`:idx: + `manual.html#148 <manual.html#148>`_ + + `enumeration`:idx: + `tut1.html#113 <tut1.html#113>`_ + + `ENXIO`:idx: + `posix.html#281 <posix.html#281>`_ + + `EOPNOTSUPP`:idx: + `posix.html#282 <posix.html#282>`_ + + `EOS`:idx: + `system.html#138 <system.html#138>`_ + + `EOutOfMemory`:idx: + `system.html#147 <system.html#147>`_ + + `EOutOfRange`:idx: + * `manual.html#145 <manual.html#145>`_ + * `tut1.html#112 <tut1.html#112>`_ + * `system.html#150 <system.html#150>`_ + + `EOVERFLOW`:idx: + `posix.html#283 <posix.html#283>`_ + + `EOverflow`:idx: + `system.html#142 <system.html#142>`_ + + `EPERM`:idx: + `posix.html#284 <posix.html#284>`_ + + `EPIPE`:idx: + `posix.html#285 <posix.html#285>`_ + + `EPROTO`:idx: + `posix.html#286 <posix.html#286>`_ + + `EPROTONOSUPPORT`:idx: + `posix.html#287 <posix.html#287>`_ + + `EPROTOTYPE`:idx: + `posix.html#288 <posix.html#288>`_ + + `equalMem`:idx: + `system.html#412 <system.html#412>`_ + + `ERA`:idx: + `posix.html#434 <posix.html#434>`_ + + `ERA_D_FMT`:idx: + `posix.html#435 <posix.html#435>`_ + + `ERA_D_T_FMT`:idx: + `posix.html#436 <posix.html#436>`_ + + `ERANGE`:idx: + `posix.html#289 <posix.html#289>`_ + + `ERA_T_FMT`:idx: + `posix.html#437 <posix.html#437>`_ + + `ERessourceExhausted`:idx: + `system.html#139 <system.html#139>`_ + + `EROFS`:idx: + `posix.html#290 <posix.html#290>`_ + + `errno`:idx: + `posix.html#219 <posix.html#219>`_ + + `error`:idx: + * `dialogs.html#104 <dialogs.html#104>`_ + * `manual.html#221 <manual.html#221>`_ + * `manual.html#224 <manual.html#224>`_ + + `errorStr`:idx: + `parsecfg.html#110 <parsecfg.html#110>`_ + + `escape`:idx: + * `manual.html#133 <manual.html#133>`_ + * `strutils.html#143 <strutils.html#143>`_ + + `escape sequences`:idx: + `manual.html#120 <manual.html#120>`_ + + `ESPIPE`:idx: + `posix.html#291 <posix.html#291>`_ + + `ESRCH`:idx: + `posix.html#292 <posix.html#292>`_ + + `EStackOverflow`:idx: + `system.html#151 <system.html#151>`_ + + `ESTALE`:idx: + `posix.html#293 <posix.html#293>`_ + + `ESynch`:idx: + `system.html#135 <system.html#135>`_ + + `ESystem`:idx: + `system.html#136 <system.html#136>`_ + + `ETIME`:idx: + `posix.html#294 <posix.html#294>`_ + + `ETIMEDOUT`:idx: + `posix.html#295 <posix.html#295>`_ + + `ETXTBSY`:idx: + `posix.html#296 <posix.html#296>`_ + + `EWOULDBLOCK`:idx: + `posix.html#297 <posix.html#297>`_ + + `except`:idx: + `manual.html#187 <manual.html#187>`_ + + `exception handlers`:idx: + `manual.html#186 <manual.html#186>`_ + + `exceptions`:idx: + `tut2.html#107 <tut2.html#107>`_ + + `excl`:idx: + `system.html#168 <system.html#168>`_ + + `EXDEV`:idx: + `posix.html#298 <posix.html#298>`_ + + `execl`:idx: + `posix.html#977 <posix.html#977>`_ + + `execle`:idx: + `posix.html#978 <posix.html#978>`_ + + `execlp`:idx: + `posix.html#979 <posix.html#979>`_ + + `executeShellCommand`:idx: + `os.html#133 <os.html#133>`_ + + `execv`:idx: + `posix.html#980 <posix.html#980>`_ + + `execve`:idx: + `posix.html#981 <posix.html#981>`_ + + `execvp`:idx: + `posix.html#982 <posix.html#982>`_ + + `ExeExt`:idx: + `os.html#107 <os.html#107>`_ + + `existsDir`:idx: + `os.html#139 <os.html#139>`_ + + `existsEnv`:idx: + `os.html#144 <os.html#144>`_ + + `ExistsFile`:idx: + `os.html#117 <os.html#117>`_ + + `exp`:idx: + `math.html#114 <math.html#114>`_ + + `expandFilename`:idx: + `os.html#116 <os.html#116>`_ + + `exportc`:idx: + `nimrodc.html#102 <nimrodc.html#102>`_ + + `expression macros`:idx: + `tut2.html#113 <tut2.html#113>`_ + + `extractDir`:idx: + `os.html#126 <os.html#126>`_ + + `extractFileExt`:idx: + `os.html#128 <os.html#128>`_ + + `extractFilename`:idx: + `os.html#127 <os.html#127>`_ + + `extractFileTrunk`:idx: + `os.html#129 <os.html#129>`_ + + `ExtSep`:idx: + `os.html#109 <os.html#109>`_ + + `fastcall`:idx: + `manual.html#168 <manual.html#168>`_ + + `fatal`:idx: + `manual.html#225 <manual.html#225>`_ + + `fchdir`:idx: + `posix.html#984 <posix.html#984>`_ + + `fchmod`:idx: + `posix.html#1059 <posix.html#1059>`_ + + `fchown`:idx: + `posix.html#983 <posix.html#983>`_ + + `fcntl`:idx: + `posix.html#812 <posix.html#812>`_ + + `fdatasync`:idx: + `posix.html#985 <posix.html#985>`_ + + `FD_CLOEXEC`:idx: + `posix.html#309 <posix.html#309>`_ + + `FD_CLR`:idx: + `posix.html#1161 <posix.html#1161>`_ + + `FD_ISSET`:idx: + `posix.html#1162 <posix.html#1162>`_ + + `FD_SET`:idx: + `posix.html#1163 <posix.html#1163>`_ + + `FD_SETSIZE`:idx: + `posix.html#774 <posix.html#774>`_ + + `F_DUPFD`:idx: + `posix.html#299 <posix.html#299>`_ + + `FD_ZERO`:idx: + `posix.html#1164 <posix.html#1164>`_ + + `FE_ALL_EXCEPT`:idx: + `posix.html#337 <posix.html#337>`_ + + `feclearexcept`:idx: + `posix.html#816 <posix.html#816>`_ + + `FE_DFL_ENV`:idx: + `posix.html#342 <posix.html#342>`_ + + `FE_DIVBYZERO`:idx: + `posix.html#332 <posix.html#332>`_ + + `FE_DOWNWARD`:idx: + `posix.html#338 <posix.html#338>`_ + + `fegetenv`:idx: + `posix.html#823 <posix.html#823>`_ + + `fegetexceptflag`:idx: + `posix.html#817 <posix.html#817>`_ + + `fegetround`:idx: + `posix.html#821 <posix.html#821>`_ + + `feholdexcept`:idx: + `posix.html#824 <posix.html#824>`_ + + `FE_INEXACT`:idx: + `posix.html#333 <posix.html#333>`_ + + `FE_INVALID`:idx: + `posix.html#334 <posix.html#334>`_ + + `FE_OVERFLOW`:idx: + `posix.html#335 <posix.html#335>`_ + + `feraiseexcept`:idx: + `posix.html#818 <posix.html#818>`_ + + `fesetenv`:idx: + `posix.html#825 <posix.html#825>`_ + + `fesetexceptflag`:idx: + `posix.html#819 <posix.html#819>`_ + + `fesetround`:idx: + `posix.html#822 <posix.html#822>`_ + + `fetestexcept`:idx: + `posix.html#820 <posix.html#820>`_ + + `FE_TONEAREST`:idx: + `posix.html#339 <posix.html#339>`_ + + `FE_TOWARDZERO`:idx: + `posix.html#340 <posix.html#340>`_ + + `FE_UNDERFLOW`:idx: + `posix.html#336 <posix.html#336>`_ + + `feupdateenv`:idx: + `posix.html#826 <posix.html#826>`_ + + `FE_UPWARD`:idx: + `posix.html#341 <posix.html#341>`_ + + `F_GETFD`:idx: + `posix.html#300 <posix.html#300>`_ + + `F_GETFL`:idx: + `posix.html#302 <posix.html#302>`_ + + `F_GETLK`:idx: + `posix.html#304 <posix.html#304>`_ + + `F_GETOWN`:idx: + `posix.html#307 <posix.html#307>`_ + + `fileHandle`:idx: + `system.html#513 <system.html#513>`_ + + `fileNewer`:idx: + `os.html#141 <os.html#141>`_ + + `FileSystemCaseSensitive`:idx: + `os.html#106 <os.html#106>`_ + + `finally`:idx: + `manual.html#188 <manual.html#188>`_ + + `find`:idx: + * `system.html#459 <system.html#459>`_ + * `regexprs.html#109 <regexprs.html#109>`_ + * `regexprs.html#110 <regexprs.html#110>`_ + + `findChars`:idx: + `strutils.html#114 <strutils.html#114>`_ + + `findSubStr`:idx: + * `strutils.html#112 <strutils.html#112>`_ + * `strutils.html#113 <strutils.html#113>`_ + + `float`:idx: + `system.html#106 <system.html#106>`_ + + `float32`:idx: + `system.html#107 <system.html#107>`_ + + `float64`:idx: + `system.html#108 <system.html#108>`_ + + `F_LOCK`:idx: + `posix.html#496 <posix.html#496>`_ + + `FlushFile`:idx: + `system.html#491 <system.html#491>`_ + + `fmtmsg`:idx: + `posix.html#827 <posix.html#827>`_ + + `fnmatch`:idx: + `posix.html#828 <posix.html#828>`_ + + `FNM_NOESCAPE`:idx: + `posix.html#365 <posix.html#365>`_ + + `FNM_NOMATCH`:idx: + `posix.html#362 <posix.html#362>`_ + + `FNM_NOSYS`:idx: + `posix.html#366 <posix.html#366>`_ + + `FNM_PATHNAME`:idx: + `posix.html#363 <posix.html#363>`_ + + `FNM_PERIOD`:idx: + `posix.html#364 <posix.html#364>`_ + + `F_OK`:idx: + `posix.html#478 <posix.html#478>`_ + + `for`:idx: + * `manual.html#203 <manual.html#203>`_ + * `tut1.html#105 <tut1.html#105>`_ + + `fork`:idx: + `posix.html#986 <posix.html#986>`_ + + `form feed`:idx: + `manual.html#124 <manual.html#124>`_ + + `forward`:idx: + `manual.html#200 <manual.html#200>`_ + + `fpathconf`:idx: + `posix.html#987 <posix.html#987>`_ + + `F_RDLCK`:idx: + `posix.html#310 <posix.html#310>`_ + + `frexp`:idx: + `math.html#115 <math.html#115>`_ + + `F_SETFD`:idx: + `posix.html#301 <posix.html#301>`_ + + `F_SETFL`:idx: + `posix.html#303 <posix.html#303>`_ + + `F_SETLK`:idx: + `posix.html#305 <posix.html#305>`_ + + `F_SETLKW`:idx: + `posix.html#306 <posix.html#306>`_ + + `F_SETOWN`:idx: + `posix.html#308 <posix.html#308>`_ + + `fstat`:idx: + `posix.html#1060 <posix.html#1060>`_ + + `fstatvfs`:idx: + `posix.html#1057 <posix.html#1057>`_ + + `fsync`:idx: + `posix.html#988 <posix.html#988>`_ + + `F_TEST`:idx: + `posix.html#497 <posix.html#497>`_ + + `F_TLOCK`:idx: + `posix.html#498 <posix.html#498>`_ + + `ftok`:idx: + `posix.html#1055 <posix.html#1055>`_ + + `ftruncate`:idx: + `posix.html#989 <posix.html#989>`_ + + `ftw`:idx: + `posix.html#829 <posix.html#829>`_ + + `FTW_CHDIR`:idx: + `posix.html#377 <posix.html#377>`_ + + `FTW_D`:idx: + `posix.html#368 <posix.html#368>`_ + + `FTW_DEPTH`:idx: + `posix.html#376 <posix.html#376>`_ + + `FTW_DNR`:idx: + `posix.html#369 <posix.html#369>`_ + + `FTW_DP`:idx: + `posix.html#370 <posix.html#370>`_ + + `FTW_F`:idx: + `posix.html#367 <posix.html#367>`_ + + `FTW_MOUNT`:idx: + `posix.html#375 <posix.html#375>`_ + + `FTW_NS`:idx: + `posix.html#371 <posix.html#371>`_ + + `FTW_PHYS`:idx: + `posix.html#374 <posix.html#374>`_ + + `FTW_SL`:idx: + `posix.html#372 <posix.html#372>`_ + + `FTW_SLN`:idx: + `posix.html#373 <posix.html#373>`_ + + `F_ULOCK`:idx: + `posix.html#499 <posix.html#499>`_ + + `functional`:idx: + * `manual.html#162 <manual.html#162>`_ + * `tut1.html#124 <tut1.html#124>`_ + + `F_UNLCK`:idx: + `posix.html#311 <posix.html#311>`_ + + `funtions`:idx: + `manual.html#198 <manual.html#198>`_ + + `F_WRLCK`:idx: + `posix.html#312 <posix.html#312>`_ + + `GC_disable`:idx: + `system.html#460 <system.html#460>`_ + + `GC_disableMarkAndSweep`:idx: + `system.html#466 <system.html#466>`_ + + `GC_enable`:idx: + `system.html#461 <system.html#461>`_ + + `GC_enableMarkAndSweep`:idx: + `system.html#465 <system.html#465>`_ + + `GC_fullCollect`:idx: + `system.html#462 <system.html#462>`_ + + `GC_getStatistics`:idx: + `system.html#467 <system.html#467>`_ + + `GC_ref`:idx: + * `system.html#468 <system.html#468>`_ + * `system.html#469 <system.html#469>`_ + * `system.html#470 <system.html#470>`_ + + `GC_setStrategy`:idx: + `system.html#464 <system.html#464>`_ + + `GC_unref`:idx: + * `system.html#471 <system.html#471>`_ + * `system.html#472 <system.html#472>`_ + * `system.html#473 <system.html#473>`_ + + `generic character types`:idx: + `regexprs.html#102 <regexprs.html#102>`_ + + `Generics`:idx: + * `manual.html#207 <manual.html#207>`_ + * `tut2.html#109 <tut2.html#109>`_ + + `getApplicationDir`:idx: + `os.html#110 <os.html#110>`_ + + `getApplicationFilename`:idx: + `os.html#111 <os.html#111>`_ + + `getClockStr`:idx: + `times.html#112 <times.html#112>`_ + + `getColNumber`:idx: + `lexbase.html#107 <lexbase.html#107>`_ + + `getColumn`:idx: + `parsecfg.html#107 <parsecfg.html#107>`_ + + `getConfigDir`:idx: + `os.html#115 <os.html#115>`_ + + `getcontext`:idx: + `posix.html#1188 <posix.html#1188>`_ + + `get_crc_table`:idx: + `zlib.html#186 <zlib.html#186>`_ + + `getCurrentDir`:idx: + `os.html#112 <os.html#112>`_ + + `getCurrentExceptionMsg`:idx: + `system.html#431 <system.html#431>`_ + + `getCurrentLine`:idx: + `lexbase.html#106 <lexbase.html#106>`_ + + `getcwd`:idx: + `posix.html#990 <posix.html#990>`_ + + `getdate`:idx: + `posix.html#1103 <posix.html#1103>`_ + + `getDateStr`:idx: + `times.html#111 <times.html#111>`_ + + `getegid`:idx: + `posix.html#991 <posix.html#991>`_ + + `getEnv`:idx: + `os.html#143 <os.html#143>`_ + + `geteuid`:idx: + `posix.html#992 <posix.html#992>`_ + + `getFilename`:idx: + `parsecfg.html#109 <parsecfg.html#109>`_ + + `getFilePos`:idx: + `system.html#511 <system.html#511>`_ + + `getFileSize`:idx: + `system.html#503 <system.html#503>`_ + + `getFreeMem`:idx: + `system.html#437 <system.html#437>`_ + + `getgid`:idx: + `posix.html#993 <posix.html#993>`_ + + `getGMTime`:idx: + `times.html#107 <times.html#107>`_ + + `getgrent`:idx: + `posix.html#837 <posix.html#837>`_ + + `getgrgid`:idx: + `posix.html#833 <posix.html#833>`_ + + `getgrgid_r`:idx: + `posix.html#835 <posix.html#835>`_ + + `getgrnam`:idx: + `posix.html#834 <posix.html#834>`_ + + `getgrnam_r`:idx: + `posix.html#836 <posix.html#836>`_ + + `getgroups`:idx: + `posix.html#994 <posix.html#994>`_ + + `getHomeDir`:idx: + `os.html#114 <os.html#114>`_ + + `gethostid`:idx: + `posix.html#995 <posix.html#995>`_ + + `gethostname`:idx: + `posix.html#996 <posix.html#996>`_ + + `getLastModificationTime`:idx: + `os.html#140 <os.html#140>`_ + + `getLine`:idx: + `parsecfg.html#108 <parsecfg.html#108>`_ + + `getLocalTime`:idx: + `times.html#106 <times.html#106>`_ + + `getlogin`:idx: + `posix.html#997 <posix.html#997>`_ + + `getlogin_r`:idx: + `posix.html#998 <posix.html#998>`_ + + `getOccupiedMem`:idx: + `system.html#436 <system.html#436>`_ + + `getopt`:idx: + * `posix.html#999 <posix.html#999>`_ + * `parseopt.html#106 <parseopt.html#106>`_ + + `getpgid`:idx: + `posix.html#1000 <posix.html#1000>`_ + + `getpgrp`:idx: + `posix.html#1001 <posix.html#1001>`_ + + `getpid`:idx: + `posix.html#1002 <posix.html#1002>`_ + + `getppid`:idx: + `posix.html#1003 <posix.html#1003>`_ + + `getpwent`:idx: + `posix.html#864 <posix.html#864>`_ + + `getpwnam`:idx: + `posix.html#859 <posix.html#859>`_ + + `getpwnam_r`:idx: + `posix.html#861 <posix.html#861>`_ + + `getpwuid`:idx: + `posix.html#860 <posix.html#860>`_ + + `getpwuid_r`:idx: + `posix.html#862 <posix.html#862>`_ + + `getRefcount`:idx: + `system.html#430 <system.html#430>`_ + + `getRestOfCommandLine`:idx: + `parseopt.html#105 <parseopt.html#105>`_ + + `getsid`:idx: + `posix.html#1004 <posix.html#1004>`_ + + `getStartMilsecs`:idx: + `times.html#116 <times.html#116>`_ + + `getStream`:idx: + `zipfiles.html#109 <zipfiles.html#109>`_ + + `getTime`:idx: + `times.html#105 <times.html#105>`_ + + `getTotalMem`:idx: + `system.html#438 <system.html#438>`_ + + `getuid`:idx: + `posix.html#1005 <posix.html#1005>`_ + + `getwd`:idx: + `posix.html#1006 <posix.html#1006>`_ + + `glob`:idx: + `posix.html#831 <posix.html#831>`_ + + `GLOB_ABORTED`:idx: + `posix.html#385 <posix.html#385>`_ + + `GLOB_APPEND`:idx: + `posix.html#378 <posix.html#378>`_ + + `GLOB_DOOFFS`:idx: + `posix.html#379 <posix.html#379>`_ + + `GLOB_ERR`:idx: + `posix.html#380 <posix.html#380>`_ + + `globfree`:idx: + `posix.html#832 <posix.html#832>`_ + + `GLOB_MARK`:idx: + `posix.html#381 <posix.html#381>`_ + + `GLOB_NOCHECK`:idx: + `posix.html#382 <posix.html#382>`_ + + `GLOB_NOESCAPE`:idx: + `posix.html#383 <posix.html#383>`_ + + `GLOB_NOMATCH`:idx: + `posix.html#386 <posix.html#386>`_ + + `GLOB_NOSORT`:idx: + `posix.html#384 <posix.html#384>`_ + + `GLOB_NOSPACE`:idx: + `posix.html#387 <posix.html#387>`_ + + `GLOB_NOSYS`:idx: + `posix.html#388 <posix.html#388>`_ + + `gmtime`:idx: + `posix.html#1104 <posix.html#1104>`_ + + `gmtime_r`:idx: + `posix.html#1105 <posix.html#1105>`_ + + `gzclose`:idx: + `zlib.html#172 <zlib.html#172>`_ + + `gzdopen`:idx: + `zlib.html#158 <zlib.html#158>`_ + + `gzeof`:idx: + `zlib.html#171 <zlib.html#171>`_ + + `gzerror`:idx: + `zlib.html#173 <zlib.html#173>`_ + + `gzFile`:idx: + `zlib.html#115 <zlib.html#115>`_ + + `gzflush`:idx: + `zlib.html#167 <zlib.html#167>`_ + + `gzgetc`:idx: + `zlib.html#166 <zlib.html#166>`_ + + `gzgets`:idx: + `zlib.html#164 <zlib.html#164>`_ + + `gzopen`:idx: + `zlib.html#157 <zlib.html#157>`_ + + `gzprintf`:idx: + `zlib.html#162 <zlib.html#162>`_ + + `gzputc`:idx: + `zlib.html#165 <zlib.html#165>`_ + + `gzputs`:idx: + `zlib.html#163 <zlib.html#163>`_ + + `gzread`:idx: + `zlib.html#160 <zlib.html#160>`_ + + `gzrewind`:idx: + `zlib.html#169 <zlib.html#169>`_ + + `gzseek`:idx: + `zlib.html#168 <zlib.html#168>`_ + + `gzsetparams`:idx: + `zlib.html#159 <zlib.html#159>`_ + + `gztell`:idx: + `zlib.html#170 <zlib.html#170>`_ + + `gzwrite`:idx: + `zlib.html#161 <zlib.html#161>`_ + + `HandleCR`:idx: + `lexbase.html#108 <lexbase.html#108>`_ + + `HandleLF`:idx: + `lexbase.html#109 <lexbase.html#109>`_ + + `hash`:idx: + * `hashes.html#103 <hashes.html#103>`_ + * `hashes.html#104 <hashes.html#104>`_ + * `hashes.html#105 <hashes.html#105>`_ + * `hashes.html#106 <hashes.html#106>`_ + * `hashes.html#107 <hashes.html#107>`_ + + `hashData`:idx: + `hashes.html#102 <hashes.html#102>`_ + + `hashIgnoreCase`:idx: + `hashes.html#109 <hashes.html#109>`_ + + `hashIgnoreStyle`:idx: + `hashes.html#108 <hashes.html#108>`_ + + `hasKey`:idx: + `strtabs.html#108 <strtabs.html#108>`_ + + `header`:idx: + `nimrodc.html#105 <nimrodc.html#105>`_ + + `high`:idx: + `system.html#121 <system.html#121>`_ + + `hint`:idx: + * `manual.html#219 <manual.html#219>`_ + * `manual.html#227 <manual.html#227>`_ + + `hostCPU`:idx: + `system.html#399 <system.html#399>`_ + + `hostOS`:idx: + `system.html#398 <system.html#398>`_ + + `htonl`:idx: + `posix.html#792 <posix.html#792>`_ + + `htons`:idx: + `posix.html#793 <posix.html#793>`_ + + `hypot`:idx: + `math.html#123 <math.html#123>`_ + + `iconv`:idx: + `posix.html#841 <posix.html#841>`_ + + `iconv_close`:idx: + `posix.html#842 <posix.html#842>`_ + + `iconv_open`:idx: + `posix.html#840 <posix.html#840>`_ + + `identifier`:idx: + `manual.html#105 <manual.html#105>`_ + + `Identifiers`:idx: + `manual.html#116 <manual.html#116>`_ + + `if`:idx: + `manual.html#180 <manual.html#180>`_ + + `implicit block`:idx: + `manual.html#205 <manual.html#205>`_ + + `import`:idx: + * `manual.html#215 <manual.html#215>`_ + * `tut1.html#128 <tut1.html#128>`_ + + `importc`:idx: + `nimrodc.html#101 <nimrodc.html#101>`_ + + `in`:idx: + `system.html#355 <system.html#355>`_ + + `inc`:idx: + `system.html#159 <system.html#159>`_ + + `incl`:idx: + `system.html#167 <system.html#167>`_ + + `include`:idx: + `tut1.html#129 <tut1.html#129>`_ + + `indentation sensitive`:idx: + `manual.html#113 <manual.html#113>`_ + + `inet_addr`:idx: + `posix.html#796 <posix.html#796>`_ + + `inet_ntoa`:idx: + `posix.html#797 <posix.html#797>`_ + + `inet_ntop`:idx: + `posix.html#798 <posix.html#798>`_ + + `inet_pton`:idx: + `posix.html#799 <posix.html#799>`_ + + `inf`:idx: + `system.html#432 <system.html#432>`_ + + `inflate`:idx: + `zlib.html#145 <zlib.html#145>`_ + + `inflateEnd`:idx: + `zlib.html#146 <zlib.html#146>`_ + + `inflateInit`:idx: + `zlib.html#179 <zlib.html#179>`_ + + `inflateInit2`:idx: + `zlib.html#183 <zlib.html#183>`_ + + `inflateInit2u`:idx: + `zlib.html#181 <zlib.html#181>`_ + + `inflateInitu`:idx: + `zlib.html#177 <zlib.html#177>`_ + + `inflateReset`:idx: + `zlib.html#153 <zlib.html#153>`_ + + `inflateSetDictionary`:idx: + `zlib.html#151 <zlib.html#151>`_ + + `inflateSync`:idx: + `zlib.html#152 <zlib.html#152>`_ + + `inflateSyncPoint`:idx: + `zlib.html#185 <zlib.html#185>`_ + + `info`:idx: + `dialogs.html#102 <dialogs.html#102>`_ + + `information hiding`:idx: + * `manual.html#213 <manual.html#213>`_ + * `tut1.html#126 <tut1.html#126>`_ + + `init`:idx: + `parseopt.html#103 <parseopt.html#103>`_ + + `inline`:idx: + `manual.html#167 <manual.html#167>`_ + + `int`:idx: + `system.html#101 <system.html#101>`_ + + `int16`:idx: + `system.html#103 <system.html#103>`_ + + `int32`:idx: + `system.html#104 <system.html#104>`_ + + `int64`:idx: + `system.html#105 <system.html#105>`_ + + `int8`:idx: + `system.html#102 <system.html#102>`_ + + `intToStr`:idx: + `strutils.html#129 <strutils.html#129>`_ + + `IPC_CREAT`:idx: + `posix.html#642 <posix.html#642>`_ + + `IPC_EXCL`:idx: + `posix.html#643 <posix.html#643>`_ + + `IPC_NOWAIT`:idx: + `posix.html#644 <posix.html#644>`_ + + `IPC_PRIVATE`:idx: + `posix.html#645 <posix.html#645>`_ + + `IPC_RMID`:idx: + `posix.html#646 <posix.html#646>`_ + + `IPC_SET`:idx: + `posix.html#647 <posix.html#647>`_ + + `IPC_STAT`:idx: + `posix.html#648 <posix.html#648>`_ + + `is`:idx: + `system.html#357 <system.html#357>`_ + + `isatty`:idx: + `posix.html#1007 <posix.html#1007>`_ + + `isMainModule`:idx: + `system.html#390 <system.html#390>`_ + + `isNil`:idx: + * `system.html#447 <system.html#447>`_ + * `system.html#448 <system.html#448>`_ + * `system.html#449 <system.html#449>`_ + * `system.html#450 <system.html#450>`_ + * `system.html#451 <system.html#451>`_ + * `system.html#452 <system.html#452>`_ + + `is_not`:idx: + `system.html#358 <system.html#358>`_ + + `isPowerOfTwo`:idx: + `math.html#105 <math.html#105>`_ + + `items`:idx: + * `system.html#441 <system.html#441>`_ + * `system.html#442 <system.html#442>`_ + * `system.html#443 <system.html#443>`_ + * `system.html#444 <system.html#444>`_ + * `system.html#445 <system.html#445>`_ + * `system.html#446 <system.html#446>`_ + + `iterator`:idx: + `manual.html#204 <manual.html#204>`_ + + `iterOverEnvironment`:idx: + `os.html#150 <os.html#150>`_ + + `JavaScript`:idx: + `nimrodc.html#116 <nimrodc.html#116>`_ + + `JoinPath`:idx: + * `os.html#118 <os.html#118>`_ + * `os.html#120 <os.html#120>`_ + + `keywords`:idx: + `manual.html#117 <manual.html#117>`_ + + `kill`:idx: + `posix.html#1123 <posix.html#1123>`_ + + `killpg`:idx: + `posix.html#1124 <posix.html#1124>`_ + + `l-values`:idx: + `manual.html#107 <manual.html#107>`_ + + `lambda`:idx: + `tut2.html#106 <tut2.html#106>`_ + + `LC_ALL`:idx: + `posix.html#444 <posix.html#444>`_ + + `LC_COLLATE`:idx: + `posix.html#445 <posix.html#445>`_ + + `LC_CTYPE`:idx: + `posix.html#446 <posix.html#446>`_ + + `lchown`:idx: + `posix.html#1008 <posix.html#1008>`_ + + `LC_MESSAGES`:idx: + `posix.html#447 <posix.html#447>`_ + + `LC_MONETARY`:idx: + `posix.html#448 <posix.html#448>`_ + + `LC_NUMERIC`:idx: + `posix.html#449 <posix.html#449>`_ + + `LC_TIME`:idx: + `posix.html#450 <posix.html#450>`_ + + `len`:idx: + * `system.html#162 <system.html#162>`_ + * `system.html#163 <system.html#163>`_ + * `system.html#164 <system.html#164>`_ + * `system.html#165 <system.html#165>`_ + * `system.html#166 <system.html#166>`_ + * `strtabs.html#109 <strtabs.html#109>`_ + + `line feed`:idx: + `manual.html#123 <manual.html#123>`_ + + `line_dir`:idx: + `nimrodc.html#107 <nimrodc.html#107>`_ + + `lines`:idx: + `system.html#512 <system.html#512>`_ + + `line_trace`:idx: + `nimrodc.html#109 <nimrodc.html#109>`_ + + `link`:idx: + `posix.html#1009 <posix.html#1009>`_ + + `lio_listio`:idx: + `posix.html#791 <posix.html#791>`_ + + `LIO_NOP`:idx: + `posix.html#210 <posix.html#210>`_ + + `LIO_NOWAIT`:idx: + `posix.html#211 <posix.html#211>`_ + + `LIO_READ`:idx: + `posix.html#212 <posix.html#212>`_ + + `LIO_WAIT`:idx: + `posix.html#213 <posix.html#213>`_ + + `LIO_WRITE`:idx: + `posix.html#214 <posix.html#214>`_ + + `Literal strings`:idx: + `manual.html#119 <manual.html#119>`_ + + `ln`:idx: + `math.html#111 <math.html#111>`_ + + `local type inference`:idx: + `tut1.html#101 <tut1.html#101>`_ + + `localeconv`:idx: + `posix.html#846 <posix.html#846>`_ + + `localtime`:idx: + `posix.html#1106 <posix.html#1106>`_ + + `localtime_r`:idx: + `posix.html#1107 <posix.html#1107>`_ + + `locations`:idx: + `manual.html#101 <manual.html#101>`_ + + `lockf`:idx: + `posix.html#1010 <posix.html#1010>`_ + + `log10`:idx: + `math.html#112 <math.html#112>`_ + + `log2`:idx: + `math.html#113 <math.html#113>`_ + + `low`:idx: + `system.html#122 <system.html#122>`_ + + `lseek`:idx: + `posix.html#1011 <posix.html#1011>`_ + + `lstat`:idx: + `posix.html#1061 <posix.html#1061>`_ + + `Macros`:idx: + * `manual.html#210 <manual.html#210>`_ + * `tut2.html#111 <tut2.html#111>`_ + + `makecontext`:idx: + `posix.html#1189 <posix.html#1189>`_ + + `MAP_FAILED`:idx: + `posix.html#686 <posix.html#686>`_ + + `MAP_FIXED`:idx: + `posix.html#680 <posix.html#680>`_ + + `MAP_PRIVATE`:idx: + `posix.html#679 <posix.html#679>`_ + + `MAP_SHARED`:idx: + `posix.html#678 <posix.html#678>`_ + + `match`:idx: + * `regexprs.html#106 <regexprs.html#106>`_ + * `regexprs.html#107 <regexprs.html#107>`_ + + `matchLen`:idx: + `regexprs.html#108 <regexprs.html#108>`_ + + `math`:idx: + `nimrodc.html#118 <nimrodc.html#118>`_ + + `max`:idx: + * `system.html#271 <system.html#271>`_ + * `system.html#272 <system.html#272>`_ + * `system.html#273 <system.html#273>`_ + * `system.html#274 <system.html#274>`_ + * `system.html#275 <system.html#275>`_ + * `system.html#322 <system.html#322>`_ + + `MaxSubpatterns`:idx: + `regexprs.html#105 <regexprs.html#105>`_ + + `MCL_CURRENT`:idx: + `posix.html#684 <posix.html#684>`_ + + `MCL_FUTURE`:idx: + `posix.html#685 <posix.html#685>`_ + + `method call syntax`:idx: + `tut2.html#104 <tut2.html#104>`_ + + `methods`:idx: + `manual.html#197 <manual.html#197>`_ + + `min`:idx: + * `system.html#266 <system.html#266>`_ + * `system.html#267 <system.html#267>`_ + * `system.html#268 <system.html#268>`_ + * `system.html#269 <system.html#269>`_ + * `system.html#270 <system.html#270>`_ + * `system.html#321 <system.html#321>`_ + + `MINSIGSTKSZ`:idx: + `posix.html#766 <posix.html#766>`_ + + `mkdir`:idx: + `posix.html#1062 <posix.html#1062>`_ + + `mkfifo`:idx: + `posix.html#1063 <posix.html#1063>`_ + + `mknod`:idx: + `posix.html#1064 <posix.html#1064>`_ + + `mktime`:idx: + `posix.html#1108 <posix.html#1108>`_ + + `mlock`:idx: + `posix.html#1078 <posix.html#1078>`_ + + `mlockall`:idx: + `posix.html#1079 <posix.html#1079>`_ + + `mmap`:idx: + `posix.html#1080 <posix.html#1080>`_ + + `MM_APPL`:idx: + `posix.html#346 <posix.html#346>`_ + + `MM_CONSOLE`:idx: + `posix.html#357 <posix.html#357>`_ + + `MM_ERROR`:idx: + `posix.html#352 <posix.html#352>`_ + + `MM_FIRM`:idx: + `posix.html#345 <posix.html#345>`_ + + `MM_HALT`:idx: + `posix.html#351 <posix.html#351>`_ + + `MM_HARD`:idx: + `posix.html#343 <posix.html#343>`_ + + `MM_INFO`:idx: + `posix.html#354 <posix.html#354>`_ + + `MM_NOCON`:idx: + `posix.html#361 <posix.html#361>`_ + + `MM_NOMSG`:idx: + `posix.html#360 <posix.html#360>`_ + + `MM_NOSEV`:idx: + `posix.html#355 <posix.html#355>`_ + + `MM_NOTOK`:idx: + `posix.html#359 <posix.html#359>`_ + + `MM_NRECOV`:idx: + `posix.html#350 <posix.html#350>`_ + + `MM_NULLACT`:idx: + `posix.html#125 <posix.html#125>`_ + + `MM_NULLLBL`:idx: + `posix.html#121 <posix.html#121>`_ + + `MM_NULLMC`:idx: + `posix.html#123 <posix.html#123>`_ + + `MM_NULLSEV`:idx: + `posix.html#122 <posix.html#122>`_ + + `MM_NULLTAG`:idx: + `posix.html#126 <posix.html#126>`_ + + `MM_NULLTXT`:idx: + `posix.html#124 <posix.html#124>`_ + + `MM_OK`:idx: + `posix.html#358 <posix.html#358>`_ + + `MM_OPSYS`:idx: + `posix.html#348 <posix.html#348>`_ + + `MM_PRINT`:idx: + `posix.html#356 <posix.html#356>`_ + + `MM_RECOVER`:idx: + `posix.html#349 <posix.html#349>`_ + + `MM_SOFT`:idx: + `posix.html#344 <posix.html#344>`_ + + `MM_UTIL`:idx: + `posix.html#347 <posix.html#347>`_ + + `MM_WARNING`:idx: + `posix.html#353 <posix.html#353>`_ + + `mod`:idx: + * `system.html#216 <system.html#216>`_ + * `system.html#217 <system.html#217>`_ + * `system.html#218 <system.html#218>`_ + * `system.html#219 <system.html#219>`_ + * `system.html#220 <system.html#220>`_ + + `module`:idx: + * `manual.html#212 <manual.html#212>`_ + * `tut1.html#125 <tut1.html#125>`_ + + `MON_1`:idx: + `posix.html#410 <posix.html#410>`_ + + `MON_10`:idx: + `posix.html#419 <posix.html#419>`_ + + `MON_11`:idx: + `posix.html#420 <posix.html#420>`_ + + `MON_12`:idx: + `posix.html#421 <posix.html#421>`_ + + `MON_2`:idx: + `posix.html#411 <posix.html#411>`_ + + `MON_3`:idx: + `posix.html#412 <posix.html#412>`_ + + `MON_4`:idx: + `posix.html#413 <posix.html#413>`_ + + `MON_5`:idx: + `posix.html#414 <posix.html#414>`_ + + `MON_6`:idx: + `posix.html#415 <posix.html#415>`_ + + `MON_7`:idx: + `posix.html#416 <posix.html#416>`_ + + `MON_8`:idx: + `posix.html#417 <posix.html#417>`_ + + `MON_9`:idx: + `posix.html#418 <posix.html#418>`_ + + `moveFile`:idx: + `os.html#135 <os.html#135>`_ + + `moveMem`:idx: + `system.html#411 <system.html#411>`_ + + `mprotect`:idx: + `posix.html#1081 <posix.html#1081>`_ + + `mq_close`:idx: + `posix.html#849 <posix.html#849>`_ + + `mq_getattr`:idx: + `posix.html#850 <posix.html#850>`_ + + `mq_notify`:idx: + `posix.html#851 <posix.html#851>`_ + + `mq_open`:idx: + `posix.html#852 <posix.html#852>`_ + + `mq_receive`:idx: + `posix.html#853 <posix.html#853>`_ + + `mq_send`:idx: + `posix.html#854 <posix.html#854>`_ + + `mq_setattr`:idx: + `posix.html#855 <posix.html#855>`_ + + `mq_timedreceive`:idx: + `posix.html#856 <posix.html#856>`_ + + `mq_timedsend`:idx: + `posix.html#857 <posix.html#857>`_ + + `mq_unlink`:idx: + `posix.html#858 <posix.html#858>`_ + + `MS_ASYNC`:idx: + `posix.html#681 <posix.html#681>`_ + + `MS_INVALIDATE`:idx: + `posix.html#683 <posix.html#683>`_ + + `MS_SYNC`:idx: + `posix.html#682 <posix.html#682>`_ + + `msync`:idx: + `posix.html#1082 <posix.html#1082>`_ + + `munlock`:idx: + `posix.html#1083 <posix.html#1083>`_ + + `munlockall`:idx: + `posix.html#1084 <posix.html#1084>`_ + + `munmap`:idx: + `posix.html#1085 <posix.html#1085>`_ + + `nan`:idx: + `system.html#434 <system.html#434>`_ + + `nanosleep`:idx: + `posix.html#1109 <posix.html#1109>`_ + + `Natural`:idx: + `system.html#129 <system.html#129>`_ + + `neginf`:idx: + `system.html#433 <system.html#433>`_ + + `new`:idx: + * `system.html#119 <system.html#119>`_ + * `system.html#120 <system.html#120>`_ + + `newFileStream`:idx: + * `streams.html#120 <streams.html#120>`_ + * `streams.html#121 <streams.html#121>`_ + + `newline`:idx: + `manual.html#121 <manual.html#121>`_ + + `NewLines`:idx: + `lexbase.html#102 <lexbase.html#102>`_ + + `newSeq`:idx: + `system.html#161 <system.html#161>`_ + + `newString`:idx: + `system.html#408 <system.html#408>`_ + + `newStringStream`:idx: + `streams.html#117 <streams.html#117>`_ + + `newStringTable`:idx: + * `strtabs.html#104 <strtabs.html#104>`_ + * `strtabs.html#105 <strtabs.html#105>`_ + + `next`:idx: + * `parseopt.html#104 <parseopt.html#104>`_ + * `parsecfg.html#106 <parsecfg.html#106>`_ + + `nextPowerOfTwo`:idx: + `math.html#106 <math.html#106>`_ + + `nftw`:idx: + `posix.html#830 <posix.html#830>`_ + + `nice`:idx: + `posix.html#1012 <posix.html#1012>`_ + + `nimcall`:idx: + `manual.html#169 <manual.html#169>`_ + + `NimrodMajor`:idx: + `system.html#394 <system.html#394>`_ + + `NimrodMinor`:idx: + `system.html#395 <system.html#395>`_ + + `NimrodPatch`:idx: + `system.html#396 <system.html#396>`_ + + `NimrodVersion`:idx: + `system.html#393 <system.html#393>`_ + + `nl`:idx: + `strutils.html#104 <strutils.html#104>`_ + + `NL_CAT_LOCALE`:idx: + `posix.html#769 <posix.html#769>`_ + + `nl_langinfo`:idx: + `posix.html#843 <posix.html#843>`_ + + `NL_SETD`:idx: + `posix.html#768 <posix.html#768>`_ + + `noconv`:idx: + `manual.html#172 <manual.html#172>`_ + + `no_decl`:idx: + `nimrodc.html#104 <nimrodc.html#104>`_ + + `NOEXPR`:idx: + `posix.html#442 <posix.html#442>`_ + + `normalize`:idx: + `strutils.html#111 <strutils.html#111>`_ + + `not`:idx: + * `system.html#115 <system.html#115>`_ + * `system.html#191 <system.html#191>`_ + * `system.html#192 <system.html#192>`_ + * `system.html#193 <system.html#193>`_ + * `system.html#194 <system.html#194>`_ + * `system.html#195 <system.html#195>`_ + + `not_in`:idx: + `system.html#356 <system.html#356>`_ + + `ntohl`:idx: + `posix.html#794 <posix.html#794>`_ + + `ntohs`:idx: + `posix.html#795 <posix.html#795>`_ + + `Numerical constants`:idx: + `manual.html#136 <manual.html#136>`_ + + `O_ACCMODE`:idx: + `posix.html#322 <posix.html#322>`_ + + `O_APPEND`:idx: + `posix.html#317 <posix.html#317>`_ + + `object`:idx: + `manual.html#155 <manual.html#155>`_ + + `O_CREAT`:idx: + `posix.html#313 <posix.html#313>`_ + + `ODBC_ADD_DSN`:idx: + `odbcsql.html#621 <odbcsql.html#621>`_ + + `ODBC_ADD_SYS_DSN`:idx: + `odbcsql.html#624 <odbcsql.html#624>`_ + + `ODBC_CONFIG_DSN`:idx: + `odbcsql.html#622 <odbcsql.html#622>`_ + + `ODBC_CONFIG_SYS_DSN`:idx: + `odbcsql.html#625 <odbcsql.html#625>`_ + + `ODBC_REMOVE_DSN`:idx: + `odbcsql.html#623 <odbcsql.html#623>`_ + + `ODBC_REMOVE_SYS_DSN`:idx: + `odbcsql.html#626 <odbcsql.html#626>`_ + + `O_DSYNC`:idx: + `posix.html#318 <posix.html#318>`_ + + `O_EXCL`:idx: + `posix.html#314 <posix.html#314>`_ + + `O_NOCTTY`:idx: + `posix.html#315 <posix.html#315>`_ + + `O_NONBLOCK`:idx: + `posix.html#319 <posix.html#319>`_ + + `open`:idx: + * `posix.html#813 <posix.html#813>`_ + * `lexbase.html#104 <lexbase.html#104>`_ + * `parsecfg.html#104 <parsecfg.html#104>`_ + * `zipfiles.html#102 <zipfiles.html#102>`_ + + `openarray`:idx: + * `tut1.html#118 <tut1.html#118>`_ + * `system.html#125 <system.html#125>`_ + + `opendir`:idx: + `posix.html#801 <posix.html#801>`_ + + `OpenFile`:idx: + * `system.html#486 <system.html#486>`_ + * `system.html#487 <system.html#487>`_ + + `operator`:idx: + `manual.html#138 <manual.html#138>`_ + + `Operators`:idx: + `manual.html#202 <manual.html#202>`_ + + `or`:idx: + * `system.html#117 <system.html#117>`_ + * `system.html#236 <system.html#236>`_ + * `system.html#237 <system.html#237>`_ + * `system.html#238 <system.html#238>`_ + * `system.html#239 <system.html#239>`_ + * `system.html#240 <system.html#240>`_ + + `ord`:idx: + `system.html#170 <system.html#170>`_ + + `ordinal`:idx: + `tut1.html#114 <tut1.html#114>`_ + + `Ordinal types`:idx: + `manual.html#141 <manual.html#141>`_ + + `O_RDONLY`:idx: + `posix.html#323 <posix.html#323>`_ + + `O_RDWR`:idx: + `posix.html#324 <posix.html#324>`_ + + `O_RSYNC`:idx: + `posix.html#320 <posix.html#320>`_ + + `OSError`:idx: + `os.html#147 <os.html#147>`_ + + `O_SYNC`:idx: + `posix.html#321 <posix.html#321>`_ + + `O_TRUNC`:idx: + `posix.html#316 <posix.html#316>`_ + + `O_WRONLY`:idx: + `posix.html#325 <posix.html#325>`_ + + `pairs`:idx: + `strtabs.html#110 <strtabs.html#110>`_ + + `P_ALL`:idx: + `posix.html#716 <posix.html#716>`_ + + `paramCount`:idx: + `os.html#145 <os.html#145>`_ + + `paramStr`:idx: + `os.html#146 <os.html#146>`_ + + `ParDir`:idx: + `os.html#102 <os.html#102>`_ + + `parentDir`:idx: + `os.html#122 <os.html#122>`_ + + `ParseBiggestInt`:idx: + `strutils.html#131 <strutils.html#131>`_ + + `parseCmdLine`:idx: + `os.html#154 <os.html#154>`_ + + `ParseFloat`:idx: + `strutils.html#132 <strutils.html#132>`_ + + `ParseInt`:idx: + `strutils.html#130 <strutils.html#130>`_ + + `pathconf`:idx: + `posix.html#1013 <posix.html#1013>`_ + + `PathSep`:idx: + `os.html#105 <os.html#105>`_ + + `pause`:idx: + `posix.html#1014 <posix.html#1014>`_ + + `pbyte`:idx: + `zlib.html#106 <zlib.html#106>`_ + + `pbytef`:idx: + `zlib.html#107 <zlib.html#107>`_ + + `PC_2_SYMLINKS`:idx: + `posix.html#500 <posix.html#500>`_ + + `PC_ALLOC_SIZE_MIN`:idx: + `posix.html#501 <posix.html#501>`_ + + `PC_ASYNC_IO`:idx: + `posix.html#502 <posix.html#502>`_ + + `PC_CHOWN_RESTRICTED`:idx: + `posix.html#503 <posix.html#503>`_ + + `PC_FILESIZEBITS`:idx: + `posix.html#504 <posix.html#504>`_ + + `PC_LINK_MAX`:idx: + `posix.html#505 <posix.html#505>`_ + + `PC_MAX_CANON`:idx: + `posix.html#506 <posix.html#506>`_ + + `PC_MAX_INPUT`:idx: + `posix.html#507 <posix.html#507>`_ + + `PC_NAME_MAX`:idx: + `posix.html#508 <posix.html#508>`_ + + `PC_NO_TRUNC`:idx: + `posix.html#509 <posix.html#509>`_ + + `PC_PATH_MAX`:idx: + `posix.html#510 <posix.html#510>`_ + + `PC_PIPE_BUF`:idx: + `posix.html#511 <posix.html#511>`_ + + `PC_PRIO_IO`:idx: + `posix.html#512 <posix.html#512>`_ + + `PC_REC_INCR_XFER_SIZE`:idx: + `posix.html#513 <posix.html#513>`_ + + `PC_REC_MIN_XFER_SIZE`:idx: + `posix.html#514 <posix.html#514>`_ + + `PC_REC_XFER_ALIGN`:idx: + `posix.html#515 <posix.html#515>`_ + + `PC_SYMLINK_MAX`:idx: + `posix.html#516 <posix.html#516>`_ + + `PC_SYNC_IO`:idx: + `posix.html#517 <posix.html#517>`_ + + `PC_VDISABLE`:idx: + `posix.html#518 <posix.html#518>`_ + + `PFileStream`:idx: + `streams.html#118 <streams.html#118>`_ + + `PFloat32`:idx: + `system.html#386 <system.html#386>`_ + + `PFloat64`:idx: + `system.html#387 <system.html#387>`_ + + `PI`:idx: + `math.html#101 <math.html#101>`_ + + `PInt32`:idx: + `system.html#389 <system.html#389>`_ + + `PInt64`:idx: + `system.html#388 <system.html#388>`_ + + `PInternalState`:idx: + `zlib.html#111 <zlib.html#111>`_ + + `pipe`:idx: + `posix.html#1015 <posix.html#1015>`_ + + `PM_STR`:idx: + `posix.html#395 <posix.html#395>`_ + + `PObject`:idx: + `system.html#132 <system.html#132>`_ + + `pointer`:idx: + `system.html#113 <system.html#113>`_ + + `pointers`:idx: + * `manual.html#158 <manual.html#158>`_ + * `tut1.html#120 <tut1.html#120>`_ + + `Positive`:idx: + `system.html#130 <system.html#130>`_ + + `POSIX_ASYNC_IO`:idx: + `posix.html#475 <posix.html#475>`_ + + `POSIX_FADV_DONTNEED`:idx: + `posix.html#330 <posix.html#330>`_ + + `posix_fadvise`:idx: + `posix.html#814 <posix.html#814>`_ + + `POSIX_FADV_NOREUSE`:idx: + `posix.html#331 <posix.html#331>`_ + + `POSIX_FADV_NORMAL`:idx: + `posix.html#326 <posix.html#326>`_ + + `POSIX_FADV_RANDOM`:idx: + `posix.html#328 <posix.html#328>`_ + + `POSIX_FADV_SEQUENTIAL`:idx: + `posix.html#327 <posix.html#327>`_ + + `POSIX_FADV_WILLNEED`:idx: + `posix.html#329 <posix.html#329>`_ + + `posix_fallocate`:idx: + `posix.html#815 <posix.html#815>`_ + + `POSIX_MADV_DONTNEED`:idx: + `posix.html#691 <posix.html#691>`_ + + `posix_madvise`:idx: + `posix.html#1086 <posix.html#1086>`_ + + `POSIX_MADV_NORMAL`:idx: + `posix.html#687 <posix.html#687>`_ + + `POSIX_MADV_RANDOM`:idx: + `posix.html#689 <posix.html#689>`_ + + `POSIX_MADV_SEQUENTIAL`:idx: + `posix.html#688 <posix.html#688>`_ + + `POSIX_MADV_WILLNEED`:idx: + `posix.html#690 <posix.html#690>`_ + + `posix_mem_offset`:idx: + `posix.html#1087 <posix.html#1087>`_ + + `POSIX_PRIO_IO`:idx: + `posix.html#476 <posix.html#476>`_ + + `posix_spawn`:idx: + `posix.html#1167 <posix.html#1167>`_ + + `posix_spawnattr_destroy`:idx: + `posix.html#1173 <posix.html#1173>`_ + + `posix_spawnattr_getflags`:idx: + `posix.html#1175 <posix.html#1175>`_ + + `posix_spawnattr_getpgroup`:idx: + `posix.html#1176 <posix.html#1176>`_ + + `posix_spawnattr_getschedparam`:idx: + `posix.html#1177 <posix.html#1177>`_ + + `posix_spawnattr_getschedpolicy`:idx: + `posix.html#1178 <posix.html#1178>`_ + + `posix_spawnattr_getsigdefault`:idx: + `posix.html#1174 <posix.html#1174>`_ + + `posix_spawnattr_getsigmask`:idx: + `posix.html#1179 <posix.html#1179>`_ + + `posix_spawnattr_init`:idx: + `posix.html#1180 <posix.html#1180>`_ + + `posix_spawnattr_setflags`:idx: + `posix.html#1182 <posix.html#1182>`_ + + `posix_spawnattr_setpgroup`:idx: + `posix.html#1183 <posix.html#1183>`_ + + `posix_spawnattr_setschedparam`:idx: + `posix.html#1184 <posix.html#1184>`_ + + `posix_spawnattr_setschedpolicy`:idx: + `posix.html#1185 <posix.html#1185>`_ + + `posix_spawnattr_setsigdefault`:idx: + `posix.html#1181 <posix.html#1181>`_ + + `posix_spawnattr_setsigmask`:idx: + `posix.html#1186 <posix.html#1186>`_ + + `posix_spawn_file_actions_addclose`:idx: + `posix.html#1168 <posix.html#1168>`_ + + `posix_spawn_file_actions_adddup2`:idx: + `posix.html#1169 <posix.html#1169>`_ + + `posix_spawn_file_actions_addopen`:idx: + `posix.html#1170 <posix.html#1170>`_ + + `posix_spawn_file_actions_destroy`:idx: + `posix.html#1171 <posix.html#1171>`_ + + `posix_spawn_file_actions_init`:idx: + `posix.html#1172 <posix.html#1172>`_ + + `posix_spawnp`:idx: + `posix.html#1187 <posix.html#1187>`_ + + `POSIX_SPAWN_RESETIDS`:idx: + `posix.html#778 <posix.html#778>`_ + + `POSIX_SPAWN_SETPGROUP`:idx: + `posix.html#779 <posix.html#779>`_ + + `POSIX_SPAWN_SETSCHEDPARAM`:idx: + `posix.html#780 <posix.html#780>`_ + + `POSIX_SPAWN_SETSCHEDULER`:idx: + `posix.html#781 <posix.html#781>`_ + + `POSIX_SPAWN_SETSIGDEF`:idx: + `posix.html#782 <posix.html#782>`_ + + `POSIX_SPAWN_SETSIGMASK`:idx: + `posix.html#783 <posix.html#783>`_ + + `POSIX_SYNC_IO`:idx: + `posix.html#477 <posix.html#477>`_ + + `POSIX_TYPED_MEM_ALLOCATE`:idx: + `posix.html#692 <posix.html#692>`_ + + `POSIX_TYPED_MEM_ALLOCATE_CONTIG`:idx: + `posix.html#693 <posix.html#693>`_ + + `posix_typed_mem_get_info`:idx: + `posix.html#1088 <posix.html#1088>`_ + + `POSIX_TYPED_MEM_MAP_ALLOCATABLE`:idx: + `posix.html#694 <posix.html#694>`_ + + `posix_typed_mem_open`:idx: + `posix.html#1089 <posix.html#1089>`_ + + `pow`:idx: + `math.html#127 <math.html#127>`_ + + `P_PGID`:idx: + `posix.html#718 <posix.html#718>`_ + + `P_PID`:idx: + `posix.html#717 <posix.html#717>`_ + + `pread`:idx: + `posix.html#1016 <posix.html#1016>`_ + + `pred`:idx: + `system.html#158 <system.html#158>`_ + + `procedural type`:idx: + * `manual.html#161 <manual.html#161>`_ + * `tut1.html#123 <tut1.html#123>`_ + + `procedures`:idx: + `manual.html#199 <manual.html#199>`_ + + `PROT_EXEC`:idx: + `posix.html#676 <posix.html#676>`_ + + `PROT_NONE`:idx: + `posix.html#677 <posix.html#677>`_ + + `PROT_READ`:idx: + `posix.html#674 <posix.html#674>`_ + + `PROT_WRITE`:idx: + `posix.html#675 <posix.html#675>`_ + + `pselect`:idx: + `posix.html#1165 <posix.html#1165>`_ + + `PSQLCHAR`:idx: + `odbcsql.html#116 <odbcsql.html#116>`_ + + `PSQL_DATE_STRUCT`:idx: + `odbcsql.html#232 <odbcsql.html#232>`_ + + `PSQLDOUBLE`:idx: + `odbcsql.html#122 <odbcsql.html#122>`_ + + `PSQLFLOAT`:idx: + `odbcsql.html#123 <odbcsql.html#123>`_ + + `PSQLHANDLE`:idx: + `odbcsql.html#124 <odbcsql.html#124>`_ + + `PSQLINTEGER`:idx: + `odbcsql.html#117 <odbcsql.html#117>`_ + + `PSQLREAL`:idx: + `odbcsql.html#121 <odbcsql.html#121>`_ + + `PSQLSMALLINT`:idx: + `odbcsql.html#119 <odbcsql.html#119>`_ + + `PSQL_TIMESTAMP_STRUCT`:idx: + `odbcsql.html#236 <odbcsql.html#236>`_ + + `PSQL_TIME_STRUCT`:idx: + `odbcsql.html#234 <odbcsql.html#234>`_ + + `PSQLUINTEGER`:idx: + `odbcsql.html#118 <odbcsql.html#118>`_ + + `PSQLUSMALLINT`:idx: + `odbcsql.html#120 <odbcsql.html#120>`_ + + `PStream`:idx: + `streams.html#101 <streams.html#101>`_ + + `PStringStream`:idx: + `streams.html#115 <streams.html#115>`_ + + `PStringTable`:idx: + `strtabs.html#103 <strtabs.html#103>`_ + + `pthread_atfork`:idx: + `posix.html#867 <posix.html#867>`_ + + `pthread_attr_destroy`:idx: + `posix.html#868 <posix.html#868>`_ + + `pthread_attr_getdetachstate`:idx: + `posix.html#869 <posix.html#869>`_ + + `pthread_attr_getguardsize`:idx: + `posix.html#870 <posix.html#870>`_ + + `pthread_attr_getinheritsched`:idx: + `posix.html#871 <posix.html#871>`_ + + `pthread_attr_getschedparam`:idx: + `posix.html#872 <posix.html#872>`_ + + `pthread_attr_getschedpolicy`:idx: + `posix.html#873 <posix.html#873>`_ + + `pthread_attr_getscope`:idx: + `posix.html#874 <posix.html#874>`_ + + `pthread_attr_getstack`:idx: + `posix.html#875 <posix.html#875>`_ + + `pthread_attr_getstackaddr`:idx: + `posix.html#876 <posix.html#876>`_ + + `pthread_attr_getstacksize`:idx: + `posix.html#877 <posix.html#877>`_ + + `pthread_attr_init`:idx: + `posix.html#878 <posix.html#878>`_ + + `pthread_attr_setdetachstate`:idx: + `posix.html#879 <posix.html#879>`_ + + `pthread_attr_setguardsize`:idx: + `posix.html#880 <posix.html#880>`_ + + `pthread_attr_setinheritsched`:idx: + `posix.html#881 <posix.html#881>`_ + + `pthread_attr_setschedparam`:idx: + `posix.html#882 <posix.html#882>`_ + + `pthread_attr_setschedpolicy`:idx: + `posix.html#883 <posix.html#883>`_ + + `pthread_attr_setscope`:idx: + `posix.html#884 <posix.html#884>`_ + + `pthread_attr_setstack`:idx: + `posix.html#885 <posix.html#885>`_ + + `pthread_attr_setstackaddr`:idx: + `posix.html#886 <posix.html#886>`_ + + `pthread_attr_setstacksize`:idx: + `posix.html#887 <posix.html#887>`_ + + `pthread_barrierattr_destroy`:idx: + `posix.html#891 <posix.html#891>`_ + + `pthread_barrierattr_getpshared`:idx: + `posix.html#892 <posix.html#892>`_ + + `pthread_barrierattr_init`:idx: + `posix.html#893 <posix.html#893>`_ + + `pthread_barrierattr_setpshared`:idx: + `posix.html#894 <posix.html#894>`_ + + `pthread_barrier_destroy`:idx: + `posix.html#888 <posix.html#888>`_ + + `pthread_barrier_init`:idx: + `posix.html#889 <posix.html#889>`_ + + `PTHREAD_BARRIER_SERIAL_THREAD`:idx: + `posix.html#451 <posix.html#451>`_ + + `pthread_barrier_wait`:idx: + `posix.html#890 <posix.html#890>`_ + + `pthread_cancel`:idx: + `posix.html#895 <posix.html#895>`_ + + `PTHREAD_CANCEL_ASYNCHRONOUS`:idx: + `posix.html#452 <posix.html#452>`_ + + `PTHREAD_CANCEL_DEFERRED`:idx: + `posix.html#454 <posix.html#454>`_ + + `PTHREAD_CANCEL_DISABLE`:idx: + `posix.html#455 <posix.html#455>`_ + + `PTHREAD_CANCELED`:idx: + `posix.html#456 <posix.html#456>`_ + + `PTHREAD_CANCEL_ENABLE`:idx: + `posix.html#453 <posix.html#453>`_ + + `pthread_cleanup_pop`:idx: + `posix.html#897 <posix.html#897>`_ + + `pthread_cleanup_push`:idx: + `posix.html#896 <posix.html#896>`_ + + `pthread_condattr_destroy`:idx: + `posix.html#904 <posix.html#904>`_ + + `pthread_condattr_getclock`:idx: + `posix.html#905 <posix.html#905>`_ + + `pthread_condattr_getpshared`:idx: + `posix.html#906 <posix.html#906>`_ + + `pthread_condattr_init`:idx: + `posix.html#907 <posix.html#907>`_ + + `pthread_condattr_setclock`:idx: + `posix.html#908 <posix.html#908>`_ + + `pthread_condattr_setpshared`:idx: + `posix.html#909 <posix.html#909>`_ + + `pthread_cond_broadcast`:idx: + `posix.html#898 <posix.html#898>`_ + + `pthread_cond_destroy`:idx: + `posix.html#899 <posix.html#899>`_ + + `pthread_cond_init`:idx: + `posix.html#900 <posix.html#900>`_ + + `PTHREAD_COND_INITIALIZER`:idx: + `posix.html#457 <posix.html#457>`_ + + `pthread_cond_signal`:idx: + `posix.html#901 <posix.html#901>`_ + + `pthread_cond_timedwait`:idx: + `posix.html#902 <posix.html#902>`_ + + `pthread_cond_wait`:idx: + `posix.html#903 <posix.html#903>`_ + + `pthread_create`:idx: + `posix.html#910 <posix.html#910>`_ + + `PTHREAD_CREATE_DETACHED`:idx: + `posix.html#458 <posix.html#458>`_ + + `PTHREAD_CREATE_JOINABLE`:idx: + `posix.html#459 <posix.html#459>`_ + + `pthread_detach`:idx: + `posix.html#911 <posix.html#911>`_ + + `pthread_equal`:idx: + `posix.html#912 <posix.html#912>`_ + + `pthread_exit`:idx: + `posix.html#913 <posix.html#913>`_ + + `PTHREAD_EXPLICIT_SCHED`:idx: + `posix.html#460 <posix.html#460>`_ + + `pthread_getconcurrency`:idx: + `posix.html#914 <posix.html#914>`_ + + `pthread_getcpuclockid`:idx: + `posix.html#915 <posix.html#915>`_ + + `pthread_getschedparam`:idx: + `posix.html#916 <posix.html#916>`_ + + `pthread_getspecific`:idx: + `posix.html#917 <posix.html#917>`_ + + `PTHREAD_INHERIT_SCHED`:idx: + `posix.html#461 <posix.html#461>`_ + + `pthread_join`:idx: + `posix.html#918 <posix.html#918>`_ + + `pthread_key_create`:idx: + `posix.html#919 <posix.html#919>`_ + + `pthread_key_delete`:idx: + `posix.html#920 <posix.html#920>`_ + + `pthread_kill`:idx: + `posix.html#1125 <posix.html#1125>`_ + + `pthread_mutexattr_destroy`:idx: + `posix.html#929 <posix.html#929>`_ + + `pthread_mutexattr_getprioceiling`:idx: + `posix.html#930 <posix.html#930>`_ + + `pthread_mutexattr_getprotocol`:idx: + `posix.html#931 <posix.html#931>`_ + + `pthread_mutexattr_getpshared`:idx: + `posix.html#932 <posix.html#932>`_ + + `pthread_mutexattr_gettype`:idx: + `posix.html#933 <posix.html#933>`_ + + `pthread_mutexattr_init`:idx: + `posix.html#934 <posix.html#934>`_ + + `pthread_mutexattr_setprioceiling`:idx: + `posix.html#935 <posix.html#935>`_ + + `pthread_mutexattr_setprotocol`:idx: + `posix.html#936 <posix.html#936>`_ + + `pthread_mutexattr_setpshared`:idx: + `posix.html#937 <posix.html#937>`_ + + `pthread_mutexattr_settype`:idx: + `posix.html#938 <posix.html#938>`_ + + `PTHREAD_MUTEX_DEFAULT`:idx: + `posix.html#462 <posix.html#462>`_ + + `pthread_mutex_destroy`:idx: + `posix.html#921 <posix.html#921>`_ + + `PTHREAD_MUTEX_ERRORCHECK`:idx: + `posix.html#463 <posix.html#463>`_ + + `pthread_mutex_getprioceiling`:idx: + `posix.html#922 <posix.html#922>`_ + + `pthread_mutex_init`:idx: + `posix.html#923 <posix.html#923>`_ + + `PTHREAD_MUTEX_INITIALIZER`:idx: + `posix.html#464 <posix.html#464>`_ + + `pthread_mutex_lock`:idx: + `posix.html#924 <posix.html#924>`_ + + `PTHREAD_MUTEX_NORMAL`:idx: + `posix.html#465 <posix.html#465>`_ + + `PTHREAD_MUTEX_RECURSIVE`:idx: + `posix.html#466 <posix.html#466>`_ + + `pthread_mutex_setprioceiling`:idx: + `posix.html#925 <posix.html#925>`_ + + `pthread_mutex_timedlock`:idx: + `posix.html#926 <posix.html#926>`_ + + `pthread_mutex_trylock`:idx: + `posix.html#927 <posix.html#927>`_ + + `pthread_mutex_unlock`:idx: + `posix.html#928 <posix.html#928>`_ + + `pthread_once`:idx: + `posix.html#939 <posix.html#939>`_ + + `PTHREAD_ONCE_INIT`:idx: + `posix.html#467 <posix.html#467>`_ + + `PTHREAD_PRIO_INHERIT`:idx: + `posix.html#468 <posix.html#468>`_ + + `PTHREAD_PRIO_NONE`:idx: + `posix.html#469 <posix.html#469>`_ + + `PTHREAD_PRIO_PROTECT`:idx: + `posix.html#470 <posix.html#470>`_ + + `PTHREAD_PROCESS_PRIVATE`:idx: + `posix.html#472 <posix.html#472>`_ + + `PTHREAD_PROCESS_SHARED`:idx: + `posix.html#471 <posix.html#471>`_ + + `pthread_rwlockattr_destroy`:idx: + `posix.html#949 <posix.html#949>`_ + + `pthread_rwlockattr_getpshared`:idx: + `posix.html#950 <posix.html#950>`_ + + `pthread_rwlockattr_init`:idx: + `posix.html#951 <posix.html#951>`_ + + `pthread_rwlockattr_setpshared`:idx: + `posix.html#952 <posix.html#952>`_ + + `pthread_rwlock_destroy`:idx: + `posix.html#940 <posix.html#940>`_ + + `pthread_rwlock_init`:idx: + `posix.html#941 <posix.html#941>`_ + + `pthread_rwlock_rdlock`:idx: + `posix.html#942 <posix.html#942>`_ + + `pthread_rwlock_timedrdlock`:idx: + `posix.html#943 <posix.html#943>`_ + + `pthread_rwlock_timedwrlock`:idx: + `posix.html#944 <posix.html#944>`_ + + `pthread_rwlock_tryrdlock`:idx: + `posix.html#945 <posix.html#945>`_ + + `pthread_rwlock_trywrlock`:idx: + `posix.html#946 <posix.html#946>`_ + + `pthread_rwlock_unlock`:idx: + `posix.html#947 <posix.html#947>`_ + + `pthread_rwlock_wrlock`:idx: + `posix.html#948 <posix.html#948>`_ + + `PTHREAD_SCOPE_PROCESS`:idx: + `posix.html#473 <posix.html#473>`_ + + `PTHREAD_SCOPE_SYSTEM`:idx: + `posix.html#474 <posix.html#474>`_ + + `pthread_self`:idx: + `posix.html#953 <posix.html#953>`_ + + `pthread_setcancelstate`:idx: + `posix.html#954 <posix.html#954>`_ + + `pthread_setcanceltype`:idx: + `posix.html#955 <posix.html#955>`_ + + `pthread_setconcurrency`:idx: + `posix.html#956 <posix.html#956>`_ + + `pthread_setschedparam`:idx: + `posix.html#957 <posix.html#957>`_ + + `pthread_setschedprio`:idx: + `posix.html#958 <posix.html#958>`_ + + `pthread_setspecific`:idx: + `posix.html#959 <posix.html#959>`_ + + `pthread_sigmask`:idx: + `posix.html#1126 <posix.html#1126>`_ + + `pthread_spin_destroy`:idx: + `posix.html#960 <posix.html#960>`_ + + `pthread_spin_init`:idx: + `posix.html#961 <posix.html#961>`_ + + `pthread_spin_lock`:idx: + `posix.html#962 <posix.html#962>`_ + + `pthread_spin_trylock`:idx: + `posix.html#963 <posix.html#963>`_ + + `pthread_spin_unlock`:idx: + `posix.html#964 <posix.html#964>`_ + + `pthread_testcancel`:idx: + `posix.html#965 <posix.html#965>`_ + + `Pulongf`:idx: + `zlib.html#104 <zlib.html#104>`_ + + `push/pop`:idx: + `manual.html#228 <manual.html#228>`_ + + `putEnv`:idx: + `os.html#142 <os.html#142>`_ + + `PWindow`:idx: + `dialogs.html#101 <dialogs.html#101>`_ + + `pwrite`:idx: + `posix.html#1017 <posix.html#1017>`_ + + `Pzip`:idx: + `libzip.html#105 <libzip.html#105>`_ + + `Pzip_file`:idx: + `libzip.html#106 <libzip.html#106>`_ + + `PZipFileStream`:idx: + `zipfiles.html#108 <zipfiles.html#108>`_ + + `Pzip_source`:idx: + `libzip.html#107 <libzip.html#107>`_ + + `Pzip_stat`:idx: + `libzip.html#103 <libzip.html#103>`_ + + `PZstream`:idx: + `zlib.html#114 <zlib.html#114>`_ + + `quit`:idx: + * `system.html#478 <system.html#478>`_ + * `system.html#479 <system.html#479>`_ + + `QuitFailure`:idx: + `system.html#477 <system.html#477>`_ + + `QuitSuccess`:idx: + `system.html#476 <system.html#476>`_ + + `quotation mark`:idx: + `manual.html#128 <manual.html#128>`_ + + `quoteIfContainsWhite`:idx: + `strutils.html#140 <strutils.html#140>`_ + + `RADIXCHAR`:idx: + `posix.html#439 <posix.html#439>`_ + + `raise`:idx: + `posix.html#1127 <posix.html#1127>`_ + + `random`:idx: + `math.html#108 <math.html#108>`_ + + `randomize`:idx: + `math.html#109 <math.html#109>`_ + + `range`:idx: + `system.html#123 <system.html#123>`_ + + `re-raised`:idx: + `manual.html#183 <manual.html#183>`_ + + `read`:idx: + `posix.html#1018 <posix.html#1018>`_ + + `readBool`:idx: + `streams.html#106 <streams.html#106>`_ + + `readBuffer`:idx: + `system.html#506 <system.html#506>`_ + + `ReadBytes`:idx: + `system.html#504 <system.html#504>`_ + + `readChar`:idx: + * `system.html#490 <system.html#490>`_ + * `streams.html#105 <streams.html#105>`_ + + `ReadChars`:idx: + `system.html#505 <system.html#505>`_ + + `readdir`:idx: + `posix.html#802 <posix.html#802>`_ + + `readdir_r`:idx: + `posix.html#803 <posix.html#803>`_ + + `readFile`:idx: + `system.html#492 <system.html#492>`_ + + `readFloat32`:idx: + `streams.html#111 <streams.html#111>`_ + + `readFloat64`:idx: + `streams.html#112 <streams.html#112>`_ + + `readInt16`:idx: + `streams.html#108 <streams.html#108>`_ + + `readInt32`:idx: + `streams.html#109 <streams.html#109>`_ + + `readInt64`:idx: + `streams.html#110 <streams.html#110>`_ + + `readInt8`:idx: + `streams.html#107 <streams.html#107>`_ + + `readLine`:idx: + * `system.html#500 <system.html#500>`_ + * `streams.html#114 <streams.html#114>`_ + + `readlink`:idx: + `posix.html#1019 <posix.html#1019>`_ + + `readStr`:idx: + `streams.html#113 <streams.html#113>`_ + + `realloc`:idx: + `system.html#415 <system.html#415>`_ + + `Recursive module dependancies`:idx: + `manual.html#216 <manual.html#216>`_ + + `register`:idx: + `nimrodc.html#112 <nimrodc.html#112>`_ + + `removeDir`:idx: + `os.html#137 <os.html#137>`_ + + `removeFile`:idx: + `os.html#136 <os.html#136>`_ + + `repeatChar`:idx: + `strutils.html#136 <strutils.html#136>`_ + + `replaceStr`:idx: + * `strutils.html#115 <strutils.html#115>`_ + * `strutils.html#116 <strutils.html#116>`_ + + `repr`:idx: + `system.html#371 <system.html#371>`_ + + `result`:idx: + * `manual.html#190 <manual.html#190>`_ + * `manual.html#201 <manual.html#201>`_ + + `return`:idx: + `manual.html#189 <manual.html#189>`_ + + `rewinddir`:idx: + `posix.html#804 <posix.html#804>`_ + + `rmdir`:idx: + `posix.html#1020 <posix.html#1020>`_ + + `R_OK`:idx: + `posix.html#479 <posix.html#479>`_ + + `round`:idx: + `math.html#116 <math.html#116>`_ + + `RTLD_GLOBAL`:idx: + `posix.html#217 <posix.html#217>`_ + + `RTLD_LAZY`:idx: + `posix.html#215 <posix.html#215>`_ + + `RTLD_LOCAL`:idx: + `posix.html#218 <posix.html#218>`_ + + `RTLD_NOW`:idx: + `posix.html#216 <posix.html#216>`_ + + `safe`:idx: + `manual.html#112 <manual.html#112>`_ + + `safecall`:idx: + `manual.html#166 <manual.html#166>`_ + + `sameFile`:idx: + `os.html#148 <os.html#148>`_ + + `sameFileContent`:idx: + `os.html#149 <os.html#149>`_ + + `SA_NOCLDSTOP`:idx: + `posix.html#754 <posix.html#754>`_ + + `SA_NOCLDWAIT`:idx: + `posix.html#762 <posix.html#762>`_ + + `SA_NODEFER`:idx: + `posix.html#763 <posix.html#763>`_ + + `SA_ONSTACK`:idx: + `posix.html#758 <posix.html#758>`_ + + `SA_RESETHAND`:idx: + `posix.html#759 <posix.html#759>`_ + + `SA_RESTART`:idx: + `posix.html#760 <posix.html#760>`_ + + `SA_SIGINFO`:idx: + `posix.html#761 <posix.html#761>`_ + + `SC_2_C_BIND`:idx: + `posix.html#519 <posix.html#519>`_ + + `SC_2_C_DEV`:idx: + `posix.html#520 <posix.html#520>`_ + + `SC_2_CHAR_TERM`:idx: + `posix.html#521 <posix.html#521>`_ + + `SC_2_FORT_DEV`:idx: + `posix.html#522 <posix.html#522>`_ + + `SC_2_FORT_RUN`:idx: + `posix.html#523 <posix.html#523>`_ + + `SC_2_LOCALEDEF`:idx: + `posix.html#524 <posix.html#524>`_ + + `SC_2_PBS`:idx: + `posix.html#525 <posix.html#525>`_ + + `SC_2_PBS_ACCOUNTING`:idx: + `posix.html#526 <posix.html#526>`_ + + `SC_2_PBS_CHECKPOINT`:idx: + `posix.html#527 <posix.html#527>`_ + + `SC_2_PBS_LOCATE`:idx: + `posix.html#528 <posix.html#528>`_ + + `SC_2_PBS_MESSAGE`:idx: + `posix.html#529 <posix.html#529>`_ + + `SC_2_PBS_TRACK`:idx: + `posix.html#530 <posix.html#530>`_ + + `SC_2_SW_DEV`:idx: + `posix.html#531 <posix.html#531>`_ + + `SC_2_UPE`:idx: + `posix.html#532 <posix.html#532>`_ + + `SC_2_VERSION`:idx: + `posix.html#533 <posix.html#533>`_ + + `SC_ADVISORY_INFO`:idx: + `posix.html#534 <posix.html#534>`_ + + `SC_AIO_LISTIO_MAX`:idx: + `posix.html#535 <posix.html#535>`_ + + `SC_AIO_MAX`:idx: + `posix.html#536 <posix.html#536>`_ + + `SC_AIO_PRIO_DELTA_MAX`:idx: + `posix.html#537 <posix.html#537>`_ + + `SC_ARG_MAX`:idx: + `posix.html#538 <posix.html#538>`_ + + `SC_ASYNCHRONOUS_IO`:idx: + `posix.html#539 <posix.html#539>`_ + + `SC_ATEXIT_MAX`:idx: + `posix.html#540 <posix.html#540>`_ + + `SC_BARRIERS`:idx: + `posix.html#541 <posix.html#541>`_ + + `SC_BC_BASE_MAX`:idx: + `posix.html#542 <posix.html#542>`_ + + `SC_BC_DIM_MAX`:idx: + `posix.html#543 <posix.html#543>`_ + + `SC_BC_SCALE_MAX`:idx: + `posix.html#544 <posix.html#544>`_ + + `SC_BC_STRING_MAX`:idx: + `posix.html#545 <posix.html#545>`_ + + `SC_CHILD_MAX`:idx: + `posix.html#546 <posix.html#546>`_ + + `SC_CLK_TCK`:idx: + `posix.html#547 <posix.html#547>`_ + + `SC_CLOCK_SELECTION`:idx: + `posix.html#548 <posix.html#548>`_ + + `SC_COLL_WEIGHTS_MAX`:idx: + `posix.html#549 <posix.html#549>`_ + + `SC_CPUTIME`:idx: + `posix.html#550 <posix.html#550>`_ + + `SC_DELAYTIMER_MAX`:idx: + `posix.html#551 <posix.html#551>`_ + + `SC_EXPR_NEST_MAX`:idx: + `posix.html#552 <posix.html#552>`_ + + `SC_FSYNC`:idx: + `posix.html#553 <posix.html#553>`_ + + `SC_GETGR_R_SIZE_MAX`:idx: + `posix.html#554 <posix.html#554>`_ + + `SC_GETPW_R_SIZE_MAX`:idx: + `posix.html#555 <posix.html#555>`_ + + `SCHED_FIFO`:idx: + `posix.html#770 <posix.html#770>`_ + + `sched_getparam`:idx: + `posix.html#1154 <posix.html#1154>`_ + + `sched_get_priority_max`:idx: + `posix.html#1152 <posix.html#1152>`_ + + `sched_get_priority_min`:idx: + `posix.html#1153 <posix.html#1153>`_ + + `sched_getscheduler`:idx: + `posix.html#1155 <posix.html#1155>`_ + + `SCHED_OTHER`:idx: + `posix.html#773 <posix.html#773>`_ + + `SCHED_RR`:idx: + `posix.html#771 <posix.html#771>`_ + + `sched_rr_get_interval`:idx: + `posix.html#1156 <posix.html#1156>`_ + + `sched_setparam`:idx: + `posix.html#1157 <posix.html#1157>`_ + + `sched_setscheduler`:idx: + `posix.html#1158 <posix.html#1158>`_ + + `SCHED_SPORADIC`:idx: + `posix.html#772 <posix.html#772>`_ + + `sched_yield`:idx: + `posix.html#1159 <posix.html#1159>`_ + + `SC_HOST_NAME_MAX`:idx: + `posix.html#556 <posix.html#556>`_ + + `SC_IOV_MAX`:idx: + `posix.html#557 <posix.html#557>`_ + + `SC_IPV6`:idx: + `posix.html#558 <posix.html#558>`_ + + `SC_JOB_CONTROL`:idx: + `posix.html#559 <posix.html#559>`_ + + `SC_LINE_MAX`:idx: + `posix.html#560 <posix.html#560>`_ + + `SC_LOGIN_NAME_MAX`:idx: + `posix.html#561 <posix.html#561>`_ + + `SC_MAPPED_FILES`:idx: + `posix.html#562 <posix.html#562>`_ + + `SC_MEMLOCK`:idx: + `posix.html#563 <posix.html#563>`_ + + `SC_MEMLOCK_RANGE`:idx: + `posix.html#564 <posix.html#564>`_ + + `SC_MEMORY_PROTECTION`:idx: + `posix.html#565 <posix.html#565>`_ + + `SC_MESSAGE_PASSING`:idx: + `posix.html#566 <posix.html#566>`_ + + `SC_MONOTONIC_CLOCK`:idx: + `posix.html#567 <posix.html#567>`_ + + `SC_MQ_OPEN_MAX`:idx: + `posix.html#568 <posix.html#568>`_ + + `SC_MQ_PRIO_MAX`:idx: + `posix.html#569 <posix.html#569>`_ + + `SC_NGROUPS_MAX`:idx: + `posix.html#570 <posix.html#570>`_ + + `scope`:idx: + * `manual.html#106 <manual.html#106>`_ + * `manual.html#217 <manual.html#217>`_ + + `SC_OPEN_MAX`:idx: + `posix.html#571 <posix.html#571>`_ + + `SC_PAGE_SIZE`:idx: + `posix.html#572 <posix.html#572>`_ + + `SC_PRIORITIZED_IO`:idx: + `posix.html#573 <posix.html#573>`_ + + `SC_PRIORITY_SCHEDULING`:idx: + `posix.html#574 <posix.html#574>`_ + + `SC_RAW_SOCKETS`:idx: + `posix.html#575 <posix.html#575>`_ + + `SC_READER_WRITER_LOCKS`:idx: + `posix.html#577 <posix.html#577>`_ + + `SC_REALTIME_SIGNALS`:idx: + `posix.html#578 <posix.html#578>`_ + + `SC_RE_DUP_MAX`:idx: + `posix.html#576 <posix.html#576>`_ + + `SC_REGEXP`:idx: + `posix.html#579 <posix.html#579>`_ + + `ScriptExt`:idx: + `os.html#108 <os.html#108>`_ + + `SC_RTSIG_MAX`:idx: + `posix.html#580 <posix.html#580>`_ + + `SC_SAVED_IDS`:idx: + `posix.html#581 <posix.html#581>`_ + + `SC_SEMAPHORES`:idx: + `posix.html#584 <posix.html#584>`_ + + `SC_SEM_NSEMS_MAX`:idx: + `posix.html#582 <posix.html#582>`_ + + `SC_SEM_VALUE_MAX`:idx: + `posix.html#583 <posix.html#583>`_ + + `SC_SHARED_MEMORY_OBJECTS`:idx: + `posix.html#585 <posix.html#585>`_ + + `SC_SHELL`:idx: + `posix.html#586 <posix.html#586>`_ + + `SC_SIGQUEUE_MAX`:idx: + `posix.html#587 <posix.html#587>`_ + + `SC_SPAWN`:idx: + `posix.html#588 <posix.html#588>`_ + + `SC_SPIN_LOCKS`:idx: + `posix.html#589 <posix.html#589>`_ + + `SC_SPORADIC_SERVER`:idx: + `posix.html#590 <posix.html#590>`_ + + `SC_SS_REPL_MAX`:idx: + `posix.html#591 <posix.html#591>`_ + + `SC_STREAM_MAX`:idx: + `posix.html#592 <posix.html#592>`_ + + `SC_SYMLOOP_MAX`:idx: + `posix.html#593 <posix.html#593>`_ + + `SC_SYNCHRONIZED_IO`:idx: + `posix.html#594 <posix.html#594>`_ + + `SC_THREAD_ATTR_STACKADDR`:idx: + `posix.html#595 <posix.html#595>`_ + + `SC_THREAD_ATTR_STACKSIZE`:idx: + `posix.html#596 <posix.html#596>`_ + + `SC_THREAD_CPUTIME`:idx: + `posix.html#597 <posix.html#597>`_ + + `SC_THREAD_DESTRUCTOR_ITERATIONS`:idx: + `posix.html#598 <posix.html#598>`_ + + `SC_THREAD_KEYS_MAX`:idx: + `posix.html#599 <posix.html#599>`_ + + `SC_THREAD_PRIO_INHERIT`:idx: + `posix.html#600 <posix.html#600>`_ + + `SC_THREAD_PRIO_PROTECT`:idx: + `posix.html#601 <posix.html#601>`_ + + `SC_THREAD_PRIORITY_SCHEDULING`:idx: + `posix.html#602 <posix.html#602>`_ + + `SC_THREAD_PROCESS_SHARED`:idx: + `posix.html#603 <posix.html#603>`_ + + `SC_THREADS`:idx: + `posix.html#608 <posix.html#608>`_ + + `SC_THREAD_SAFE_FUNCTIONS`:idx: + `posix.html#604 <posix.html#604>`_ + + `SC_THREAD_SPORADIC_SERVER`:idx: + `posix.html#605 <posix.html#605>`_ + + `SC_THREAD_STACK_MIN`:idx: + `posix.html#606 <posix.html#606>`_ + + `SC_THREAD_THREADS_MAX`:idx: + `posix.html#607 <posix.html#607>`_ + + `SC_TIMEOUTS`:idx: + `posix.html#609 <posix.html#609>`_ + + `SC_TIMER_MAX`:idx: + `posix.html#610 <posix.html#610>`_ + + `SC_TIMERS`:idx: + `posix.html#611 <posix.html#611>`_ + + `SC_TRACE`:idx: + `posix.html#612 <posix.html#612>`_ + + `SC_TRACE_EVENT_FILTER`:idx: + `posix.html#613 <posix.html#613>`_ + + `SC_TRACE_EVENT_NAME_MAX`:idx: + `posix.html#614 <posix.html#614>`_ + + `SC_TRACE_INHERIT`:idx: + `posix.html#615 <posix.html#615>`_ + + `SC_TRACE_LOG`:idx: + `posix.html#616 <posix.html#616>`_ + + `SC_TRACE_NAME_MAX`:idx: + `posix.html#617 <posix.html#617>`_ + + `SC_TRACE_SYS_MAX`:idx: + `posix.html#618 <posix.html#618>`_ + + `SC_TRACE_USER_EVENT_MAX`:idx: + `posix.html#619 <posix.html#619>`_ + + `SC_TTY_NAME_MAX`:idx: + `posix.html#620 <posix.html#620>`_ + + `SC_TYPED_MEMORY_OBJECTS`:idx: + `posix.html#621 <posix.html#621>`_ + + `SC_TZNAME_MAX`:idx: + `posix.html#622 <posix.html#622>`_ + + `SC_V6_ILP32_OFF32`:idx: + `posix.html#623 <posix.html#623>`_ + + `SC_V6_ILP32_OFFBIG`:idx: + `posix.html#624 <posix.html#624>`_ + + `SC_V6_LP64_OFF64`:idx: + `posix.html#625 <posix.html#625>`_ + + `SC_V6_LPBIG_OFFBIG`:idx: + `posix.html#626 <posix.html#626>`_ + + `SC_VERSION`:idx: + `posix.html#627 <posix.html#627>`_ + + `SC_XBS5_ILP32_OFF32`:idx: + `posix.html#628 <posix.html#628>`_ + + `SC_XBS5_ILP32_OFFBIG`:idx: + `posix.html#629 <posix.html#629>`_ + + `SC_XBS5_LP64_OFF64`:idx: + `posix.html#630 <posix.html#630>`_ + + `SC_XBS5_LPBIG_OFFBIG`:idx: + `posix.html#631 <posix.html#631>`_ + + `SC_XOPEN_CRYPT`:idx: + `posix.html#632 <posix.html#632>`_ + + `SC_XOPEN_ENH_I18N`:idx: + `posix.html#633 <posix.html#633>`_ + + `SC_XOPEN_LEGACY`:idx: + `posix.html#634 <posix.html#634>`_ + + `SC_XOPEN_REALTIME`:idx: + `posix.html#635 <posix.html#635>`_ + + `SC_XOPEN_REALTIME_THREADS`:idx: + `posix.html#636 <posix.html#636>`_ + + `SC_XOPEN_SHM`:idx: + `posix.html#637 <posix.html#637>`_ + + `SC_XOPEN_STREAMS`:idx: + `posix.html#638 <posix.html#638>`_ + + `SC_XOPEN_UNIX`:idx: + `posix.html#639 <posix.html#639>`_ + + `SC_XOPEN_VERSION`:idx: + `posix.html#640 <posix.html#640>`_ + + `SEEK_CUR`:idx: + `posix.html#776 <posix.html#776>`_ + + `seekdir`:idx: + `posix.html#805 <posix.html#805>`_ + + `SEEK_END`:idx: + `posix.html#777 <posix.html#777>`_ + + `SEEK_SET`:idx: + `posix.html#775 <posix.html#775>`_ + + `select`:idx: + `posix.html#1166 <posix.html#1166>`_ + + `sem_close`:idx: + `posix.html#1045 <posix.html#1045>`_ + + `sem_destroy`:idx: + `posix.html#1046 <posix.html#1046>`_ + + `SEM_FAILED`:idx: + `posix.html#641 <posix.html#641>`_ + + `sem_getvalue`:idx: + `posix.html#1047 <posix.html#1047>`_ + + `sem_init`:idx: + `posix.html#1048 <posix.html#1048>`_ + + `sem_open`:idx: + `posix.html#1049 <posix.html#1049>`_ + + `sem_post`:idx: + `posix.html#1050 <posix.html#1050>`_ + + `sem_timedwait`:idx: + `posix.html#1051 <posix.html#1051>`_ + + `sem_trywait`:idx: + `posix.html#1052 <posix.html#1052>`_ + + `sem_unlink`:idx: + `posix.html#1053 <posix.html#1053>`_ + + `sem_wait`:idx: + `posix.html#1054 <posix.html#1054>`_ + + `separate compilation`:idx: + * `manual.html#214 <manual.html#214>`_ + * `tut1.html#127 <tut1.html#127>`_ + + `seq`:idx: + `system.html#126 <system.html#126>`_ + + `seqToPtr`:idx: + `system.html#457 <system.html#457>`_ + + `Sequences`:idx: + * `manual.html#153 <manual.html#153>`_ + * `tut1.html#119 <tut1.html#119>`_ + + `set`:idx: + `system.html#127 <system.html#127>`_ + + `set type`:idx: + * `manual.html#157 <manual.html#157>`_ + * `tut1.html#116 <tut1.html#116>`_ + + `setcontext`:idx: + `posix.html#1190 <posix.html#1190>`_ + + `setCurrentDir`:idx: + `os.html#113 <os.html#113>`_ + + `setegid`:idx: + `posix.html#1021 <posix.html#1021>`_ + + `seteuid`:idx: + `posix.html#1022 <posix.html#1022>`_ + + `setFilePos`:idx: + `system.html#510 <system.html#510>`_ + + `setgid`:idx: + `posix.html#1023 <posix.html#1023>`_ + + `setgrent`:idx: + `posix.html#839 <posix.html#839>`_ + + `setLen`:idx: + * `system.html#407 <system.html#407>`_ + * `system.html#417 <system.html#417>`_ + + `setlocale`:idx: + `posix.html#847 <posix.html#847>`_ + + `setpgid`:idx: + `posix.html#1024 <posix.html#1024>`_ + + `setpgrp`:idx: + `posix.html#1025 <posix.html#1025>`_ + + `setpwent`:idx: + `posix.html#865 <posix.html#865>`_ + + `setregid`:idx: + `posix.html#1026 <posix.html#1026>`_ + + `setreuid`:idx: + `posix.html#1027 <posix.html#1027>`_ + + `setsid`:idx: + `posix.html#1028 <posix.html#1028>`_ + + `setuid`:idx: + `posix.html#1029 <posix.html#1029>`_ + + `shl`:idx: + * `system.html#226 <system.html#226>`_ + * `system.html#227 <system.html#227>`_ + * `system.html#228 <system.html#228>`_ + * `system.html#229 <system.html#229>`_ + * `system.html#230 <system.html#230>`_ + + `shm_open`:idx: + `posix.html#1090 <posix.html#1090>`_ + + `shm_unlink`:idx: + `posix.html#1091 <posix.html#1091>`_ + + `shr`:idx: + * `system.html#221 <system.html#221>`_ + * `system.html#222 <system.html#222>`_ + * `system.html#223 <system.html#223>`_ + * `system.html#224 <system.html#224>`_ + * `system.html#225 <system.html#225>`_ + + `S_IFBLK`:idx: + `posix.html#650 <posix.html#650>`_ + + `S_IFCHR`:idx: + `posix.html#651 <posix.html#651>`_ + + `S_IFDIR`:idx: + `posix.html#654 <posix.html#654>`_ + + `S_IFIFO`:idx: + `posix.html#652 <posix.html#652>`_ + + `S_IFLNK`:idx: + `posix.html#655 <posix.html#655>`_ + + `S_IFMT`:idx: + `posix.html#649 <posix.html#649>`_ + + `S_IFREG`:idx: + `posix.html#653 <posix.html#653>`_ + + `S_IFSOCK`:idx: + `posix.html#656 <posix.html#656>`_ + + `SIGABRT`:idx: + `posix.html#726 <posix.html#726>`_ + + `sigaction`:idx: + `posix.html#1128 <posix.html#1128>`_ + + `sigaddset`:idx: + `posix.html#1129 <posix.html#1129>`_ + + `SIGALRM`:idx: + `posix.html#727 <posix.html#727>`_ + + `sigaltstack`:idx: + `posix.html#1130 <posix.html#1130>`_ + + `SIG_BLOCK`:idx: + `posix.html#755 <posix.html#755>`_ + + `SIGBUS`:idx: + `posix.html#728 <posix.html#728>`_ + + `SIGCHLD`:idx: + `posix.html#729 <posix.html#729>`_ + + `SIGCONT`:idx: + `posix.html#730 <posix.html#730>`_ + + `sigdelset`:idx: + `posix.html#1131 <posix.html#1131>`_ + + `SIG_DFL`:idx: + `posix.html#719 <posix.html#719>`_ + + `sigemptyset`:idx: + `posix.html#1132 <posix.html#1132>`_ + + `SIG_ERR`:idx: + `posix.html#720 <posix.html#720>`_ + + `SIGEV_NONE`:idx: + `posix.html#723 <posix.html#723>`_ + + `SIGEV_SIGNAL`:idx: + `posix.html#724 <posix.html#724>`_ + + `SIGEV_THREAD`:idx: + `posix.html#725 <posix.html#725>`_ + + `sigfillset`:idx: + `posix.html#1133 <posix.html#1133>`_ + + `SIGFPE`:idx: + `posix.html#731 <posix.html#731>`_ + + `sighold`:idx: + `posix.html#1134 <posix.html#1134>`_ + + `SIGHUP`:idx: + `posix.html#732 <posix.html#732>`_ + + `SIG_IGN`:idx: + `posix.html#722 <posix.html#722>`_ + + `sigignore`:idx: + `posix.html#1135 <posix.html#1135>`_ + + `SIGILL`:idx: + `posix.html#733 <posix.html#733>`_ + + `SIGINT`:idx: + `posix.html#734 <posix.html#734>`_ + + `siginterrupt`:idx: + `posix.html#1136 <posix.html#1136>`_ + + `sigismember`:idx: + `posix.html#1137 <posix.html#1137>`_ + + `SIGKILL`:idx: + `posix.html#735 <posix.html#735>`_ + + `signal`:idx: + `posix.html#1138 <posix.html#1138>`_ + + `sigpause`:idx: + `posix.html#1139 <posix.html#1139>`_ + + `sigpending`:idx: + `posix.html#1140 <posix.html#1140>`_ + + `SIGPIPE`:idx: + `posix.html#736 <posix.html#736>`_ + + `SIGPOLL`:idx: + `posix.html#746 <posix.html#746>`_ + + `sigprocmask`:idx: + `posix.html#1141 <posix.html#1141>`_ + + `SIGPROF`:idx: + `posix.html#747 <posix.html#747>`_ + + `sigqueue`:idx: + `posix.html#1142 <posix.html#1142>`_ + + `SIGQUIT`:idx: + `posix.html#737 <posix.html#737>`_ + + `sigrelse`:idx: + `posix.html#1143 <posix.html#1143>`_ + + `SIGSEGV`:idx: + `posix.html#738 <posix.html#738>`_ + + `sigset`:idx: + `posix.html#1144 <posix.html#1144>`_ + + `SIG_SETMASK`:idx: + `posix.html#757 <posix.html#757>`_ + + `SIGSTKSZ`:idx: + `posix.html#767 <posix.html#767>`_ + + `SIGSTOP`:idx: + `posix.html#739 <posix.html#739>`_ + + `sigsuspend`:idx: + `posix.html#1145 <posix.html#1145>`_ + + `SIGSYS`:idx: + `posix.html#748 <posix.html#748>`_ + + `SIGTERM`:idx: + `posix.html#740 <posix.html#740>`_ + + `sigtimedwait`:idx: + `posix.html#1146 <posix.html#1146>`_ + + `SIGTRAP`:idx: + `posix.html#749 <posix.html#749>`_ + + `SIGTSTP`:idx: + `posix.html#741 <posix.html#741>`_ + + `SIGTTIN`:idx: + `posix.html#742 <posix.html#742>`_ + + `SIGTTOU`:idx: + `posix.html#743 <posix.html#743>`_ + + `SIG_UNBLOCK`:idx: + `posix.html#756 <posix.html#756>`_ + + `SIGURG`:idx: + `posix.html#750 <posix.html#750>`_ + + `SIGUSR1`:idx: + `posix.html#744 <posix.html#744>`_ + + `SIGUSR2`:idx: + `posix.html#745 <posix.html#745>`_ + + `SIGVTALRM`:idx: + `posix.html#751 <posix.html#751>`_ + + `sigwait`:idx: + `posix.html#1147 <posix.html#1147>`_ + + `sigwaitinfo`:idx: + `posix.html#1148 <posix.html#1148>`_ + + `SIGXCPU`:idx: + `posix.html#752 <posix.html#752>`_ + + `SIGXFSZ`:idx: + `posix.html#753 <posix.html#753>`_ + + `simple assertions`:idx: + `regexprs.html#103 <regexprs.html#103>`_ + + `simple statements`:idx: + `manual.html#174 <manual.html#174>`_ + + `sinh`:idx: + `math.html#124 <math.html#124>`_ + + `S_IRGRP`:idx: + `posix.html#662 <posix.html#662>`_ + + `S_IROTH`:idx: + `posix.html#666 <posix.html#666>`_ + + `S_IRUSR`:idx: + `posix.html#658 <posix.html#658>`_ + + `S_IRWXG`:idx: + `posix.html#661 <posix.html#661>`_ + + `S_IRWXO`:idx: + `posix.html#665 <posix.html#665>`_ + + `S_IRWXU`:idx: + `posix.html#657 <posix.html#657>`_ + + `S_ISBLK`:idx: + `posix.html#1067 <posix.html#1067>`_ + + `S_ISCHR`:idx: + `posix.html#1068 <posix.html#1068>`_ + + `S_ISDIR`:idx: + `posix.html#1069 <posix.html#1069>`_ + + `S_ISFIFO`:idx: + `posix.html#1070 <posix.html#1070>`_ + + `S_ISGID`:idx: + `posix.html#670 <posix.html#670>`_ + + `S_ISLNK`:idx: + `posix.html#1072 <posix.html#1072>`_ + + `S_ISREG`:idx: + `posix.html#1071 <posix.html#1071>`_ + + `S_ISSOCK`:idx: + `posix.html#1073 <posix.html#1073>`_ + + `S_ISUID`:idx: + `posix.html#669 <posix.html#669>`_ + + `S_ISVTX`:idx: + `posix.html#671 <posix.html#671>`_ + + `S_IWGRP`:idx: + `posix.html#663 <posix.html#663>`_ + + `S_IWOTH`:idx: + `posix.html#667 <posix.html#667>`_ + + `S_IWUSR`:idx: + `posix.html#659 <posix.html#659>`_ + + `S_IXGRP`:idx: + `posix.html#664 <posix.html#664>`_ + + `S_IXOTH`:idx: + `posix.html#668 <posix.html#668>`_ + + `S_IXUSR`:idx: + `posix.html#660 <posix.html#660>`_ + + `sizeof`:idx: + `system.html#156 <system.html#156>`_ + + `sleep`:idx: + `posix.html#1030 <posix.html#1030>`_ + + `split`:idx: + `strutils.html#119 <strutils.html#119>`_ + + `SplitFilename`:idx: + `os.html#125 <os.html#125>`_ + + `splitLines`:idx: + `strutils.html#120 <strutils.html#120>`_ + + `splitLinesSeq`:idx: + `strutils.html#121 <strutils.html#121>`_ + + `SplitPath`:idx: + `os.html#121 <os.html#121>`_ + + `splitSeq`:idx: + `strutils.html#122 <strutils.html#122>`_ + + `SQL_ACCESS_MODE`:idx: + `odbcsql.html#406 <odbcsql.html#406>`_ + + `SQL_ADD`:idx: + `odbcsql.html#317 <odbcsql.html#317>`_ + + `SQLAllocHandle`:idx: + `odbcsql.html#627 <odbcsql.html#627>`_ + + `SQL_ALL_TYPES`:idx: + `odbcsql.html#492 <odbcsql.html#492>`_ + + `SQL_API_SQLDESCRIBEPARAM`:idx: + `odbcsql.html#229 <odbcsql.html#229>`_ + + `SQL_ARD_TYPE`:idx: + `odbcsql.html#494 <odbcsql.html#494>`_ + + `SQL_ASYNC_ENABLE`:idx: + `odbcsql.html#383 <odbcsql.html#383>`_ + + `SQL_ATTR_ACCESS_MODE`:idx: + `odbcsql.html#415 <odbcsql.html#415>`_ + + `SQL_ATTR_APP_PARAM_DESC`:idx: + `odbcsql.html#374 <odbcsql.html#374>`_ + + `SQL_ATTR_APP_ROW_DESC`:idx: + `odbcsql.html#373 <odbcsql.html#373>`_ + + `SQL_ATTR_AUTOCOMMIT`:idx: + `odbcsql.html#400 <odbcsql.html#400>`_ + + `SQL_ATTR_AUTO_IPD`:idx: + `odbcsql.html#371 <odbcsql.html#371>`_ + + `SQL_ATTR_CONCURRENCY`:idx: + `odbcsql.html#395 <odbcsql.html#395>`_ + + `SQL_ATTR_CONNECTION_DEAD`:idx: + `odbcsql.html#416 <odbcsql.html#416>`_ + + `SQL_ATTR_CONNECTION_TIMEOUT`:idx: + `odbcsql.html#417 <odbcsql.html#417>`_ + + `SQL_ATTR_CURRENT_CATALOG`:idx: + `odbcsql.html#418 <odbcsql.html#418>`_ + + `SQL_ATTR_CURSOR_SCROLLABLE`:idx: + `odbcsql.html#377 <odbcsql.html#377>`_ + + `SQL_ATTR_CURSOR_SENSITIVITY`:idx: + `odbcsql.html#378 <odbcsql.html#378>`_ + + `SQL_ATTR_CURSOR_TYPE`:idx: + `odbcsql.html#394 <odbcsql.html#394>`_ + + `SQL_ATTR_DISCONNECT_BEHAVIOR`:idx: + `odbcsql.html#419 <odbcsql.html#419>`_ + + `SQL_ATTR_ENLIST_IN_DTC`:idx: + `odbcsql.html#420 <odbcsql.html#420>`_ + + `SQL_ATTR_ENLIST_IN_XA`:idx: + `odbcsql.html#421 <odbcsql.html#421>`_ + + `SQL_ATTR_FETCH_BOOKMARK_PTR`:idx: + `odbcsql.html#396 <odbcsql.html#396>`_ + + `SQL_ATTR_IMP_PARAM_DESC`:idx: + `odbcsql.html#376 <odbcsql.html#376>`_ + + `SQL_ATTR_IMP_ROW_DESC`:idx: + `odbcsql.html#375 <odbcsql.html#375>`_ + + `SQL_ATTR_LOGIN_TIMEOUT`:idx: + `odbcsql.html#422 <odbcsql.html#422>`_ + + `SQL_ATTR_MAX_ROWS`:idx: + `odbcsql.html#404 <odbcsql.html#404>`_ + + `SQL_ATTR_METADATA_ID`:idx: + `odbcsql.html#372 <odbcsql.html#372>`_ + + `SQL_ATTR_ODBC_CURSORS`:idx: + `odbcsql.html#341 <odbcsql.html#341>`_ + + `SQL_ATTR_ODBC_VERSION`:idx: + `odbcsql.html#240 <odbcsql.html#240>`_ + + `SQL_ATTR_OUTPUT_NTS`:idx: + `odbcsql.html#370 <odbcsql.html#370>`_ + + `SQL_ATTR_PACKET_SIZE`:idx: + `odbcsql.html#423 <odbcsql.html#423>`_ + + `SQL_ATTR_QUIET_MODE`:idx: + `odbcsql.html#424 <odbcsql.html#424>`_ + + `SQL_ATTR_ROW_ARRAY_SIZE`:idx: + `odbcsql.html#620 <odbcsql.html#620>`_ + + `SQL_ATTR_ROW_NUMBER`:idx: + `odbcsql.html#401 <odbcsql.html#401>`_ + + `SQL_ATTR_ROWS_FETCHED_PTR`:idx: + `odbcsql.html#398 <odbcsql.html#398>`_ + + `SQL_ATTR_ROW_STATUS_PTR`:idx: + `odbcsql.html#397 <odbcsql.html#397>`_ + + `SQL_ATTR_TRACE`:idx: + `odbcsql.html#425 <odbcsql.html#425>`_ + + `SQL_ATTR_TRACEFILE`:idx: + `odbcsql.html#426 <odbcsql.html#426>`_ + + `SQL_ATTR_TRANSLATE_LIB`:idx: + `odbcsql.html#427 <odbcsql.html#427>`_ + + `SQL_ATTR_TRANSLATE_OPTION`:idx: + `odbcsql.html#428 <odbcsql.html#428>`_ + + `SQL_ATTR_TXN_ISOLATION`:idx: + `odbcsql.html#403 <odbcsql.html#403>`_ + + `SQL_ATTR_USE_BOOKMARKS`:idx: + `odbcsql.html#405 <odbcsql.html#405>`_ + + `SQL_AUTOCOMMIT`:idx: + `odbcsql.html#399 <odbcsql.html#399>`_ + + `SQL_AUTOCOMMIT_DEFAULT`:idx: + `odbcsql.html#434 <odbcsql.html#434>`_ + + `SQL_AUTOCOMMIT_OFF`:idx: + `odbcsql.html#432 <odbcsql.html#432>`_ + + `SQL_AUTOCOMMIT_ON`:idx: + `odbcsql.html#433 <odbcsql.html#433>`_ + + `SQL_BEST_ROWID`:idx: + `odbcsql.html#523 <odbcsql.html#523>`_ + + `SQL_BIGINT`:idx: + `odbcsql.html#130 <odbcsql.html#130>`_ + + `SQL_BINARY`:idx: + `odbcsql.html#127 <odbcsql.html#127>`_ + + `SQLBindCol`:idx: + `odbcsql.html#652 <odbcsql.html#652>`_ + + `SQLBindParameter`:idx: + `odbcsql.html#660 <odbcsql.html#660>`_ + + `SQL_BIND_TYPE`:idx: + `odbcsql.html#384 <odbcsql.html#384>`_ + + `SQL_BIT`:idx: + `odbcsql.html#132 <odbcsql.html#132>`_ + + `SQL_BOOKMARK_PERSISTENCE`:idx: + `odbcsql.html#262 <odbcsql.html#262>`_ + + `SQL_BP_CLOSE`:idx: + `odbcsql.html#264 <odbcsql.html#264>`_ + + `SQL_BP_DELETE`:idx: + `odbcsql.html#265 <odbcsql.html#265>`_ + + `SQL_BP_DROP`:idx: + `odbcsql.html#266 <odbcsql.html#266>`_ + + `SQL_BP_OTHER_HSTMT`:idx: + `odbcsql.html#269 <odbcsql.html#269>`_ + + `SQL_BP_SCROLL`:idx: + `odbcsql.html#270 <odbcsql.html#270>`_ + + `SQL_BP_TRANSACTION`:idx: + `odbcsql.html#267 <odbcsql.html#267>`_ + + `SQL_BP_UPDATE`:idx: + `odbcsql.html#268 <odbcsql.html#268>`_ + + `SQLBrowseConnect`:idx: + `odbcsql.html#636 <odbcsql.html#636>`_ + + `SQLBulkOperations`:idx: + `odbcsql.html#650 <odbcsql.html#650>`_ + + `SQL_CA1_ABSOLUTE`:idx: + `odbcsql.html#282 <odbcsql.html#282>`_ + + `SQL_CA1_BOOKMARK`:idx: + `odbcsql.html#284 <odbcsql.html#284>`_ + + `SQL_CA1_BULK_ADD`:idx: + `odbcsql.html#295 <odbcsql.html#295>`_ + + `SQL_CA1_BULK_DELETE_BY_BOOKMARK`:idx: + `odbcsql.html#297 <odbcsql.html#297>`_ + + `SQL_CA1_BULK_FETCH_BY_BOOKMARK`:idx: + `odbcsql.html#298 <odbcsql.html#298>`_ + + `SQL_CA1_BULK_UPDATE_BY_BOOKMARK`:idx: + `odbcsql.html#296 <odbcsql.html#296>`_ + + `SQL_CA1_LOCK_EXCLUSIVE`:idx: + `odbcsql.html#286 <odbcsql.html#286>`_ + + `SQL_CA1_LOCK_NO_CHANGE`:idx: + `odbcsql.html#285 <odbcsql.html#285>`_ + + `SQL_CA1_LOCK_UNLOCK`:idx: + `odbcsql.html#287 <odbcsql.html#287>`_ + + `SQL_CA1_NEXT`:idx: + `odbcsql.html#281 <odbcsql.html#281>`_ + + `SQL_CA1_POS_DELETE`:idx: + `odbcsql.html#290 <odbcsql.html#290>`_ + + `SQL_CA1_POSITIONED_DELETE`:idx: + `odbcsql.html#293 <odbcsql.html#293>`_ + + `SQL_CA1_POSITIONED_UPDATE`:idx: + `odbcsql.html#292 <odbcsql.html#292>`_ + + `SQL_CA1_POS_POSITION`:idx: + `odbcsql.html#288 <odbcsql.html#288>`_ + + `SQL_CA1_POS_REFRESH`:idx: + `odbcsql.html#291 <odbcsql.html#291>`_ + + `SQL_CA1_POS_UPDATE`:idx: + `odbcsql.html#289 <odbcsql.html#289>`_ + + `SQL_CA1_RELATIVE`:idx: + `odbcsql.html#283 <odbcsql.html#283>`_ + + `SQL_CA1_SELECT_FOR_UPDATE`:idx: + `odbcsql.html#294 <odbcsql.html#294>`_ + + `SQL_CA2_CRC_APPROXIMATE`:idx: + `odbcsql.html#313 <odbcsql.html#313>`_ + + `SQL_CA2_CRC_EXACT`:idx: + `odbcsql.html#312 <odbcsql.html#312>`_ + + `SQL_CA2_LOCK_CONCURRENCY`:idx: + `odbcsql.html#300 <odbcsql.html#300>`_ + + `SQL_CA2_MAX_ROWS_AFFECTS_ALL`:idx: + `odbcsql.html#311 <odbcsql.html#311>`_ + + `SQL_CA2_MAX_ROWS_CATALOG`:idx: + `odbcsql.html#310 <odbcsql.html#310>`_ + + `SQL_CA2_MAX_ROWS_DELETE`:idx: + `odbcsql.html#308 <odbcsql.html#308>`_ + + `SQL_CA2_MAX_ROWS_INSERT`:idx: + `odbcsql.html#307 <odbcsql.html#307>`_ + + `SQL_CA2_MAX_ROWS_SELECT`:idx: + `odbcsql.html#306 <odbcsql.html#306>`_ + + `SQL_CA2_MAX_ROWS_UPDATE`:idx: + `odbcsql.html#309 <odbcsql.html#309>`_ + + `SQL_CA2_OPT_ROWVER_CONCURRENCY`:idx: + `odbcsql.html#301 <odbcsql.html#301>`_ + + `SQL_CA2_OPT_VALUES_CONCURRENCY`:idx: + `odbcsql.html#302 <odbcsql.html#302>`_ + + `SQL_CA2_READ_ONLY_CONCURRENCY`:idx: + `odbcsql.html#299 <odbcsql.html#299>`_ + + `SQL_CA2_SENSITIVITY_ADDITIONS`:idx: + `odbcsql.html#303 <odbcsql.html#303>`_ + + `SQL_CA2_SENSITIVITY_DELETIONS`:idx: + `odbcsql.html#304 <odbcsql.html#304>`_ + + `SQL_CA2_SENSITIVITY_UPDATES`:idx: + `odbcsql.html#305 <odbcsql.html#305>`_ + + `SQL_CA2_SIMULATE_NON_UNIQUE`:idx: + `odbcsql.html#314 <odbcsql.html#314>`_ + + `SQL_CA2_SIMULATE_TRY_UNIQUE`:idx: + `odbcsql.html#315 <odbcsql.html#315>`_ + + `SQL_CA2_SIMULATE_UNIQUE`:idx: + `odbcsql.html#316 <odbcsql.html#316>`_ + + `SQL_CATALOG_NAME`:idx: + `odbcsql.html#545 <odbcsql.html#545>`_ + + `SQL_C_BINARY`:idx: + `odbcsql.html#212 <odbcsql.html#212>`_ + + `SQL_C_BIT`:idx: + `odbcsql.html#213 <odbcsql.html#213>`_ + + `SQL_C_BOOKMARK`:idx: + `odbcsql.html#223 <odbcsql.html#223>`_ + + `SQL_C_CHAR`:idx: + `odbcsql.html#184 <odbcsql.html#184>`_ + + `SQL_C_DATE`:idx: + `odbcsql.html#193 <odbcsql.html#193>`_ + + `SQL_C_DEFAULT`:idx: + `odbcsql.html#190 <odbcsql.html#190>`_ + + `SQL_C_DOUBLE`:idx: + `odbcsql.html#188 <odbcsql.html#188>`_ + + `SQL_C_FLOAT`:idx: + `odbcsql.html#187 <odbcsql.html#187>`_ + + `SQL_C_GUID`:idx: + `odbcsql.html#224 <odbcsql.html#224>`_ + + `SQL_CHAR`:idx: + `odbcsql.html#136 <odbcsql.html#136>`_ + + `SQL_C_INTERVAL_DAY`:idx: + `odbcsql.html#201 <odbcsql.html#201>`_ + + `SQL_C_INTERVAL_DAY_TO_HOUR`:idx: + `odbcsql.html#206 <odbcsql.html#206>`_ + + `SQL_C_INTERVAL_DAY_TO_MINUTE`:idx: + `odbcsql.html#207 <odbcsql.html#207>`_ + + `SQL_C_INTERVAL_DAY_TO_SECOND`:idx: + `odbcsql.html#208 <odbcsql.html#208>`_ + + `SQL_C_INTERVAL_HOUR`:idx: + `odbcsql.html#202 <odbcsql.html#202>`_ + + `SQL_C_INTERVAL_HOUR_TO_MINUTE`:idx: + `odbcsql.html#209 <odbcsql.html#209>`_ + + `SQL_C_INTERVAL_HOUR_TO_SECOND`:idx: + `odbcsql.html#210 <odbcsql.html#210>`_ + + `SQL_C_INTERVAL_MINUTE`:idx: + `odbcsql.html#203 <odbcsql.html#203>`_ + + `SQL_C_INTERVAL_MINUTE_TO_SECOND`:idx: + `odbcsql.html#211 <odbcsql.html#211>`_ + + `SQL_C_INTERVAL_MONTH`:idx: + `odbcsql.html#200 <odbcsql.html#200>`_ + + `SQL_C_INTERVAL_SECOND`:idx: + `odbcsql.html#204 <odbcsql.html#204>`_ + + `SQL_C_INTERVAL_YEAR`:idx: + `odbcsql.html#199 <odbcsql.html#199>`_ + + `SQL_C_INTERVAL_YEAR_TO_MONTH`:idx: + `odbcsql.html#205 <odbcsql.html#205>`_ + + `SQL_C_LONG`:idx: + `odbcsql.html#185 <odbcsql.html#185>`_ + + `SQL_CLOSE`:idx: + `odbcsql.html#503 <odbcsql.html#503>`_ + + `SQLCloseCursor`:idx: + `odbcsql.html#639 <odbcsql.html#639>`_ + + `SQL_C_NUMERIC`:idx: + `odbcsql.html#189 <odbcsql.html#189>`_ + + `SQL_CODE_DATE`:idx: + `odbcsql.html#495 <odbcsql.html#495>`_ + + `SQL_CODE_DAY`:idx: + `odbcsql.html#156 <odbcsql.html#156>`_ + + `SQL_CODE_DAY_TO_HOUR`:idx: + `odbcsql.html#161 <odbcsql.html#161>`_ + + `SQL_CODE_DAY_TO_MINUTE`:idx: + `odbcsql.html#162 <odbcsql.html#162>`_ + + `SQL_CODE_DAY_TO_SECOND`:idx: + `odbcsql.html#163 <odbcsql.html#163>`_ + + `SQL_CODE_HOUR`:idx: + `odbcsql.html#157 <odbcsql.html#157>`_ + + `SQL_CODE_HOUR_TO_MINUTE`:idx: + `odbcsql.html#164 <odbcsql.html#164>`_ + + `SQL_CODE_HOUR_TO_SECOND`:idx: + `odbcsql.html#165 <odbcsql.html#165>`_ + + `SQL_CODE_MINUTE`:idx: + `odbcsql.html#158 <odbcsql.html#158>`_ + + `SQL_CODE_MINUTE_TO_SECOND`:idx: + `odbcsql.html#166 <odbcsql.html#166>`_ + + `SQL_CODE_MONTH`:idx: + `odbcsql.html#155 <odbcsql.html#155>`_ + + `SQL_CODE_SECOND`:idx: + `odbcsql.html#159 <odbcsql.html#159>`_ + + `SQL_CODE_TIME`:idx: + `odbcsql.html#496 <odbcsql.html#496>`_ + + `SQL_CODE_TIMESTAMP`:idx: + `odbcsql.html#497 <odbcsql.html#497>`_ + + `SQL_CODE_YEAR`:idx: + `odbcsql.html#154 <odbcsql.html#154>`_ + + `SQL_CODE_YEAR_TO_MONTH`:idx: + `odbcsql.html#160 <odbcsql.html#160>`_ + + `SQL_COLATT_OPT_MAX`:idx: + `odbcsql.html#588 <odbcsql.html#588>`_ + + `SQLColAttribute`:idx: + `odbcsql.html#662 <odbcsql.html#662>`_ + + `SQL_COLLATION_SEQ`:idx: + `odbcsql.html#546 <odbcsql.html#546>`_ + + `SQL_COLUMN_AUTO_INCREMENT`:idx: + `odbcsql.html#580 <odbcsql.html#580>`_ + + `SQL_COLUMN_CASE_SENSITIVE`:idx: + `odbcsql.html#581 <odbcsql.html#581>`_ + + `SQL_COLUMN_COUNT`:idx: + `odbcsql.html#569 <odbcsql.html#569>`_ + + `SQL_COLUMN_DISPLAY_SIZE`:idx: + `odbcsql.html#575 <odbcsql.html#575>`_ + + `SQL_COLUMN_DRIVER_START`:idx: + `odbcsql.html#589 <odbcsql.html#589>`_ + + `SQL_COLUMN_LABEL`:idx: + `odbcsql.html#587 <odbcsql.html#587>`_ + + `SQL_COLUMN_LENGTH`:idx: + `odbcsql.html#572 <odbcsql.html#572>`_ + + `SQL_COLUMN_MONEY`:idx: + `odbcsql.html#578 <odbcsql.html#578>`_ + + `SQL_COLUMN_NAME`:idx: + `odbcsql.html#570 <odbcsql.html#570>`_ + + `SQL_COLUMN_NULLABLE`:idx: + `odbcsql.html#576 <odbcsql.html#576>`_ + + `SQL_COLUMN_OWNER_NAME`:idx: + `odbcsql.html#585 <odbcsql.html#585>`_ + + `SQL_COLUMN_PRECISION`:idx: + `odbcsql.html#573 <odbcsql.html#573>`_ + + `SQL_COLUMN_QUALIFIER_NAME`:idx: + `odbcsql.html#586 <odbcsql.html#586>`_ + + `SQLColumns`:idx: + `odbcsql.html#665 <odbcsql.html#665>`_ + + `SQL_COLUMN_SCALE`:idx: + `odbcsql.html#574 <odbcsql.html#574>`_ + + `SQL_COLUMN_SEARCHABLE`:idx: + `odbcsql.html#582 <odbcsql.html#582>`_ + + `SQL_COLUMN_TABLE_NAME`:idx: + `odbcsql.html#584 <odbcsql.html#584>`_ + + `SQL_COLUMN_TYPE`:idx: + `odbcsql.html#571 <odbcsql.html#571>`_ + + `SQL_COLUMN_TYPE_NAME`:idx: + `odbcsql.html#583 <odbcsql.html#583>`_ + + `SQL_COLUMN_UNSIGNED`:idx: + `odbcsql.html#577 <odbcsql.html#577>`_ + + `SQL_COLUMN_UPDATABLE`:idx: + `odbcsql.html#579 <odbcsql.html#579>`_ + + `SQL_COMMIT`:idx: + `odbcsql.html#618 <odbcsql.html#618>`_ + + `SQL_CONCUR_DEFAULT`:idx: + `odbcsql.html#446 <odbcsql.html#446>`_ + + `SQL_CONCUR_LOCK`:idx: + `odbcsql.html#443 <odbcsql.html#443>`_ + + `SQL_CONCUR_READ_ONLY`:idx: + `odbcsql.html#442 <odbcsql.html#442>`_ + + `SQL_CONCURRENCY`:idx: + `odbcsql.html#386 <odbcsql.html#386>`_ + + `SQL_CONCUR_ROWVER`:idx: + `odbcsql.html#444 <odbcsql.html#444>`_ + + `SQL_CONCUR_VALUES`:idx: + `odbcsql.html#445 <odbcsql.html#445>`_ + + `SQLConnect`:idx: + `odbcsql.html#633 <odbcsql.html#633>`_ + + `SQL_C_SBIGINT`:idx: + `odbcsql.html#214 <odbcsql.html#214>`_ + + `SQL_C_SHORT`:idx: + `odbcsql.html#186 <odbcsql.html#186>`_ + + `SQL_C_SLONG`:idx: + `odbcsql.html#217 <odbcsql.html#217>`_ + + `SQL_C_SSHORT`:idx: + `odbcsql.html#218 <odbcsql.html#218>`_ + + `SQL_C_STINYINT`:idx: + `odbcsql.html#219 <odbcsql.html#219>`_ + + `SQL_C_TIME`:idx: + `odbcsql.html#194 <odbcsql.html#194>`_ + + `SQL_C_TIMESTAMP`:idx: + `odbcsql.html#195 <odbcsql.html#195>`_ + + `SQL_C_TINYINT`:idx: + `odbcsql.html#216 <odbcsql.html#216>`_ + + `SQL_C_TYPE_DATE`:idx: + `odbcsql.html#196 <odbcsql.html#196>`_ + + `SQL_C_TYPE_TIME`:idx: + `odbcsql.html#197 <odbcsql.html#197>`_ + + `SQL_C_TYPE_TIMESTAMP`:idx: + `odbcsql.html#198 <odbcsql.html#198>`_ + + `SQL_C_UBIGINT`:idx: + `odbcsql.html#215 <odbcsql.html#215>`_ + + `SQL_C_ULONG`:idx: + `odbcsql.html#220 <odbcsql.html#220>`_ + + `SQL_CUR_DEFAULT`:idx: + `odbcsql.html#345 <odbcsql.html#345>`_ + + `SQL_CURRENT_QUALIFIER`:idx: + `odbcsql.html#412 <odbcsql.html#412>`_ + + `SQL_CURSOR_DYNAMIC`:idx: + `odbcsql.html#439 <odbcsql.html#439>`_ + + `SQL_CURSOR_FORWARD_ONLY`:idx: + `odbcsql.html#437 <odbcsql.html#437>`_ + + `SQL_CURSOR_KEYSET_DRIVEN`:idx: + `odbcsql.html#438 <odbcsql.html#438>`_ + + `SQL_CURSOR_SENSITIVITY`:idx: + `odbcsql.html#543 <odbcsql.html#543>`_ + + `SQL_CURSOR_STATIC`:idx: + `odbcsql.html#440 <odbcsql.html#440>`_ + + `SQL_CURSOR_TYPE`:idx: + `odbcsql.html#385 <odbcsql.html#385>`_ + + `SQL_CURSOR_TYPE_DEFAULT`:idx: + `odbcsql.html#441 <odbcsql.html#441>`_ + + `SQL_CUR_USE_DRIVER`:idx: + `odbcsql.html#344 <odbcsql.html#344>`_ + + `SQL_CUR_USE_IF_NEEDED`:idx: + `odbcsql.html#342 <odbcsql.html#342>`_ + + `SQL_CUR_USE_ODBC`:idx: + `odbcsql.html#343 <odbcsql.html#343>`_ + + `SQL_C_USHORT`:idx: + `odbcsql.html#221 <odbcsql.html#221>`_ + + `SQL_C_UTINYINT`:idx: + `odbcsql.html#222 <odbcsql.html#222>`_ + + `SQL_C_VARBOOKMARK`:idx: + `odbcsql.html#228 <odbcsql.html#228>`_ + + `SQL_DATA_AT_EXEC`:idx: + `odbcsql.html#353 <odbcsql.html#353>`_ + + `SQLDataSources`:idx: + `odbcsql.html#654 <odbcsql.html#654>`_ + + `SQL_DATE`:idx: + `odbcsql.html#149 <odbcsql.html#149>`_ + + `SQL_DATE_LEN`:idx: + `odbcsql.html#363 <odbcsql.html#363>`_ + + `SQL_DATE_STRUCT`:idx: + `odbcsql.html#231 <odbcsql.html#231>`_ + + `SQL_DATETIME`:idx: + `odbcsql.html#144 <odbcsql.html#144>`_ + + `SQL_DECIMAL`:idx: + `odbcsql.html#138 <odbcsql.html#138>`_ + + `SQL_DEFAULT`:idx: + `odbcsql.html#493 <odbcsql.html#493>`_ + + `SQL_DELETE`:idx: + `odbcsql.html#325 <odbcsql.html#325>`_ + + `SQL_DELETE_BY_BOOKMARK`:idx: + `odbcsql.html#320 <odbcsql.html#320>`_ + + `SQL_DESC_ALLOC_TYPE`:idx: + `odbcsql.html#460 <odbcsql.html#460>`_ + + `SQL_DESC_ARRAY_SIZE`:idx: + `odbcsql.html#590 <odbcsql.html#590>`_ + + `SQL_DESC_ARRAY_STATUS_PTR`:idx: + `odbcsql.html#591 <odbcsql.html#591>`_ + + `SQL_DESC_AUTO_UNIQUE_VALUE`:idx: + `odbcsql.html#592 <odbcsql.html#592>`_ + + `SQL_DESC_BASE_COLUMN_NAME`:idx: + `odbcsql.html#593 <odbcsql.html#593>`_ + + `SQL_DESC_BASE_TABLE_NAME`:idx: + `odbcsql.html#594 <odbcsql.html#594>`_ + + `SQL_DESC_BIND_OFFSET_PTR`:idx: + `odbcsql.html#595 <odbcsql.html#595>`_ + + `SQL_DESC_BIND_TYPE`:idx: + `odbcsql.html#596 <odbcsql.html#596>`_ + + `SQL_DESC_CASE_SENSITIVE`:idx: + `odbcsql.html#597 <odbcsql.html#597>`_ + + `SQL_DESC_CATALOG_NAME`:idx: + `odbcsql.html#598 <odbcsql.html#598>`_ + + `SQL_DESC_CONCISE_TYPE`:idx: + `odbcsql.html#599 <odbcsql.html#599>`_ + + `SQL_DESC_COUNT`:idx: + `odbcsql.html#447 <odbcsql.html#447>`_ + + `SQL_DESC_DATA_PTR`:idx: + `odbcsql.html#456 <odbcsql.html#456>`_ + + `SQL_DESC_DATETIME_INTERVAL_CODE`:idx: + `odbcsql.html#453 <odbcsql.html#453>`_ + + `SQL_DESC_DATETIME_INTERVAL_PRECISION`:idx: + `odbcsql.html#600 <odbcsql.html#600>`_ + + `SQL_DESC_DISPLAY_SIZE`:idx: + `odbcsql.html#601 <odbcsql.html#601>`_ + + `SQL_DESC_FIXED_PREC_SCALE`:idx: + `odbcsql.html#602 <odbcsql.html#602>`_ + + `SQL_DESC_INDICATOR_PTR`:idx: + `odbcsql.html#455 <odbcsql.html#455>`_ + + `SQL_DESC_LABEL`:idx: + `odbcsql.html#603 <odbcsql.html#603>`_ + + `SQL_DESC_LENGTH`:idx: + `odbcsql.html#449 <odbcsql.html#449>`_ + + `SQL_DESC_LITERAL_PREFIX`:idx: + `odbcsql.html#604 <odbcsql.html#604>`_ + + `SQL_DESC_LITERAL_SUFFIX`:idx: + `odbcsql.html#605 <odbcsql.html#605>`_ + + `SQL_DESC_LOCAL_TYPE_NAME`:idx: + `odbcsql.html#606 <odbcsql.html#606>`_ + + `SQL_DESC_MAXIMUM_SCALE`:idx: + `odbcsql.html#607 <odbcsql.html#607>`_ + + `SQL_DESC_MINIMUM_SCALE`:idx: + `odbcsql.html#608 <odbcsql.html#608>`_ + + `SQL_DESC_NAME`:idx: + `odbcsql.html#457 <odbcsql.html#457>`_ + + `SQL_DESC_NULLABLE`:idx: + `odbcsql.html#454 <odbcsql.html#454>`_ + + `SQL_DESC_NUM_PREC_RADIX`:idx: + `odbcsql.html#609 <odbcsql.html#609>`_ + + `SQL_DESC_OCTET_LENGTH`:idx: + `odbcsql.html#459 <odbcsql.html#459>`_ + + `SQL_DESC_OCTET_LENGTH_PTR`:idx: + `odbcsql.html#450 <odbcsql.html#450>`_ + + `SQL_DESC_PARAMETER_TYPE`:idx: + `odbcsql.html#610 <odbcsql.html#610>`_ + + `SQL_DESC_PRECISION`:idx: + `odbcsql.html#451 <odbcsql.html#451>`_ + + `SQLDescribeCol`:idx: + `odbcsql.html#643 <odbcsql.html#643>`_ + + `SQL_DESCRIBE_PARAMETER`:idx: + `odbcsql.html#544 <odbcsql.html#544>`_ + + `SQL_DESC_ROWS_PROCESSED_PTR`:idx: + `odbcsql.html#611 <odbcsql.html#611>`_ + + `SQL_DESC_SCALE`:idx: + `odbcsql.html#452 <odbcsql.html#452>`_ + + `SQL_DESC_SCHEMA_NAME`:idx: + `odbcsql.html#612 <odbcsql.html#612>`_ + + `SQL_DESC_SEARCHABLE`:idx: + `odbcsql.html#613 <odbcsql.html#613>`_ + + `SQL_DESC_TABLE_NAME`:idx: + `odbcsql.html#615 <odbcsql.html#615>`_ + + `SQL_DESC_TYPE`:idx: + `odbcsql.html#448 <odbcsql.html#448>`_ + + `SQL_DESC_TYPE_NAME`:idx: + `odbcsql.html#614 <odbcsql.html#614>`_ + + `SQL_DESC_UNNAMED`:idx: + `odbcsql.html#458 <odbcsql.html#458>`_ + + `SQL_DESC_UNSIGNED`:idx: + `odbcsql.html#616 <odbcsql.html#616>`_ + + `SQL_DESC_UPDATABLE`:idx: + `odbcsql.html#617 <odbcsql.html#617>`_ + + `SQL_DIAG_ALTER_TABLE`:idx: + `odbcsql.html#473 <odbcsql.html#473>`_ + + `SQL_DIAG_CLASS_ORIGIN`:idx: + `odbcsql.html#468 <odbcsql.html#468>`_ + + `SQL_DIAG_CONNECTION_NAME`:idx: + `odbcsql.html#470 <odbcsql.html#470>`_ + + `SQL_DIAG_CREATE_INDEX`:idx: + `odbcsql.html#474 <odbcsql.html#474>`_ + + `SQL_DIAG_CREATE_TABLE`:idx: + `odbcsql.html#475 <odbcsql.html#475>`_ + + `SQL_DIAG_CREATE_VIEW`:idx: + `odbcsql.html#476 <odbcsql.html#476>`_ + + `SQL_DIAG_DELETE_WHERE`:idx: + `odbcsql.html#477 <odbcsql.html#477>`_ + + `SQL_DIAG_DROP_INDEX`:idx: + `odbcsql.html#478 <odbcsql.html#478>`_ + + `SQL_DIAG_DROP_TABLE`:idx: + `odbcsql.html#479 <odbcsql.html#479>`_ + + `SQL_DIAG_DROP_VIEW`:idx: + `odbcsql.html#480 <odbcsql.html#480>`_ + + `SQL_DIAG_DYNAMIC_DELETE_CURSOR`:idx: + `odbcsql.html#481 <odbcsql.html#481>`_ + + `SQL_DIAG_DYNAMIC_FUNCTION`:idx: + `odbcsql.html#467 <odbcsql.html#467>`_ + + `SQL_DIAG_DYNAMIC_FUNCTION_CODE`:idx: + `odbcsql.html#472 <odbcsql.html#472>`_ + + `SQL_DIAG_DYNAMIC_UPDATE_CURSOR`:idx: + `odbcsql.html#482 <odbcsql.html#482>`_ + + `SQL_DIAG_GRANT`:idx: + `odbcsql.html#483 <odbcsql.html#483>`_ + + `SQL_DIAG_INSERT`:idx: + `odbcsql.html#484 <odbcsql.html#484>`_ + + `SQL_DIAG_MESSAGE_TEXT`:idx: + `odbcsql.html#466 <odbcsql.html#466>`_ + + `SQL_DIAG_NATIVE`:idx: + `odbcsql.html#465 <odbcsql.html#465>`_ + + `SQL_DIAG_NUMBER`:idx: + `odbcsql.html#462 <odbcsql.html#462>`_ + + `SQL_DIAG_RETURNCODE`:idx: + `odbcsql.html#461 <odbcsql.html#461>`_ + + `SQL_DIAG_REVOKE`:idx: + `odbcsql.html#485 <odbcsql.html#485>`_ + + `SQL_DIAG_ROW_COUNT`:idx: + `odbcsql.html#463 <odbcsql.html#463>`_ + + `SQL_DIAG_SELECT_CURSOR`:idx: + `odbcsql.html#486 <odbcsql.html#486>`_ + + `SQL_DIAG_SERVER_NAME`:idx: + `odbcsql.html#471 <odbcsql.html#471>`_ + + `SQL_DIAG_SQLSTATE`:idx: + `odbcsql.html#464 <odbcsql.html#464>`_ + + `SQL_DIAG_SUBCLASS_ORIGIN`:idx: + `odbcsql.html#469 <odbcsql.html#469>`_ + + `SQL_DIAG_UNKNOWN_STATEMENT`:idx: + `odbcsql.html#487 <odbcsql.html#487>`_ + + `SQL_DIAG_UPDATE_WHERE`:idx: + `odbcsql.html#488 <odbcsql.html#488>`_ + + `SQLDisconnect`:idx: + `odbcsql.html#634 <odbcsql.html#634>`_ + + `SQL_DOUBLE`:idx: + `odbcsql.html#143 <odbcsql.html#143>`_ + + `SQL_DRIVER_COMPLETE`:idx: + `odbcsql.html#242 <odbcsql.html#242>`_ + + `SQL_DRIVER_COMPLETE_REQUIRED`:idx: + `odbcsql.html#244 <odbcsql.html#244>`_ + + `SQLDriverConnect`:idx: + `odbcsql.html#635 <odbcsql.html#635>`_ + + `SQL_DRIVER_NOPROMPT`:idx: + `odbcsql.html#241 <odbcsql.html#241>`_ + + `SQL_DRIVER_PROMPT`:idx: + `odbcsql.html#243 <odbcsql.html#243>`_ + + `SQLDrivers`:idx: + `odbcsql.html#655 <odbcsql.html#655>`_ + + `SQL_DROP`:idx: + `odbcsql.html#504 <odbcsql.html#504>`_ + + `SQL_DYNAMIC_CURSOR_ATTRIBUTES1`:idx: + `odbcsql.html#271 <odbcsql.html#271>`_ + + `SQL_DYNAMIC_CURSOR_ATTRIBUTES2`:idx: + `odbcsql.html#272 <odbcsql.html#272>`_ + + `SQLEndTran`:idx: + `odbcsql.html#663 <odbcsql.html#663>`_ + + `SQL_ENSURE`:idx: + `odbcsql.html#529 <odbcsql.html#529>`_ + + `SQL_ERROR`:idx: + `odbcsql.html#357 <odbcsql.html#357>`_ + + `SQLExecDirect`:idx: + `odbcsql.html#637 <odbcsql.html#637>`_ + + `SQLExecute`:idx: + `odbcsql.html#640 <odbcsql.html#640>`_ + + `SQLExtendedFetch`:idx: + `odbcsql.html#645 <odbcsql.html#645>`_ + + `SQL_FALSE`:idx: + `odbcsql.html#498 <odbcsql.html#498>`_ + + `SQLFetch`:idx: + `odbcsql.html#641 <odbcsql.html#641>`_ + + `SQL_FETCH_ABSOLUTE`:idx: + `odbcsql.html#513 <odbcsql.html#513>`_ + + `SQL_FETCH_BOOKMARK`:idx: + `odbcsql.html#250 <odbcsql.html#250>`_ + + `SQL_FETCH_BY_BOOKMARK`:idx: + `odbcsql.html#321 <odbcsql.html#321>`_ + + `SQL_FETCH_FIRST`:idx: + `odbcsql.html#508 <odbcsql.html#508>`_ + + `SQL_FETCH_FIRST_SYSTEM`:idx: + `odbcsql.html#510 <odbcsql.html#510>`_ + + `SQL_FETCH_FIRST_USER`:idx: + `odbcsql.html#509 <odbcsql.html#509>`_ + + `SQL_FETCH_LAST`:idx: + `odbcsql.html#511 <odbcsql.html#511>`_ + + `SQL_FETCH_NEXT`:idx: + `odbcsql.html#507 <odbcsql.html#507>`_ + + `SQL_FETCH_PRIOR`:idx: + `odbcsql.html#512 <odbcsql.html#512>`_ + + `SQL_FETCH_RELATIVE`:idx: + `odbcsql.html#514 <odbcsql.html#514>`_ + + `SQLFetchScroll`:idx: + `odbcsql.html#644 <odbcsql.html#644>`_ + + `SQL_FLOAT`:idx: + `odbcsql.html#141 <odbcsql.html#141>`_ + + `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES1`:idx: + `odbcsql.html#273 <odbcsql.html#273>`_ + + `SQL_FORWARD_ONLY_CURSOR_ATTRIBUTES2`:idx: + `odbcsql.html#274 <odbcsql.html#274>`_ + + `SQLFreeHandle`:idx: + `odbcsql.html#630 <odbcsql.html#630>`_ + + `SQLFreeStmt`:idx: + `odbcsql.html#661 <odbcsql.html#661>`_ + + `SQL_GET_BOOKMARK`:idx: + `odbcsql.html#392 <odbcsql.html#392>`_ + + `SQLGetCursorName`:idx: + `odbcsql.html#657 <odbcsql.html#657>`_ + + `SQLGetData`:idx: + `odbcsql.html#646 <odbcsql.html#646>`_ + + `SQLGetDiagField`:idx: + `odbcsql.html#632 <odbcsql.html#632>`_ + + `SQLGetDiagRec`:idx: + `odbcsql.html#631 <odbcsql.html#631>`_ + + `SQLGetEnvAttr`:idx: + `odbcsql.html#629 <odbcsql.html#629>`_ + + `SQLGetInfo`:idx: + `odbcsql.html#649 <odbcsql.html#649>`_ + + `SQLGetStmtAttr`:idx: + `odbcsql.html#648 <odbcsql.html#648>`_ + + `SQL_GUID`:idx: + `odbcsql.html#153 <odbcsql.html#153>`_ + + `SQL_HANDLE_DBC`:idx: + `odbcsql.html#367 <odbcsql.html#367>`_ + + `SQL_HANDLE_DESC`:idx: + `odbcsql.html#369 <odbcsql.html#369>`_ + + `SQL_HANDLE_ENV`:idx: + `odbcsql.html#366 <odbcsql.html#366>`_ + + `SQL_HANDLE_STMT`:idx: + `odbcsql.html#368 <odbcsql.html#368>`_ + + `SQL_INDEX_ALL`:idx: + `odbcsql.html#527 <odbcsql.html#527>`_ + + `SQL_INDEX_CLUSTERED`:idx: + `odbcsql.html#531 <odbcsql.html#531>`_ + + `SQL_INDEX_HASHED`:idx: + `odbcsql.html#532 <odbcsql.html#532>`_ + + `SQL_INDEX_KEYWORDS`:idx: + `odbcsql.html#275 <odbcsql.html#275>`_ + + `SQL_INDEX_OTHER`:idx: + `odbcsql.html#533 <odbcsql.html#533>`_ + + `SQL_INDEX_UNIQUE`:idx: + `odbcsql.html#526 <odbcsql.html#526>`_ + + `SQL_INFO_SCHEMA_VIEWS`:idx: + `odbcsql.html#276 <odbcsql.html#276>`_ + + `SQL_INSENSITIVE`:idx: + `odbcsql.html#490 <odbcsql.html#490>`_ + + `SQL_INTEGER`:idx: + `odbcsql.html#139 <odbcsql.html#139>`_ + + `SQL_INTERVAL`:idx: + `odbcsql.html#152 <odbcsql.html#152>`_ + + `SQL_INTERVAL_DAY`:idx: + `odbcsql.html#169 <odbcsql.html#169>`_ + + `SQL_INTERVAL_DAY_TO_HOUR`:idx: + `odbcsql.html#174 <odbcsql.html#174>`_ + + `SQL_INTERVAL_DAY_TO_MINUTE`:idx: + `odbcsql.html#175 <odbcsql.html#175>`_ + + `SQL_INTERVAL_DAY_TO_SECOND`:idx: + `odbcsql.html#176 <odbcsql.html#176>`_ + + `SQL_INTERVAL_HOUR`:idx: + `odbcsql.html#170 <odbcsql.html#170>`_ + + `SQL_INTERVAL_HOUR_TO_MINUTE`:idx: + `odbcsql.html#177 <odbcsql.html#177>`_ + + `SQL_INTERVAL_HOUR_TO_SECOND`:idx: + `odbcsql.html#178 <odbcsql.html#178>`_ + + `SQL_INTERVAL_MINUTE`:idx: + `odbcsql.html#171 <odbcsql.html#171>`_ + + `SQL_INTERVAL_MINUTE_TO_SECOND`:idx: + `odbcsql.html#179 <odbcsql.html#179>`_ + + `SQL_INTERVAL_MONTH`:idx: + `odbcsql.html#168 <odbcsql.html#168>`_ + + `SQL_INTERVAL_SECOND`:idx: + `odbcsql.html#172 <odbcsql.html#172>`_ + + `SQL_INTERVAL_YEAR`:idx: + `odbcsql.html#167 <odbcsql.html#167>`_ + + `SQL_INTERVAL_YEAR_TO_MONTH`:idx: + `odbcsql.html#173 <odbcsql.html#173>`_ + + `SQL_INVALID_HANDLE`:idx: + `odbcsql.html#358 <odbcsql.html#358>`_ + + `SQL_IS_INTEGER`:idx: + `odbcsql.html#247 <odbcsql.html#247>`_ + + `SQL_IS_POINTER`:idx: + `odbcsql.html#245 <odbcsql.html#245>`_ + + `SQL_IS_SMALLINT`:idx: + `odbcsql.html#249 <odbcsql.html#249>`_ + + `SQL_IS_UINTEGER`:idx: + `odbcsql.html#246 <odbcsql.html#246>`_ + + `SQL_IS_USMALLINT`:idx: + `odbcsql.html#248 <odbcsql.html#248>`_ + + `SQL_KEYSET_CURSOR_ATTRIBUTES1`:idx: + `odbcsql.html#277 <odbcsql.html#277>`_ + + `SQL_KEYSET_CURSOR_ATTRIBUTES2`:idx: + `odbcsql.html#278 <odbcsql.html#278>`_ + + `SQL_KEYSET_SIZE`:idx: + `odbcsql.html#387 <odbcsql.html#387>`_ + + `SQL_LOCK_EXCLUSIVE`:idx: + `odbcsql.html#327 <odbcsql.html#327>`_ + + `SQL_LOCK_NO_CHANGE`:idx: + `odbcsql.html#326 <odbcsql.html#326>`_ + + `SQL_LOCK_UNLOCK`:idx: + `odbcsql.html#328 <odbcsql.html#328>`_ + + `SQL_LOGIN_TIMEOUT`:idx: + `odbcsql.html#407 <odbcsql.html#407>`_ + + `SQL_LONGVARBINARY`:idx: + `odbcsql.html#129 <odbcsql.html#129>`_ + + `SQL_LONGVARCHAR`:idx: + `odbcsql.html#126 <odbcsql.html#126>`_ + + `SQL_MAX_DSN_LENGTH`:idx: + `odbcsql.html#338 <odbcsql.html#338>`_ + + `SQL_MAX_IDENTIFIER_LEN`:idx: + `odbcsql.html#547 <odbcsql.html#547>`_ + + `SQL_MAXIMUM_IDENTIFIER_LENGTH`:idx: + `odbcsql.html#548 <odbcsql.html#548>`_ + + `SQL_MAX_LENGTH`:idx: + `odbcsql.html#382 <odbcsql.html#382>`_ + + `SQL_MAX_MESSAGE_LENGTH`:idx: + `odbcsql.html#362 <odbcsql.html#362>`_ + + `SQL_MAX_OPTION_STRING_LENGTH`:idx: + `odbcsql.html#339 <odbcsql.html#339>`_ + + `SQL_MAX_ROWS`:idx: + `odbcsql.html#380 <odbcsql.html#380>`_ + + `SQL_MODE_DEFAULT`:idx: + `odbcsql.html#431 <odbcsql.html#431>`_ + + `SQL_MODE_READ_ONLY`:idx: + `odbcsql.html#430 <odbcsql.html#430>`_ + + `SQL_MODE_READ_WRITE`:idx: + `odbcsql.html#429 <odbcsql.html#429>`_ + + `SQL_NAME_LEN`:idx: + `odbcsql.html#237 <odbcsql.html#237>`_ + + `SQL_NEED_DATA`:idx: + `odbcsql.html#360 <odbcsql.html#360>`_ + + `SQL_NO_DATA`:idx: + `odbcsql.html#356 <odbcsql.html#356>`_ + + `SQL_NONSCROLLABLE`:idx: + `odbcsql.html#435 <odbcsql.html#435>`_ + + `SQL_NO_NULLS`:idx: + `odbcsql.html#500 <odbcsql.html#500>`_ + + `SQL_NOSCAN`:idx: + `odbcsql.html#381 <odbcsql.html#381>`_ + + `SQL_NO_TOTAL`:idx: + `odbcsql.html#230 <odbcsql.html#230>`_ + + `SQL_NTS`:idx: + `odbcsql.html#361 <odbcsql.html#361>`_ + + `SQL_NULLABLE`:idx: + `odbcsql.html#501 <odbcsql.html#501>`_ + + `SQL_NULLABLE_UNKNOWN`:idx: + `odbcsql.html#502 <odbcsql.html#502>`_ + + `SQL_NULL_DATA`:idx: + `odbcsql.html#352 <odbcsql.html#352>`_ + + `SQL_NULL_HANDLE`:idx: + `odbcsql.html#519 <odbcsql.html#519>`_ + + `SQL_NULL_HDBC`:idx: + `odbcsql.html#516 <odbcsql.html#516>`_ + + `SQL_NULL_HDESC`:idx: + `odbcsql.html#518 <odbcsql.html#518>`_ + + `SQL_NULL_HENV`:idx: + `odbcsql.html#515 <odbcsql.html#515>`_ + + `SQL_NULL_HSTMT`:idx: + `odbcsql.html#517 <odbcsql.html#517>`_ + + `SQL_NUMERIC`:idx: + `odbcsql.html#137 <odbcsql.html#137>`_ + + `SQLNumResultCols`:idx: + `odbcsql.html#642 <odbcsql.html#642>`_ + + `SQL_ODBC_CURSORS`:idx: + `odbcsql.html#340 <odbcsql.html#340>`_ + + `SQL_OJ_CAPABILITIES`:idx: + `odbcsql.html#540 <odbcsql.html#540>`_ + + `SQL_OPT_TRACE`:idx: + `odbcsql.html#408 <odbcsql.html#408>`_ + + `SQL_OPT_TRACEFILE`:idx: + `odbcsql.html#409 <odbcsql.html#409>`_ + + `SQL_OUTER_JOIN_CAPABILITIES`:idx: + `odbcsql.html#541 <odbcsql.html#541>`_ + + `SQL_OV_ODBC2`:idx: + `odbcsql.html#239 <odbcsql.html#239>`_ + + `SQL_OV_ODBC3`:idx: + `odbcsql.html#238 <odbcsql.html#238>`_ + + `SQL_PACKET_SIZE`:idx: + `odbcsql.html#414 <odbcsql.html#414>`_ + + `SQL_PARAM_INPUT`:idx: + `odbcsql.html#347 <odbcsql.html#347>`_ + + `SQL_PARAM_INPUT_OUTPUT`:idx: + `odbcsql.html#348 <odbcsql.html#348>`_ + + `SQL_PARAM_OUTPUT`:idx: + `odbcsql.html#350 <odbcsql.html#350>`_ + + `SQL_PARAM_TYPE_UNKNOWN`:idx: + `odbcsql.html#346 <odbcsql.html#346>`_ + + `SQL_POSITION`:idx: + `odbcsql.html#322 <odbcsql.html#322>`_ + + `SQLPrepare`:idx: + `odbcsql.html#638 <odbcsql.html#638>`_ + + `SQLPrimaryKeys`:idx: + `odbcsql.html#668 <odbcsql.html#668>`_ + + `SQLProcedureColumns`:idx: + `odbcsql.html#669 <odbcsql.html#669>`_ + + `SQLProcedures`:idx: + `odbcsql.html#667 <odbcsql.html#667>`_ + + `SQLPutData`:idx: + `odbcsql.html#651 <odbcsql.html#651>`_ + + `SQL_QUERY_TIMEOUT`:idx: + `odbcsql.html#379 <odbcsql.html#379>`_ + + `SQL_QUICK`:idx: + `odbcsql.html#528 <odbcsql.html#528>`_ + + `SQL_QUIET_MODE`:idx: + `odbcsql.html#413 <odbcsql.html#413>`_ + + `SQL_REAL`:idx: + `odbcsql.html#142 <odbcsql.html#142>`_ + + `SQL_REFRESH`:idx: + `odbcsql.html#323 <odbcsql.html#323>`_ + + `SQL_RESET_PARAMS`:idx: + `odbcsql.html#506 <odbcsql.html#506>`_ + + `SQL_RESULT_COL`:idx: + `odbcsql.html#349 <odbcsql.html#349>`_ + + `SQL_RETRIEVE_DATA`:idx: + `odbcsql.html#390 <odbcsql.html#390>`_ + + `SQL_RETURN_VALUE`:idx: + `odbcsql.html#351 <odbcsql.html#351>`_ + + `SQL_ROLLBACK`:idx: + `odbcsql.html#619 <odbcsql.html#619>`_ + + `SQL_ROW_ADDED`:idx: + `odbcsql.html#333 <odbcsql.html#333>`_ + + `SQLRowCount`:idx: + `odbcsql.html#659 <odbcsql.html#659>`_ + + `SQL_ROW_DELETED`:idx: + `odbcsql.html#330 <odbcsql.html#330>`_ + + `SQL_ROW_ERROR`:idx: + `odbcsql.html#334 <odbcsql.html#334>`_ + + `SQL_ROW_IDENTIFIER`:idx: + `odbcsql.html#525 <odbcsql.html#525>`_ + + `SQL_ROW_IGNORE`:idx: + `odbcsql.html#337 <odbcsql.html#337>`_ + + `SQL_ROW_NOROW`:idx: + `odbcsql.html#332 <odbcsql.html#332>`_ + + `SQL_ROW_NUMBER`:idx: + `odbcsql.html#393 <odbcsql.html#393>`_ + + `SQL_ROW_PROCEED`:idx: + `odbcsql.html#336 <odbcsql.html#336>`_ + + `SQL_ROWSET_SIZE`:idx: + `odbcsql.html#388 <odbcsql.html#388>`_ + + `SQL_ROW_SUCCESS`:idx: + `odbcsql.html#329 <odbcsql.html#329>`_ + + `SQL_ROW_SUCCESS_WITH_INFO`:idx: + `odbcsql.html#335 <odbcsql.html#335>`_ + + `SQL_ROW_UPDATED`:idx: + `odbcsql.html#331 <odbcsql.html#331>`_ + + `SQL_ROWVER`:idx: + `odbcsql.html#524 <odbcsql.html#524>`_ + + `SQL_SCCO_LOCK`:idx: + `odbcsql.html#550 <odbcsql.html#550>`_ + + `SQL_SCCO_OPT_ROWVER`:idx: + `odbcsql.html#551 <odbcsql.html#551>`_ + + `SQL_SCCO_OPT_VALUES`:idx: + `odbcsql.html#552 <odbcsql.html#552>`_ + + `SQL_SCCO_READ_ONLY`:idx: + `odbcsql.html#549 <odbcsql.html#549>`_ + + `SQL_SCOPE_CURROW`:idx: + `odbcsql.html#520 <odbcsql.html#520>`_ + + `SQL_SCOPE_SESSION`:idx: + `odbcsql.html#522 <odbcsql.html#522>`_ + + `SQL_SCOPE_TRANSACTION`:idx: + `odbcsql.html#521 <odbcsql.html#521>`_ + + `SQL_SCROLLABLE`:idx: + `odbcsql.html#436 <odbcsql.html#436>`_ + + `SQL_SCROLL_CONCURRENCY`:idx: + `odbcsql.html#534 <odbcsql.html#534>`_ + + `SQL_SCROLL_OPTIONS`:idx: + `odbcsql.html#251 <odbcsql.html#251>`_ + + `SQL_SENSITIVE`:idx: + `odbcsql.html#491 <odbcsql.html#491>`_ + + `SQLSetConnectAttr`:idx: + `odbcsql.html#656 <odbcsql.html#656>`_ + + `SQLSetCursorName`:idx: + `odbcsql.html#658 <odbcsql.html#658>`_ + + `SQLSetEnvAttr`:idx: + `odbcsql.html#628 <odbcsql.html#628>`_ + + `SQLSetPos`:idx: + `odbcsql.html#653 <odbcsql.html#653>`_ + + `SQL_SETPOS_MAX_OPTION_VALUE`:idx: + `odbcsql.html#318 <odbcsql.html#318>`_ + + `SQLSetStmtAttr`:idx: + `odbcsql.html#647 <odbcsql.html#647>`_ + + `SQL_SIGNED_OFFSET`:idx: + `odbcsql.html#191 <odbcsql.html#191>`_ + + `SQL_SIMULATE_CURSOR`:idx: + `odbcsql.html#389 <odbcsql.html#389>`_ + + `SQL_SMALLINT`:idx: + `odbcsql.html#140 <odbcsql.html#140>`_ + + `SQL_SO_DYNAMIC`:idx: + `odbcsql.html#259 <odbcsql.html#259>`_ + + `SQL_SO_FORWARD_ONLY`:idx: + `odbcsql.html#257 <odbcsql.html#257>`_ + + `SQL_SO_KEYSET_DRIVEN`:idx: + `odbcsql.html#258 <odbcsql.html#258>`_ + + `SQL_SO_MIXED`:idx: + `odbcsql.html#260 <odbcsql.html#260>`_ + + `SQL_SO_STATIC`:idx: + `odbcsql.html#261 <odbcsql.html#261>`_ + + `SQLSpecialColumns`:idx: + `odbcsql.html#666 <odbcsql.html#666>`_ + + `SQL_SS_ADDITIONS`:idx: + `odbcsql.html#566 <odbcsql.html#566>`_ + + `SQL_SS_DELETIONS`:idx: + `odbcsql.html#567 <odbcsql.html#567>`_ + + `SQL_SS_UPDATES`:idx: + `odbcsql.html#568 <odbcsql.html#568>`_ + + `SQL_STATIC_CURSOR_ATTRIBUTES1`:idx: + `odbcsql.html#279 <odbcsql.html#279>`_ + + `SQL_STATIC_CURSOR_ATTRIBUTES2`:idx: + `odbcsql.html#280 <odbcsql.html#280>`_ + + `SQL_STATIC_SENSITIVITY`:idx: + `odbcsql.html#263 <odbcsql.html#263>`_ + + `SQLStatistics`:idx: + `odbcsql.html#670 <odbcsql.html#670>`_ + + `SQL_STILL_EXECUTING`:idx: + `odbcsql.html#359 <odbcsql.html#359>`_ + + `SQL_SUCCESS`:idx: + `odbcsql.html#354 <odbcsql.html#354>`_ + + `SQL_SUCCESS_WITH_INFO`:idx: + `odbcsql.html#355 <odbcsql.html#355>`_ + + `SQLTables`:idx: + `odbcsql.html#664 <odbcsql.html#664>`_ + + `SQL_TABLE_STAT`:idx: + `odbcsql.html#530 <odbcsql.html#530>`_ + + `SQL_TC_ALL`:idx: + `odbcsql.html#555 <odbcsql.html#555>`_ + + `SQL_TC_DDL_COMMIT`:idx: + `odbcsql.html#556 <odbcsql.html#556>`_ + + `SQL_TC_DDL_IGNORE`:idx: + `odbcsql.html#557 <odbcsql.html#557>`_ + + `SQL_TC_DML`:idx: + `odbcsql.html#554 <odbcsql.html#554>`_ + + `SQL_TC_NONE`:idx: + `odbcsql.html#553 <odbcsql.html#553>`_ + + `SQL_TIME`:idx: + `odbcsql.html#150 <odbcsql.html#150>`_ + + `SQL_TIME_LEN`:idx: + `odbcsql.html#364 <odbcsql.html#364>`_ + + `SQL_TIMESTAMP`:idx: + `odbcsql.html#151 <odbcsql.html#151>`_ + + `SQL_TIMESTAMP_LEN`:idx: + `odbcsql.html#365 <odbcsql.html#365>`_ + + `SQL_TIMESTAMP_STRUCT`:idx: + `odbcsql.html#235 <odbcsql.html#235>`_ + + `SQL_TIME_STRUCT`:idx: + `odbcsql.html#233 <odbcsql.html#233>`_ + + `SQL_TINYINT`:idx: + `odbcsql.html#131 <odbcsql.html#131>`_ + + `SQL_TRANSACTION_CAPABLE`:idx: + `odbcsql.html#536 <odbcsql.html#536>`_ + + `SQL_TRANSACTION_ISOLATION_OPTION`:idx: + `odbcsql.html#539 <odbcsql.html#539>`_ + + `SQL_TRANSACTION_READ_COMMITTED`:idx: + `odbcsql.html#561 <odbcsql.html#561>`_ + + `SQL_TRANSACTION_READ_UNCOMMITTED`:idx: + `odbcsql.html#559 <odbcsql.html#559>`_ + + `SQL_TRANSACTION_REPEATABLE_READ`:idx: + `odbcsql.html#563 <odbcsql.html#563>`_ + + `SQL_TRANSACTION_SERIALIZABLE`:idx: + `odbcsql.html#565 <odbcsql.html#565>`_ + + `SQL_TRANSLATE_DLL`:idx: + `odbcsql.html#410 <odbcsql.html#410>`_ + + `SQL_TRANSLATE_OPTION`:idx: + `odbcsql.html#411 <odbcsql.html#411>`_ + + `SQL_TRUE`:idx: + `odbcsql.html#499 <odbcsql.html#499>`_ + + `SQL_TXN_CAPABLE`:idx: + `odbcsql.html#535 <odbcsql.html#535>`_ + + `SQL_TXN_ISOLATION`:idx: + `odbcsql.html#402 <odbcsql.html#402>`_ + + `SQL_TXN_ISOLATION_OPTION`:idx: + `odbcsql.html#538 <odbcsql.html#538>`_ + + `SQL_TXN_READ_COMMITTED`:idx: + `odbcsql.html#560 <odbcsql.html#560>`_ + + `SQL_TXN_READ_UNCOMMITTED`:idx: + `odbcsql.html#558 <odbcsql.html#558>`_ + + `SQL_TXN_REPEATABLE_READ`:idx: + `odbcsql.html#562 <odbcsql.html#562>`_ + + `SQL_TXN_SERIALIZABLE`:idx: + `odbcsql.html#564 <odbcsql.html#564>`_ + + `SQL_TYPE_DATE`:idx: + `odbcsql.html#146 <odbcsql.html#146>`_ + + `SQL_TYPE_MAX`:idx: + `odbcsql.html#227 <odbcsql.html#227>`_ + + `SQL_TYPE_MIN`:idx: + `odbcsql.html#226 <odbcsql.html#226>`_ + + `SQL_TYPE_NULL`:idx: + `odbcsql.html#225 <odbcsql.html#225>`_ + + `SQL_TYPE_TIME`:idx: + `odbcsql.html#147 <odbcsql.html#147>`_ + + `SQL_TYPE_TIMESTAMP`:idx: + `odbcsql.html#148 <odbcsql.html#148>`_ + + `SQL_UB_DEFAULT`:idx: + `odbcsql.html#254 <odbcsql.html#254>`_ + + `SQL_UB_FIXED`:idx: + `odbcsql.html#255 <odbcsql.html#255>`_ + + `SQL_UB_OFF`:idx: + `odbcsql.html#252 <odbcsql.html#252>`_ + + `SQL_UB_ON`:idx: + `odbcsql.html#253 <odbcsql.html#253>`_ + + `SQL_UB_VARIABLE`:idx: + `odbcsql.html#256 <odbcsql.html#256>`_ + + `SQL_UNBIND`:idx: + `odbcsql.html#505 <odbcsql.html#505>`_ + + `SQL_UNICODE`:idx: + `odbcsql.html#180 <odbcsql.html#180>`_ + + `SQL_UNICODE_CHAR`:idx: + `odbcsql.html#183 <odbcsql.html#183>`_ + + `SQL_UNICODE_LONGVARCHAR`:idx: + `odbcsql.html#182 <odbcsql.html#182>`_ + + `SQL_UNICODE_VARCHAR`:idx: + `odbcsql.html#181 <odbcsql.html#181>`_ + + `SQL_UNKNOWN_TYPE`:idx: + `odbcsql.html#125 <odbcsql.html#125>`_ + + `SQL_UNSIGNED_OFFSET`:idx: + `odbcsql.html#192 <odbcsql.html#192>`_ + + `SQL_UNSPECIFIED`:idx: + `odbcsql.html#489 <odbcsql.html#489>`_ + + `SQL_UPDATE`:idx: + `odbcsql.html#324 <odbcsql.html#324>`_ + + `SQL_UPDATE_BY_BOOKMARK`:idx: + `odbcsql.html#319 <odbcsql.html#319>`_ + + `SQL_USE_BOOKMARKS`:idx: + `odbcsql.html#391 <odbcsql.html#391>`_ + + `SQL_USER_NAME`:idx: + `odbcsql.html#537 <odbcsql.html#537>`_ + + `SQL_VARBINARY`:idx: + `odbcsql.html#128 <odbcsql.html#128>`_ + + `SQL_VARCHAR`:idx: + `odbcsql.html#145 <odbcsql.html#145>`_ + + `SQL_WCHAR`:idx: + `odbcsql.html#133 <odbcsql.html#133>`_ + + `SQL_WLONGVARCHAR`:idx: + `odbcsql.html#135 <odbcsql.html#135>`_ + + `SQL_WVARCHAR`:idx: + `odbcsql.html#134 <odbcsql.html#134>`_ + + `SQL_XOPEN_CLI_YEAR`:idx: + `odbcsql.html#542 <odbcsql.html#542>`_ + + `sqrt`:idx: + * `math.html#110 <math.html#110>`_ + * `complex.html#109 <complex.html#109>`_ + + `SS_DISABLE`:idx: + `posix.html#765 <posix.html#765>`_ + + `SS_ONSTACK`:idx: + `posix.html#764 <posix.html#764>`_ + + `stack_trace`:idx: + `nimrodc.html#108 <nimrodc.html#108>`_ + + `startsWith`:idx: + `strutils.html#137 <strutils.html#137>`_ + + `stat`:idx: + `posix.html#1065 <posix.html#1065>`_ + + `statement macros`:idx: + `tut2.html#114 <tut2.html#114>`_ + + `Statements`:idx: + `manual.html#173 <manual.html#173>`_ + + `static error`:idx: + `manual.html#109 <manual.html#109>`_ + + `static type`:idx: + `manual.html#103 <manual.html#103>`_ + + `statvfs`:idx: + `posix.html#1056 <posix.html#1056>`_ + + `stdcall`:idx: + `manual.html#164 <manual.html#164>`_ + + `stderr`:idx: + `system.html#485 <system.html#485>`_ + + `STDERR_FILENO`:idx: + `posix.html#127 <posix.html#127>`_ + + `stdin`:idx: + `system.html#483 <system.html#483>`_ + + `STDIN_FILENO`:idx: + `posix.html#128 <posix.html#128>`_ + + `stdout`:idx: + `system.html#484 <system.html#484>`_ + + `STDOUT_FILENO`:idx: + `posix.html#129 <posix.html#129>`_ + + `ST_NOSUID`:idx: + `posix.html#673 <posix.html#673>`_ + + `ST_RDONLY`:idx: + `posix.html#672 <posix.html#672>`_ + + `strerror`:idx: + `posix.html#1160 <posix.html#1160>`_ + + `strfmon`:idx: + `posix.html#848 <posix.html#848>`_ + + `strftime`:idx: + `posix.html#1110 <posix.html#1110>`_ + + `string`:idx: + * `manual.html#150 <manual.html#150>`_ + * `system.html#111 <system.html#111>`_ + + `strip`:idx: + `strutils.html#105 <strutils.html#105>`_ + + `strptime`:idx: + `posix.html#1111 <posix.html#1111>`_ + + `strStart`:idx: + `strutils.html#103 <strutils.html#103>`_ + + `structured type`:idx: + `manual.html#151 <manual.html#151>`_ + + `strutils`:idx: + `nimrodc.html#117 <nimrodc.html#117>`_ + + `style-insensitive`:idx: + `manual.html#118 <manual.html#118>`_ + + `S_TYPEISMQ`:idx: + `posix.html#1074 <posix.html#1074>`_ + + `S_TYPEISSEM`:idx: + `posix.html#1075 <posix.html#1075>`_ + + `S_TYPEISSHM`:idx: + `posix.html#1076 <posix.html#1076>`_ + + `S_TYPEISTMO`:idx: + `posix.html#1077 <posix.html#1077>`_ + + `subrange`:idx: + * `manual.html#149 <manual.html#149>`_ + * `tut1.html#115 <tut1.html#115>`_ + + `succ`:idx: + `system.html#157 <system.html#157>`_ + + `swab`:idx: + `posix.html#1031 <posix.html#1031>`_ + + `swap`:idx: + `system.html#419 <system.html#419>`_ + + `swapcontext`:idx: + `posix.html#1191 <posix.html#1191>`_ + + `symlink`:idx: + `posix.html#1032 <posix.html#1032>`_ + + `sync`:idx: + `posix.html#1033 <posix.html#1033>`_ + + `syscall`:idx: + `manual.html#171 <manual.html#171>`_ + + `sysconf`:idx: + `posix.html#1034 <posix.html#1034>`_ + + `system`:idx: + `manual.html#218 <manual.html#218>`_ + + `tabulator`:idx: + `manual.html#125 <manual.html#125>`_ + + `TAddress`:idx: + `system.html#372 <system.html#372>`_ + + `Taiocb`:idx: + `posix.html#204 <posix.html#204>`_ + + `TAllocfunc`:idx: + `zlib.html#108 <zlib.html#108>`_ + + `tan`:idx: + `math.html#125 <math.html#125>`_ + + `tanh`:idx: + `math.html#126 <math.html#126>`_ + + `TBaseLexer`:idx: + `lexbase.html#103 <lexbase.html#103>`_ + + `Tblkcnt`:idx: + `posix.html#143 <posix.html#143>`_ + + `Tblksize`:idx: + `posix.html#144 <posix.html#144>`_ + + `TCfgEvent`:idx: + `parsecfg.html#102 <parsecfg.html#102>`_ + + `TCfgEventKind`:idx: + `parsecfg.html#101 <parsecfg.html#101>`_ + + `TCfgParser`:idx: + `parsecfg.html#103 <parsecfg.html#103>`_ + + `tcgetpgrp`:idx: + `posix.html#1035 <posix.html#1035>`_ + + `TCharSet`:idx: + `strutils.html#101 <strutils.html#101>`_ + + `TClock`:idx: + `posix.html#145 <posix.html#145>`_ + + `TClockId`:idx: + `posix.html#146 <posix.html#146>`_ + + `TCmdLineKind`:idx: + `parseopt.html#101 <parseopt.html#101>`_ + + `TComplex`:idx: + `complex.html#101 <complex.html#101>`_ + + `tcsetpgrp`:idx: + `posix.html#1036 <posix.html#1036>`_ + + `TDev`:idx: + `posix.html#147 <posix.html#147>`_ + + `TDIR`:idx: + `posix.html#130 <posix.html#130>`_ + + `Tdirent`:idx: + `posix.html#131 <posix.html#131>`_ + + `telldir`:idx: + `posix.html#806 <posix.html#806>`_ + + `template`:idx: + `manual.html#209 <manual.html#209>`_ + + `TEndian`:idx: + `system.html#385 <system.html#385>`_ + + `Tfd_set`:idx: + `posix.html#201 <posix.html#201>`_ + + `Tfenv`:idx: + `posix.html#133 <posix.html#133>`_ + + `Tfexcept`:idx: + `posix.html#134 <posix.html#134>`_ + + `TFile`:idx: + `system.html#480 <system.html#480>`_ + + `TFileHandle`:idx: + `system.html#482 <system.html#482>`_ + + `TFileMode`:idx: + `system.html#481 <system.html#481>`_ + + `TFileStream`:idx: + `streams.html#119 <streams.html#119>`_ + + `TFloatClass`:idx: + `math.html#103 <math.html#103>`_ + + `Tflock`:idx: + `posix.html#132 <posix.html#132>`_ + + `T_FMT`:idx: + `posix.html#392 <posix.html#392>`_ + + `T_FMT_AMPM`:idx: + `posix.html#393 <posix.html#393>`_ + + `TFormatFlag`:idx: + `strtabs.html#111 <strtabs.html#111>`_ + + `TFreeFunc`:idx: + `zlib.html#109 <zlib.html#109>`_ + + `Tfsblkcnt`:idx: + `posix.html#148 <posix.html#148>`_ + + `Tfsfilcnt`:idx: + `posix.html#149 <posix.html#149>`_ + + `TFTW`:idx: + `posix.html#135 <posix.html#135>`_ + + `TGC_Strategy`:idx: + `system.html#463 <system.html#463>`_ + + `TGid`:idx: + `posix.html#150 <posix.html#150>`_ + + `TGlob`:idx: + `posix.html#136 <posix.html#136>`_ + + `TGroup`:idx: + `posix.html#137 <posix.html#137>`_ + + `THash`:idx: + `hashes.html#101 <hashes.html#101>`_ + + `THOUSEP`:idx: + `posix.html#440 <posix.html#440>`_ + + `Ticonv`:idx: + `posix.html#138 <posix.html#138>`_ + + `Tid`:idx: + `posix.html#151 <posix.html#151>`_ + + `time`:idx: + `posix.html#1112 <posix.html#1112>`_ + + `TimeInfoToTime`:idx: + `times.html#108 <times.html#108>`_ + + `TIMER_ABSTIME`:idx: + `posix.html#699 <posix.html#699>`_ + + `timer_create`:idx: + `posix.html#1113 <posix.html#1113>`_ + + `timer_delete`:idx: + `posix.html#1114 <posix.html#1114>`_ + + `timer_getoverrun`:idx: + `posix.html#1116 <posix.html#1116>`_ + + `timer_gettime`:idx: + `posix.html#1115 <posix.html#1115>`_ + + `timer_settime`:idx: + `posix.html#1117 <posix.html#1117>`_ + + `times`:idx: + `nimrodc.html#119 <nimrodc.html#119>`_ + + `timezone`:idx: + `posix.html#702 <posix.html#702>`_ + + `Tino`:idx: + `posix.html#152 <posix.html#152>`_ + + `TInternalState`:idx: + `zlib.html#110 <zlib.html#110>`_ + + `Tipc_perm`:idx: + `posix.html#182 <posix.html#182>`_ + + `titimerspec`:idx: + `posix.html#188 <posix.html#188>`_ + + `TKey`:idx: + `posix.html#153 <posix.html#153>`_ + + `Tlconv`:idx: + `posix.html#139 <posix.html#139>`_ + + `Tmcontext`:idx: + `posix.html#202 <posix.html#202>`_ + + `TMode`:idx: + `posix.html#154 <posix.html#154>`_ + + `TMonth`:idx: + `times.html#101 <times.html#101>`_ + + `TMqAttr`:idx: + `posix.html#141 <posix.html#141>`_ + + `TMqd`:idx: + `posix.html#140 <posix.html#140>`_ + + `Tnl_catd`:idx: + `posix.html#198 <posix.html#198>`_ + + `TNlink`:idx: + `posix.html#155 <posix.html#155>`_ + + `Tnl_item`:idx: + `posix.html#197 <posix.html#197>`_ + + `toBiggestFloat`:idx: + `system.html#401 <system.html#401>`_ + + `toBiggestInt`:idx: + `system.html#403 <system.html#403>`_ + + `toBin`:idx: + `strutils.html#142 <strutils.html#142>`_ + + `TObject`:idx: + `system.html#131 <system.html#131>`_ + + `TOff`:idx: + `posix.html#156 <posix.html#156>`_ + + `toFloat`:idx: + `system.html#400 <system.html#400>`_ + + `toHex`:idx: + `strutils.html#128 <strutils.html#128>`_ + + `toInt`:idx: + `system.html#402 <system.html#402>`_ + + `toLower`:idx: + * `strutils.html#106 <strutils.html#106>`_ + * `strutils.html#107 <strutils.html#107>`_ + + `toOct`:idx: + `strutils.html#141 <strutils.html#141>`_ + + `toOctal`:idx: + `strutils.html#118 <strutils.html#118>`_ + + `TOptParser`:idx: + `parseopt.html#102 <parseopt.html#102>`_ + + `toString`:idx: + `strutils.html#133 <strutils.html#133>`_ + + `toU16`:idx: + `system.html#179 <system.html#179>`_ + + `toU32`:idx: + `system.html#180 <system.html#180>`_ + + `toU8`:idx: + `system.html#178 <system.html#178>`_ + + `toUpper`:idx: + * `strutils.html#108 <strutils.html#108>`_ + * `strutils.html#109 <strutils.html#109>`_ + + `TPasswd`:idx: + `posix.html#142 <posix.html#142>`_ + + `TPathComponent`:idx: + `os.html#152 <os.html#152>`_ + + `TPid`:idx: + `posix.html#157 <posix.html#157>`_ + + `Tposix_spawnattr`:idx: + `posix.html#205 <posix.html#205>`_ + + `Tposix_spawn_file_actions`:idx: + `posix.html#206 <posix.html#206>`_ + + `Tposix_typed_mem_info`:idx: + `posix.html#185 <posix.html#185>`_ + + `Tpthread`:idx: + `posix.html#170 <posix.html#170>`_ + + `Tpthread_attr`:idx: + `posix.html#158 <posix.html#158>`_ + + `Tpthread_barrier`:idx: + `posix.html#159 <posix.html#159>`_ + + `Tpthread_barrierattr`:idx: + `posix.html#160 <posix.html#160>`_ + + `Tpthread_cond`:idx: + `posix.html#161 <posix.html#161>`_ + + `Tpthread_condattr`:idx: + `posix.html#162 <posix.html#162>`_ + + `Tpthread_key`:idx: + `posix.html#163 <posix.html#163>`_ + + `Tpthread_mutex`:idx: + `posix.html#164 <posix.html#164>`_ + + `Tpthread_mutexattr`:idx: + `posix.html#165 <posix.html#165>`_ + + `Tpthread_once`:idx: + `posix.html#166 <posix.html#166>`_ + + `Tpthread_rwlock`:idx: + `posix.html#167 <posix.html#167>`_ + + `Tpthread_rwlockattr`:idx: + `posix.html#168 <posix.html#168>`_ + + `Tpthread_spinlock`:idx: + `posix.html#169 <posix.html#169>`_ + + `traced`:idx: + * `manual.html#159 <manual.html#159>`_ + * `tut1.html#121 <tut1.html#121>`_ + + `TResult`:idx: + `system.html#155 <system.html#155>`_ + + `truncate`:idx: + `posix.html#1037 <posix.html#1037>`_ + + `try`:idx: + * `manual.html#185 <manual.html#185>`_ + * `tut2.html#108 <tut2.html#108>`_ + + `Tsched_param`:idx: + `posix.html#199 <posix.html#199>`_ + + `TSem`:idx: + `posix.html#181 <posix.html#181>`_ + + `TSigaction`:idx: + `posix.html#193 <posix.html#193>`_ + + `Tsig_atomic`:idx: + `posix.html#189 <posix.html#189>`_ + + `TsigEvent`:idx: + `posix.html#191 <posix.html#191>`_ + + `TsigInfo`:idx: + `posix.html#196 <posix.html#196>`_ + + `Tsigset`:idx: + `posix.html#190 <posix.html#190>`_ + + `TSigStack`:idx: + `posix.html#195 <posix.html#195>`_ + + `TsigVal`:idx: + `posix.html#192 <posix.html#192>`_ + + `TSqlChar`:idx: + `odbcsql.html#101 <odbcsql.html#101>`_ + + `TSqlDouble`:idx: + `odbcsql.html#113 <odbcsql.html#113>`_ + + `TSqlFloat`:idx: + `odbcsql.html#114 <odbcsql.html#114>`_ + + `TSqlHandle`:idx: + `odbcsql.html#104 <odbcsql.html#104>`_ + + `TSqlHDBC`:idx: + `odbcsql.html#106 <odbcsql.html#106>`_ + + `TSqlHDesc`:idx: + `odbcsql.html#108 <odbcsql.html#108>`_ + + `TSqlHEnv`:idx: + `odbcsql.html#105 <odbcsql.html#105>`_ + + `TSqlHStmt`:idx: + `odbcsql.html#107 <odbcsql.html#107>`_ + + `TSqlHWND`:idx: + `odbcsql.html#115 <odbcsql.html#115>`_ + + `TSqlInteger`:idx: + `odbcsql.html#109 <odbcsql.html#109>`_ + + `TSqlPointer`:idx: + `odbcsql.html#111 <odbcsql.html#111>`_ + + `TSqlReal`:idx: + `odbcsql.html#112 <odbcsql.html#112>`_ + + `TSqlSmallInt`:idx: + `odbcsql.html#102 <odbcsql.html#102>`_ + + `TSqlUInteger`:idx: + `odbcsql.html#110 <odbcsql.html#110>`_ + + `TSqlUSmallInt`:idx: + `odbcsql.html#103 <odbcsql.html#103>`_ + + `TStack`:idx: + `posix.html#194 <posix.html#194>`_ + + `TStat`:idx: + `posix.html#183 <posix.html#183>`_ + + `TStatvfs`:idx: + `posix.html#184 <posix.html#184>`_ + + `TStream`:idx: + `streams.html#102 <streams.html#102>`_ + + `TStringStream`:idx: + `streams.html#116 <streams.html#116>`_ + + `TStringTable`:idx: + `strtabs.html#102 <strtabs.html#102>`_ + + `TStringTableMode`:idx: + `strtabs.html#101 <strtabs.html#101>`_ + + `Tsuseconds`:idx: + `posix.html#171 <posix.html#171>`_ + + `Ttime`:idx: + `posix.html#172 <posix.html#172>`_ + + `TTime`:idx: + `times.html#103 <times.html#103>`_ + + `TTimeInfo`:idx: + `times.html#104 <times.html#104>`_ + + `Ttimer`:idx: + `posix.html#173 <posix.html#173>`_ + + `Ttimespec`:idx: + `posix.html#187 <posix.html#187>`_ + + `Ttimeval`:idx: + `posix.html#200 <posix.html#200>`_ + + `Ttm`:idx: + `posix.html#186 <posix.html#186>`_ + + `Ttrace_attr`:idx: + `posix.html#174 <posix.html#174>`_ + + `Ttrace_event_id`:idx: + `posix.html#175 <posix.html#175>`_ + + `Ttrace_event_set`:idx: + `posix.html#176 <posix.html#176>`_ + + `Ttrace_id`:idx: + `posix.html#177 <posix.html#177>`_ + + `ttyname`:idx: + `posix.html#1038 <posix.html#1038>`_ + + `ttyname_r`:idx: + `posix.html#1039 <posix.html#1039>`_ + + `Tucontext`:idx: + `posix.html#203 <posix.html#203>`_ + + `Tuid`:idx: + `posix.html#178 <posix.html#178>`_ + + `tuple`:idx: + `manual.html#154 <manual.html#154>`_ + + `Tuseconds`:idx: + `posix.html#179 <posix.html#179>`_ + + `Tutsname`:idx: + `posix.html#180 <posix.html#180>`_ + + `TWeekDay`:idx: + `times.html#102 <times.html#102>`_ + + `type`:idx: + * `manual.html#102 <manual.html#102>`_ + * `manual.html#140 <manual.html#140>`_ + * `manual.html#206 <manual.html#206>`_ + + `type casts`:idx: + `tut2.html#101 <tut2.html#101>`_ + + `type conversions`:idx: + `tut2.html#102 <tut2.html#102>`_ + + `type parameters`:idx: + * `manual.html#208 <manual.html#208>`_ + * `tut2.html#110 <tut2.html#110>`_ + + `type suffix`:idx: + `manual.html#137 <manual.html#137>`_ + + `TZipArchive`:idx: + `zipfiles.html#101 <zipfiles.html#101>`_ + + `Tzip_source_callback`:idx: + `libzip.html#102 <libzip.html#102>`_ + + `Tzip_source_cmd`:idx: + `libzip.html#101 <libzip.html#101>`_ + + `Tzip_stat`:idx: + `libzip.html#104 <libzip.html#104>`_ + + `tzset`:idx: + `posix.html#1118 <posix.html#1118>`_ + + `TZStream`:idx: + `zlib.html#112 <zlib.html#112>`_ + + `TZStreamRec`:idx: + `zlib.html#113 <zlib.html#113>`_ + + `ualarm`:idx: + `posix.html#1040 <posix.html#1040>`_ + + `Uint`:idx: + `zlib.html#101 <zlib.html#101>`_ + + `Ulong`:idx: + `zlib.html#102 <zlib.html#102>`_ + + `Ulongf`:idx: + `zlib.html#103 <zlib.html#103>`_ + + `umask`:idx: + `posix.html#1066 <posix.html#1066>`_ + + `uname`:idx: + `posix.html#866 <posix.html#866>`_ + + `unchecked runtime error`:idx: + `manual.html#111 <manual.html#111>`_ + + `uncompress`:idx: + `zlib.html#156 <zlib.html#156>`_ + + `undef`:idx: + `manual.html#223 <manual.html#223>`_ + + `UnixToNativePath`:idx: + `os.html#124 <os.html#124>`_ + + `unlink`:idx: + `posix.html#1041 <posix.html#1041>`_ + + `unsigned integer`:idx: + * `manual.html#142 <manual.html#142>`_ + * `tut1.html#108 <tut1.html#108>`_ + + `unsigned operations`:idx: + * `manual.html#143 <manual.html#143>`_ + * `tut1.html#109 <tut1.html#109>`_ + + `untraced`:idx: + * `manual.html#160 <manual.html#160>`_ + * `tut1.html#122 <tut1.html#122>`_ + + `usleep`:idx: + `posix.html#1042 <posix.html#1042>`_ + + `Var`:idx: + `manual.html#178 <manual.html#178>`_ + + `varargs`:idx: + `nimrodc.html#106 <nimrodc.html#106>`_ + + `variant`:idx: + * `manual.html#156 <manual.html#156>`_ + * `tut2.html#103 <tut2.html#103>`_ + + `vertical tabulator`:idx: + `manual.html#126 <manual.html#126>`_ + + `vfork`:idx: + `posix.html#1043 <posix.html#1043>`_ + + `volatile`:idx: + `nimrodc.html#111 <nimrodc.html#111>`_ + + `wait`:idx: + `posix.html#1119 <posix.html#1119>`_ + + `waitid`:idx: + `posix.html#1120 <posix.html#1120>`_ + + `waitpid`:idx: + `posix.html#1121 <posix.html#1121>`_ + + `walkDir`:idx: + `os.html#153 <os.html#153>`_ + + `walkFiles`:idx: + * `os.html#151 <os.html#151>`_ + * `zipfiles.html#110 <zipfiles.html#110>`_ + + `warning`:idx: + * `dialogs.html#103 <dialogs.html#103>`_ + * `manual.html#220 <manual.html#220>`_ + * `manual.html#226 <manual.html#226>`_ + + `WCONTINUED`:idx: + `posix.html#714 <posix.html#714>`_ + + `WEXITED`:idx: + `posix.html#712 <posix.html#712>`_ + + `WEXITSTATUS`:idx: + `posix.html#705 <posix.html#705>`_ + + `when`:idx: + * `manual.html#182 <manual.html#182>`_ + * `tut1.html#106 <tut1.html#106>`_ + + `while`:idx: + `manual.html#194 <manual.html#194>`_ + + `Whitespace`:idx: + `strutils.html#102 <strutils.html#102>`_ + + `WIFCONTINUED`:idx: + `posix.html#706 <posix.html#706>`_ + + `WIFEXITED`:idx: + `posix.html#707 <posix.html#707>`_ + + `WIFSIGNALED`:idx: + `posix.html#708 <posix.html#708>`_ + + `WIFSTOPPED`:idx: + `posix.html#709 <posix.html#709>`_ + + `WNOHANG`:idx: + `posix.html#703 <posix.html#703>`_ + + `WNOWAIT`:idx: + `posix.html#715 <posix.html#715>`_ + + `W_OK`:idx: + `posix.html#480 <posix.html#480>`_ + + `write`:idx: + * `posix.html#1044 <posix.html#1044>`_ + * `system.html#493 <system.html#493>`_ + * `system.html#494 <system.html#494>`_ + * `system.html#495 <system.html#495>`_ + * `system.html#496 <system.html#496>`_ + * `system.html#497 <system.html#497>`_ + * `system.html#498 <system.html#498>`_ + * `system.html#499 <system.html#499>`_ + * `streams.html#103 <streams.html#103>`_ + * `streams.html#104 <streams.html#104>`_ + + `writeBuffer`:idx: + `system.html#509 <system.html#509>`_ + + `writeBytes`:idx: + `system.html#507 <system.html#507>`_ + + `writeChars`:idx: + `system.html#508 <system.html#508>`_ + + `writeln`:idx: + * `system.html#501 <system.html#501>`_ + * `system.html#502 <system.html#502>`_ + + `WSTOPPED`:idx: + `posix.html#713 <posix.html#713>`_ + + `WSTOPSIG`:idx: + `posix.html#710 <posix.html#710>`_ + + `WTERMSIG`:idx: + `posix.html#711 <posix.html#711>`_ + + `WUNTRACED`:idx: + `posix.html#704 <posix.html#704>`_ + + `X_OK`:idx: + `posix.html#481 <posix.html#481>`_ + + `xor`:idx: + * `system.html#118 <system.html#118>`_ + * `system.html#241 <system.html#241>`_ + * `system.html#242 <system.html#242>`_ + * `system.html#243 <system.html#243>`_ + * `system.html#244 <system.html#244>`_ + * `system.html#245 <system.html#245>`_ + + `YESEXPR`:idx: + `posix.html#441 <posix.html#441>`_ + + `yield`:idx: + `manual.html#191 <manual.html#191>`_ + + `Z_ASCII`:idx: + `zlib.html#138 <zlib.html#138>`_ + + `Z_BEST_COMPRESSION`:idx: + `zlib.html#132 <zlib.html#132>`_ + + `Z_BEST_SPEED`:idx: + `zlib.html#131 <zlib.html#131>`_ + + `Z_BINARY`:idx: + `zlib.html#137 <zlib.html#137>`_ + + `Z_BUF_ERROR`:idx: + `zlib.html#128 <zlib.html#128>`_ + + `Z_DATA_ERROR`:idx: + `zlib.html#126 <zlib.html#126>`_ + + `Z_DEFAULT_COMPRESSION`:idx: + `zlib.html#133 <zlib.html#133>`_ + + `Z_DEFAULT_STRATEGY`:idx: + `zlib.html#136 <zlib.html#136>`_ + + `Z_DEFLATED`:idx: + `zlib.html#140 <zlib.html#140>`_ + + `ze`:idx: + * `system.html#172 <system.html#172>`_ + * `system.html#173 <system.html#173>`_ + + `ze64`:idx: + * `system.html#174 <system.html#174>`_ + * `system.html#175 <system.html#175>`_ + * `system.html#176 <system.html#176>`_ + * `system.html#177 <system.html#177>`_ + + `zeroMem`:idx: + `system.html#409 <system.html#409>`_ + + `Z_ERRNO`:idx: + `zlib.html#124 <zlib.html#124>`_ + + `zError`:idx: + `zlib.html#184 <zlib.html#184>`_ + + `Z_FILTERED`:idx: + `zlib.html#134 <zlib.html#134>`_ + + `Z_FINISH`:idx: + `zlib.html#120 <zlib.html#120>`_ + + `Z_FULL_FLUSH`:idx: + `zlib.html#119 <zlib.html#119>`_ + + `Z_HUFFMAN_ONLY`:idx: + `zlib.html#135 <zlib.html#135>`_ + + `zip_add`:idx: + `libzip.html#170 <libzip.html#170>`_ + + `zip_add_dir`:idx: + `libzip.html#171 <libzip.html#171>`_ + + `ZIP_AFL_TORRENT`:idx: + `libzip.html#116 <libzip.html#116>`_ + + `ZIP_CHECKCONS`:idx: + `libzip.html#110 <libzip.html#110>`_ + + `zip_close`:idx: + `libzip.html#172 <libzip.html#172>`_ + + `ZIP_CM_BZIP2`:idx: + `libzip.html#155 <libzip.html#155>`_ + + `ZIP_CM_DEFAULT`:idx: + `libzip.html#144 <libzip.html#144>`_ + + `ZIP_CM_DEFLATE`:idx: + `libzip.html#152 <libzip.html#152>`_ + + `ZIP_CM_DEFLATE64`:idx: + `libzip.html#153 <libzip.html#153>`_ + + `ZIP_CM_IMPLODE`:idx: + `libzip.html#151 <libzip.html#151>`_ + + `ZIP_CM_LZ77`:idx: + `libzip.html#158 <libzip.html#158>`_ + + `ZIP_CM_LZMA`:idx: + `libzip.html#156 <libzip.html#156>`_ + + `ZIP_CM_PKWARE_IMPLODE`:idx: + `libzip.html#154 <libzip.html#154>`_ + + `ZIP_CM_PPMD`:idx: + `libzip.html#160 <libzip.html#160>`_ + + `ZIP_CM_REDUCE_1`:idx: + `libzip.html#147 <libzip.html#147>`_ + + `ZIP_CM_REDUCE_2`:idx: + `libzip.html#148 <libzip.html#148>`_ + + `ZIP_CM_REDUCE_3`:idx: + `libzip.html#149 <libzip.html#149>`_ + + `ZIP_CM_REDUCE_4`:idx: + `libzip.html#150 <libzip.html#150>`_ + + `ZIP_CM_SHRINK`:idx: + `libzip.html#146 <libzip.html#146>`_ + + `ZIP_CM_STORE`:idx: + `libzip.html#145 <libzip.html#145>`_ + + `ZIP_CM_TERSE`:idx: + `libzip.html#157 <libzip.html#157>`_ + + `ZIP_CM_WAVPACK`:idx: + `libzip.html#159 <libzip.html#159>`_ + + `ZIP_CREATE`:idx: + `libzip.html#108 <libzip.html#108>`_ + + `zip_delete`:idx: + `libzip.html#173 <libzip.html#173>`_ + + `ZIP_EM_NONE`:idx: + `libzip.html#161 <libzip.html#161>`_ + + `ZIP_EM_TRAD_PKWARE`:idx: + `libzip.html#162 <libzip.html#162>`_ + + `ZIP_EM_UNKNOWN`:idx: + `libzip.html#163 <libzip.html#163>`_ + + `ZIP_ER_CHANGED`:idx: + `libzip.html#132 <libzip.html#132>`_ + + `ZIP_ER_CLOSE`:idx: + `libzip.html#120 <libzip.html#120>`_ + + `ZIP_ER_COMPNOTSUPP`:idx: + `libzip.html#133 <libzip.html#133>`_ + + `ZIP_ER_CRC`:idx: + `libzip.html#124 <libzip.html#124>`_ + + `ZIP_ER_DELETED`:idx: + `libzip.html#140 <libzip.html#140>`_ + + `ZIP_ER_EOF`:idx: + `libzip.html#134 <libzip.html#134>`_ + + `ZIP_ER_EXISTS`:idx: + `libzip.html#127 <libzip.html#127>`_ + + `ZIP_ER_INCONS`:idx: + `libzip.html#138 <libzip.html#138>`_ + + `ZIP_ER_INTERNAL`:idx: + `libzip.html#137 <libzip.html#137>`_ + + `ZIP_ER_INVAL`:idx: + `libzip.html#135 <libzip.html#135>`_ + + `ZIP_ER_MEMORY`:idx: + `libzip.html#131 <libzip.html#131>`_ + + `ZIP_ER_MULTIDISK`:idx: + `libzip.html#118 <libzip.html#118>`_ + + `ZIP_ER_NOENT`:idx: + `libzip.html#126 <libzip.html#126>`_ + + `ZIP_ER_NOZIP`:idx: + `libzip.html#136 <libzip.html#136>`_ + + `ZIP_ER_OK`:idx: + `libzip.html#117 <libzip.html#117>`_ + + `ZIP_ER_OPEN`:idx: + `libzip.html#128 <libzip.html#128>`_ + + `ZIP_ER_READ`:idx: + `libzip.html#122 <libzip.html#122>`_ + + `ZIP_ER_REMOVE`:idx: + `libzip.html#139 <libzip.html#139>`_ + + `ZIP_ER_RENAME`:idx: + `libzip.html#119 <libzip.html#119>`_ + + `zip_error_clear`:idx: + `libzip.html#174 <libzip.html#174>`_ + + `zip_error_get`:idx: + `libzip.html#175 <libzip.html#175>`_ + + `zip_error_get_sys_type`:idx: + `libzip.html#176 <libzip.html#176>`_ + + `zip_error_to_str`:idx: + `libzip.html#177 <libzip.html#177>`_ + + `ZIP_ER_SEEK`:idx: + `libzip.html#121 <libzip.html#121>`_ + + `ZIP_ER_TMPOPEN`:idx: + `libzip.html#129 <libzip.html#129>`_ + + `ZIP_ER_WRITE`:idx: + `libzip.html#123 <libzip.html#123>`_ + + `ZIP_ER_ZIPCLOSED`:idx: + `libzip.html#125 <libzip.html#125>`_ + + `ZIP_ER_ZLIB`:idx: + `libzip.html#130 <libzip.html#130>`_ + + `ZIP_ET_NONE`:idx: + `libzip.html#141 <libzip.html#141>`_ + + `ZIP_ET_SYS`:idx: + `libzip.html#142 <libzip.html#142>`_ + + `ZIP_ET_ZLIB`:idx: + `libzip.html#143 <libzip.html#143>`_ + + `ZIP_EXCL`:idx: + `libzip.html#109 <libzip.html#109>`_ + + `zip_fclose`:idx: + `libzip.html#178 <libzip.html#178>`_ + + `zip_file_error_clear`:idx: + `libzip.html#179 <libzip.html#179>`_ + + `zip_file_error_get`:idx: + `libzip.html#180 <libzip.html#180>`_ + + `zip_file_strerror`:idx: + `libzip.html#181 <libzip.html#181>`_ + + `ZIP_FL_COMPRESSED`:idx: + `libzip.html#113 <libzip.html#113>`_ + + `ZIP_FL_NOCASE`:idx: + `libzip.html#111 <libzip.html#111>`_ + + `ZIP_FL_NODIR`:idx: + `libzip.html#112 <libzip.html#112>`_ + + `ZIP_FL_RECOMPRESS`:idx: + `libzip.html#115 <libzip.html#115>`_ + + `ZIP_FL_UNCHANGED`:idx: + `libzip.html#114 <libzip.html#114>`_ + + `zip_fopen`:idx: + `libzip.html#182 <libzip.html#182>`_ + + `zip_fopen_index`:idx: + `libzip.html#183 <libzip.html#183>`_ + + `zip_fread`:idx: + `libzip.html#184 <libzip.html#184>`_ + + `zip_get_archive_comment`:idx: + `libzip.html#185 <libzip.html#185>`_ + + `zip_get_archive_flag`:idx: + `libzip.html#186 <libzip.html#186>`_ + + `zip_get_file_comment`:idx: + `libzip.html#187 <libzip.html#187>`_ + + `zip_get_name`:idx: + `libzip.html#188 <libzip.html#188>`_ + + `zip_get_num_files`:idx: + `libzip.html#189 <libzip.html#189>`_ + + `zip_name_locate`:idx: + `libzip.html#190 <libzip.html#190>`_ + + `zip_open`:idx: + `libzip.html#191 <libzip.html#191>`_ + + `zip_rename`:idx: + `libzip.html#192 <libzip.html#192>`_ + + `zip_replace`:idx: + `libzip.html#193 <libzip.html#193>`_ + + `zip_set_archive_comment`:idx: + `libzip.html#194 <libzip.html#194>`_ + + `zip_set_archive_flag`:idx: + `libzip.html#195 <libzip.html#195>`_ + + `zip_set_file_comment`:idx: + `libzip.html#196 <libzip.html#196>`_ + + `zip_source_buffer`:idx: + `libzip.html#197 <libzip.html#197>`_ + + `ZIP_SOURCE_CLOSE`:idx: + `libzip.html#166 <libzip.html#166>`_ + + `ZIP_SOURCE_ERROR`:idx: + `libzip.html#168 <libzip.html#168>`_ + + `zip_source_file`:idx: + `libzip.html#198 <libzip.html#198>`_ + + `zip_source_filep`:idx: + `libzip.html#199 <libzip.html#199>`_ + + `zip_source_free`:idx: + `libzip.html#200 <libzip.html#200>`_ + + `zip_source_function`:idx: + `libzip.html#201 <libzip.html#201>`_ + + `ZIP_SOURCE_OPEN`:idx: + `libzip.html#164 <libzip.html#164>`_ + + `ZIP_SOURCE_READ`:idx: + `libzip.html#165 <libzip.html#165>`_ + + `ZIP_SOURCE_STAT`:idx: + `libzip.html#167 <libzip.html#167>`_ + + `zip_source_zip`:idx: + `libzip.html#202 <libzip.html#202>`_ + + `zip_stat`:idx: + `libzip.html#203 <libzip.html#203>`_ + + `zip_stat_index`:idx: + `libzip.html#204 <libzip.html#204>`_ + + `zip_stat_init`:idx: + `libzip.html#205 <libzip.html#205>`_ + + `zip_strerror`:idx: + `libzip.html#206 <libzip.html#206>`_ + + `zip_unchange`:idx: + `libzip.html#207 <libzip.html#207>`_ + + `zip_unchange_all`:idx: + `libzip.html#208 <libzip.html#208>`_ + + `zip_unchange_archive`:idx: + `libzip.html#209 <libzip.html#209>`_ + + `zlibAllocMem`:idx: + `zlib.html#187 <zlib.html#187>`_ + + `zlibFreeMem`:idx: + `zlib.html#188 <zlib.html#188>`_ + + `zlibVersion`:idx: + `zlib.html#142 <zlib.html#142>`_ + + `Z_MEM_ERROR`:idx: + `zlib.html#127 <zlib.html#127>`_ + + `Z_NEED_DICT`:idx: + `zlib.html#123 <zlib.html#123>`_ + + `Z_NO_COMPRESSION`:idx: + `zlib.html#130 <zlib.html#130>`_ + + `Z_NO_FLUSH`:idx: + `zlib.html#116 <zlib.html#116>`_ + + `Z_NULL`:idx: + `zlib.html#141 <zlib.html#141>`_ + + `z_off_t`:idx: + `zlib.html#105 <zlib.html#105>`_ + + `Z_OK`:idx: + `zlib.html#121 <zlib.html#121>`_ + + `Z_PARTIAL_FLUSH`:idx: + `zlib.html#117 <zlib.html#117>`_ + + `Z_STREAM_END`:idx: + `zlib.html#122 <zlib.html#122>`_ + + `Z_STREAM_ERROR`:idx: + `zlib.html#125 <zlib.html#125>`_ + + `Z_SYNC_FLUSH`:idx: + `zlib.html#118 <zlib.html#118>`_ + + `Z_UNKNOWN`:idx: + `zlib.html#139 <zlib.html#139>`_ + + `Z_VERSION_ERROR`:idx: `zlib.html#129 <zlib.html#129>`_ \ No newline at end of file diff --git a/doc/tut1.txt b/doc/tut1.txt new file mode 100644 index 000000000..ef56c2caa --- /dev/null +++ b/doc/tut1.txt @@ -0,0 +1,1382 @@ +============================ +The Nimrod Tutorial (Part I) +============================ + +:Author: Andreas Rumpf +:Version: |nimrodversion| + +.. contents:: + +Introduction +============ + + "Before you run you must learn to walk." + +This document is a tutorial for the programming language *Nimrod*. After this +tutorial you will have a decent knowledge about Nimrod. This tutorial assumes +that you are familiar with basic programming concepts like variables, types +or statements. + + +The first program +================= + +We start the tour with a modified "hallo world" program: + +.. code-block:: Nimrod + # This is a comment + Echo("What's your name? ") + var name: string = readLine(stdin) + Echo("Hi, ", name, "!") + + +Save this code to the file "greetings.nim". Now compile and run it:: + + nimrod compile --run greetings.nim + +As you see, with the ``--run`` switch Nimrod executes the file automatically +after compilation. You can even give your program command line arguments by +appending them after the filename:: + + nimrod compile --run greetings.nim arg1 arg2 + +The most used commands and switches have abbreviations, so you can also use:: + + nimrod c -r greetings.nim + +Though it should be pretty obvious what the program does, I will explain the +syntax: Statements which are not indented are executed when the program +starts. Indentation is Nimrod's way of grouping statements. String literals +are enclosed in double quotes. The ``var`` statement declares a new variable +named ``name`` of type ``string`` with the value that is returned by the +``readline`` procedure. Since the compiler knows that ``readline`` returns +a string, you can leave out the type in the declaration (this is called +`local type inference`:idx:). So this will work too: + +.. code-block:: Nimrod + var name = readline(stdin) + +Note that this is basically the only form of type inference that exists in +Nimrod: It is a good compromise between brevity and readability. + +The "hallo world" program contains several identifiers that are already +known to the compiler: ``echo``, ``readLine``, etc. These built-in items are +declared in the system_ module which is implicitly imported by any other module. + + +Lexical elements +================ + +Let us look at Nimrod's lexical elements in more detail: Like other +programming languages Nimrod consists of (string) literals, identifiers, +keywords, comments, operators, and other punctation marks. Case is +*insignificant* in Nimrod and even underscores are ignored: +``This_is_an_identifier`` and this is the same identifier +``ThisIsAnIdentifier``. This feature enables you to use other +peoples code without bothering about a naming convention that conflicts with +yours. It also frees you from remembering the exact spelling of an identifier +(was it ``parseURL`` or ``parseUrl`` or ``parse_URL``?). + + +String and character literals +----------------------------- + +String literals are enclosed in double quotes; character literals in single +quotes. Special characters are escaped with ``\``: ``\n`` means newline, ``\t`` +means tabulator, etc. There exist also *raw* string literals: + +.. code-block:: Nimrod + r"C:\program files\nim" + +In raw literals the backslash is not an escape character, so they fit +the principle *what you see is what you get*. + +The third and last way to write string literals are *long string literals*. +They are written with three quotes: ``""" ... """``; they can span over +multiple lines and the ``\`` is not an escape character either. They are very +useful for embedding HTML code templates for example. + + +Comments +-------- + +`Comments`:idx: start anywhere outside a string or character literal with the +hash character ``#``. Documentation comments start with ``##``. +Comments consist of a concatenation of `comment pieces`:idx:. A comment piece +starts with ``#`` and runs until the end of the line. The end of line characters +belong to the piece. If the next line only consists of a comment piece which is +aligned to the preceding one, it does not start a new comment: + +.. code-block:: nimrod + + i = 0 # This is a single comment over multiple lines belonging to the + # assignment statement. The scanner merges these two pieces. + # This is a new comment belonging to the current block, but to no particular + # statement. + i = i + 1 # This a new comment that is NOT + echo(i) # continued here, because this comment refers to the echo statement + +Comments are tokens; they are only allowed at certain places in the input file +as they belong to the syntax tree! This feature enables perfect source-to-source +transformations (such as pretty-printing) and superior documentation generators. +A nice side-effect is that the human reader of the code always knows exactly +which code snippet the comment refers to. Since comments are a proper part of +the syntax, watch their indentation: + +.. code-block:: + Echo("Hallo!") + # comment has the same indentation as above statement -> fine + Echo("Hi!") + # comment has not the right indentation -> syntax error! + + +Numbers +------- + +Numerical literals are written as in most other languages. As a special twist, +underscores are allowed for better readability: ``1_000_000`` (one million). +A number that contains a dot (or 'e' or 'E') is a floating point literal: +``1.0e9`` (one million). Hexadecimal literals are prefixed with ``0x``, +binary literals with ``0b`` and octal literals with ``0c``. A leading zero +alone does not produce an octal. + + +The var statement +================= +The var statement declares a new local or global variable: + +.. code-block:: + var x, y: int # declares x and y to have the type ``int`` + +Indentation can be used after the ``var`` keyword to list a whole section of +variables: + +.. code-block:: + var + x, y: int + # a comment can occur here too + a, b, c: string + + +The assignment statement +======================== + +The assignment statement assigns a new value to a variable or more generally +to a storage location: + +.. code-block:: + var x = "abc" # introduces a new variable `x` and assigns a value to it + x = "xyz" # assigns a new value to `x` + +The ``=`` is called the *assignment operator*. The assignment operator cannot +be overloaded, overwritten or forbidden, but this might change in a future +version of Nimrod. + + +Constants +========= + +`Constants`:idx: are symbols which are bound to a value. The constant's value +cannot change. The compiler must be able to evaluate the expression in a +constant declaration at compile time: + +.. code-block:: nimrod + const x = "abc" # the constant x contains the string "abc" + +Indentation can be used after the ``const`` keyword to list a whole section of +constants: + +.. code-block:: + const + x = 1 + # a comment can occur here too + y = 2 + z = y + 5 # simple computations are possible + + +Control flow statements +======================= + +The greetings program consists of 3 statements that are executed sequentially. +Only the most primitive programs can get away with that: Branching and looping +are needed too. + + +If statement +------------ + +The if statement is one way to branch the control flow: + +.. code-block:: nimrod + var name = readLine(stdin) + if name == "": + echo("Poor soul, you lost your name?") + elif name == "name": + echo("Very funny, your name is name.") + else: + Echo("Hi, ", name, "!") + +There can be zero or more elif parts, and the else part is optional. The +keyword ``elif`` is short for ``else if``, and is useful to avoid excessive +indentation. (The ``""`` is the empty string. It contains no characters.) + + +Case statement +-------------- + +Another way to branch is provided by the case statement. A case statement is +a multi-branch: + +.. code-block:: nimrod + var name = readLine(stdin) + case name + of "": + echo("Poor soul, you lost your name?") + of "name": + echo("Very funny, your name is name.") + of "Dave", "Frank": + echo("Cool name!") + else: + Echo("Hi, ", name, "!") + +As can be seen, for an ``of`` branch a comma separated list of values is also +allowed. + +The case statement can deal with integers, other ordinal types and strings. +(What an ordinal type is will be explained soon.) +For integers or other ordinal types value ranges are also possible: + +.. code-block:: nimrod + # this statement will be explained later: + from strutils import parseInt + + Echo("A number please: ") + var n = parseInt(readLine(stdin)) + case n + of 0..2, 4..7: Echo("The number is in the set: {0, 1, 2, 4, 5, 6, 7}") + of 3, 8: Echo("The number is 3 or 8") + +However, the above code does not compile: The reason is that you have to cover +every value that ``n`` may contain, but the code only handles the values +``0..8``. Since it is not very practical to list every other possible integer +(though it is possible thanks to the range notation!), we fix this by telling +the compiler that for every other value nothing should be done: + +.. code-block:: nimrod + ... + case n + of 0..2, 4..7: Echo("The number is in the set: {0, 1, 2, 4, 5, 6, 7}") + of 3, 8: Echo("The number is 3 or 8") + else: nil + +The ``nil`` statement is a *do nothing* statement. The compiler knows that a +case statement with an else part cannot fail and thus the error disappers. Note +that it is impossible to cover any possible string value: That is why there is +no such compiler check for string cases. + +In general the case statement is used for subrange types or enumerations where +it is of great help that the compiler checks that you covered any possible +value. + + + +While statement +--------------- + +The while statement is a simple looping construct: + +.. code-block:: nimrod + + Echo("What's your name? ") + var name = readLine(stdin) + while name == "": + Echo("Please tell me your name: ") + name = readLine(stdin) + # no ``var``, because we do not declare a new variable here + +The example uses a while loop to keep asking the user for his name, as long as +he types in nothing (only presses RETURN). + + +For statement +------------- + +The `for`:idx: statement is a construct to loop over any elements an *iterator* +provides. The example uses the built-in ``countup`` iterator: + +.. code-block:: nimrod + Echo("Counting to ten: ") + for i in countup(1, 10): + Echo($i) + +The built-in ``$`` operator turns an integer (``int``) and many other types +into a string. The variable ``i`` is implicitely declared by the ``for`` loop +and has the type ``int``, because that is what ``countup`` returns. ``i`` runs +through the values 1, 2, .., 10. Each value is ``echo``-ed. This code does +the same: + +.. code-block:: nimrod + Echo("Counting to 10: ") + var i = 1 + while i <= 10: + Echo($i) + inc(i) # increment i by 1 + +Counting down can be achieved as easily (but is much less needed): + +.. code-block:: nimrod + Echo("Counting down from 10 to 1: ") + for i in countdown(10, 1): + Echo($i) + +Since counting up occurs so often in programs, Nimrod has a special syntax that +calls the ``countup`` iterator implicitely: + +.. code-block:: nimrod + for i in 1..10: + ... + +The syntax ``for i in 1..10`` is sugar for ``for i in countup(1, 10)``. +``countdown`` does not have any such sugar. + + +Scopes and the block statement +------------------------------ +Control flow statements have a feature not covered yet: They open a +new scope. This means that in the following example, ``x`` is not accessible +outside the loop: + +.. code-block:: nimrod + while false: + var x = "hi" + echo(x) # does not work + +A while (for) statement introduces an implicit block. Identifiers +are only visible within the block they have been declared. The ``block`` +statement can be used to open a new block explicitely: + +.. code-block:: nimrod + block myblock: + var x = "hi" + echo(x) # does not work either + +The block's `label` (``myblock`` in the example) is optional. + + +Break statement +--------------- +A block can be left prematurely with a ``break`` statement. The break statement +can leave a while, for, or a block statement. It leaves the innermost construct, +unless the label of a block is given: + +.. code-block:: nimrod + block myblock: + Echo("entering block") + while true: + Echo("looping") + break # leaves the loop, but not the block + Echo("still in block") + + block myblock2: + Echo("entering block") + while true: + Echo("looping") + break myblock2 # leaves the block (and the loop) + Echo("still in block") + + +Continue statement +------------------ +Like in many other programming languages, a ``continue`` statement leads to +the next iteration immediately: + +.. code-block:: nimrod + while true: + var x = readLine(stdin) + if x == "": continue + Echo(x) + + +When statement +-------------- + +Example: + +.. code-block:: nimrod + + when system.hostOS == "windows": + echo("running on Windows!") + elif system.hostOS == "linux": + echo("running on Linux!") + elif system.hostOS == "macosx": + echo("running on Mac OS X!") + else: + echo("unknown operating system") + +The `when`:idx: statement is almost identical to the ``if`` statement with some +differences: + +* Each condition has to be a constant expression since it is evaluated by the + compiler. +* The statements within a branch do not open a new scope. +* The compiler checks the semantics and produces code *only* for the statements + that belong to the first condition that evaluates to ``true``. + +The ``when`` statement is useful for writing platform specific code, similar to +the ``#ifdef`` construct in the C programming language. + +**Note**: The documentation generator currently always follows the first branch +of when statements. + + +Statements and indentation +========================== + +Now that we covered the basic control flow statements, let's return to Nimrod +indentation rules. + +In Nimrod there is a distinction between *simple statements* and *complex +statements*. *Simple statements* cannot contain other statements: +Assignment, procedure calls or the ``return`` statement belong to the simple +statements. *Complex statements* like ``if``, ``when``, ``for``, ``while`` can +contain other statements. To avoid ambiguities, complex statements always have +to be intended, but single simple statements do not: + +.. code-block:: nimrod + # no indentation needed for single assignment statement: + if x: x = false + + # indentation needed for nested if statement: + if x: + if y: + y = false + else: + y = true + + # indentation needed, because two statements follow the condition: + if x: + x = false + y = false + + +*Expressions* are parts of a statement which usually result in a value. The +condition in an if statement is an example for an expression. Expressions can +contain indentation at certain places for better readability: + +.. code-block:: nimrod + + if thisIsaLongCondition() and + thisIsAnotherLongCondition(1, + 2, 3, 4): + x = true + +As a rule of thumb, indentation within expressions is allowed after operators, +an open parenthesis and after commas. + + +Procedures +========== + +To define new commands like ``echo``, ``readline`` in the examples, the concept +of a `procedure` is needed. (Some languages call them *methods* or +*functions*.) In Nimrod new procedures are defined with the ``proc`` keyword: + +.. code-block:: nimrod + proc yes(question: string): bool = + Echo(question, " (y/n)") + while true: + case readLine(stdin) + of "y", "Y", "yes", "Yes": return true + of "n", "N", "no", "No": return false + else: Echo("Please be clear: yes or no") + + if yes("Should I delete all your important files?"): + Echo("I'm sorry Dave, I'm afraid I can't do that.") + else: + Echo("I think you know what the problem is just as well as I do.") + +This example shows a procedure named ``yes`` that asks the user a ``question`` +and returns true if he answered "yes" (or something similar) and returns +false if he answered "no" (or something similar). A ``return`` statement leaves +the procedure (and therefore the while loop) immediately. The +``(question: string): bool`` syntax describes that the procedure expects a +parameter named ``question`` of type ``string`` and returns a value of type +``bool``. ``Bool`` is a built-in type: The only valid values for ``bool`` are +``true`` and ``false``. +The conditions in if or while statements need to have the type ``bool``. + +Some terminology: In the example ``question`` is called a (formal) *parameter*, +``"Should I..."`` is called an *argument* that is passed to this parameter. + + +Result variable +--------------- +A procedure that returns a value has an implicit ``result`` variable that +represents the return value. A ``return`` statement with no expression is a +shorthand for ``return result``. So all tree code snippets are equivalent: + +.. code-block:: nimrod + return 42 + + result = 42 + return + + result = 42 + return result + + +Parameters +---------- +Parameters are constant in the procedure body. Their value cannot be changed +because this allows the compiler to implement parameter passing in the most +efficient way. If the procedure needs to modify the argument for the +caller, a ``var`` parameter can be used: + +.. code-block:: nimrod + proc divmod(a, b: int, res, remainder: var int) = + res = a div b + remainder = a mod b + + var + x, y: int + divmod(8, 5, x, y) # modifies x and y + echo(x) + echo(y) + +In the example, ``res`` and ``remainder`` are `var parameters`. +Var parameters can be modified by the procedure and the changes are +visible to the caller. + + +Discard statement +----------------- +To call a procedure that returns a value just for its side effects and ignoring +its return value, a discard statement **has** to be used. Nimrod does not +allow to silently throw away a return value: + +.. code-block:: nimrod + discard yes("May I ask a pointless question?") + + +Named arguments +--------------- + +Often a procedure has many parameters and it is not clear in which order the +parameters appeared. This is especially true for procedures that construct a +complex data type. Therefore the arguments to a procedure can be named, so +that it is clear which argument belongs to which parameter: + +.. code-block:: nimrod + proc createWindow(x, y, width, height: int, title: string, + show: bool): Window = + ... + + var w = createWindow(show = true, title = "My Application", + x = 0, y = 0, height = 600, width = 800) + +Now that we use named arguments to call ``createWindow`` the argument order +does not matter anymore. Mixing named arguments with ordered arguments is +also possible, but not very readable: + +.. code-block:: nimrod + var w = createWindow(0, 0, title = "My Application", + height = 600, width = 800, true) + +The compiler checks that each parameter receives exactly one argument. + + +Default values +-------------- +To make the ``createWindow`` proc easier to use it should provide `default +values`, these are values that are used as arguments if the caller does not +specify them: + +.. code-block:: nimrod + proc createWindow(x = 0, y = 0, width = 500, height = 700, + title = "unknown", + show = true): Window = + ... + + var w = createWindow(title = "My Application", height = 600, width = 800) + +Now the call to ``createWindow`` only needs to set the values that differ +from the defaults. + +Note that type inference works for parameters with default values, there is +no need to specify ``title: string = "unknown"``, for example. + + +Overloaded procedures +--------------------- +Nimrod provides the ability to overload procedures similar to C++: + +.. code-block:: nimrod + proc toString(x: int): string = ... + proc toString(x: bool): string = + if x: return "true" else: return "false" + + Echo(toString(13)) # calls the toString(x: int) proc + Echo(toString(true)) # calls the toString(x: bool) proc + +(Note that ``toString`` is usually the ``$`` operator in Nimrod.) +The compiler chooses the most appropriate proc for the ``toString`` calls. How +this overloading resolution algorithm works exactly is not discussed here +(it will be specified in the manual soon). +However, it does not lead to nasty suprises and is based on a quite simple +unification algorithm. Ambigious calls are reported as errors. + + +Operators +--------- +The Nimrod library makes heavy use of overloading - one reason for this is that +each operator like ``+`` is a just an overloaded proc. The parser lets you +use operators in `infix notation` (``a + b``) or `prefix notation` (``+ a``). +An infix operator always receives two arguments, a prefix operator always one. +Postfix operators are not possible, because this would be ambigious: Does +``a @ @ b`` mean ``(a) @ (@b)`` or ``(a@) @ (b)``? It always means +``(a) @ (@b)``, because there are no postfix operators in Nimrod. + +Apart from a few built-in keyword operators such as ``and``, ``or``, ``not``, +operators always consist of these characters: +``+ - * \ / < > = @ $ ~ & % ! ? ^ . |`` + +User defined operators are allowed. Nothing stops you from defining your own +``@!?+~`` operator, but readability can suffer. + +The operator's precedence is determined by its first character. The details +can be found in the manual. + +To define a new operator enclose the operator in "``": + +.. code-block:: nimrod + proc `$` (x: myDataType): string = ... + # now the $ operator also works with myDataType, overloading resolution + # ensures that $ works for built-in types just like before + +The "``" notation can also be used to call an operator just like a procedure +with a real name: + +.. code-block:: nimrod + if `==`( `+`(3, 4), 7): Echo("True") + + +Forward declarations +-------------------- + +Every variable, procedure, etc. needs to be declared before it can be used. +(The reason for this is compilation efficiency.) +However, this cannot be done for mutually recursive procedures: + +.. code-block:: nimrod + # forward declaration: + proc even(n: int): bool + + proc odd(n: int): bool = + if n == 1: return true + else: return even(n-1) + + proc even(n: int): bool = + if n == 0: return true + else: return odd(n-1) + +Here ``odd`` depends on ``even`` and vice versa. Thus ``even`` needs to be +introduced to the compiler before it is completely defined. The syntax for +such a `forward declaration` is simple: Just omit the ``=`` and the procedure's +body. + + +Iterators +========= + +Let's return to the boring counting example: + +.. code-block:: nimrod + Echo("Counting to ten: ") + for i in countup(1, 10): + Echo($i) + +Can a ``countup`` proc be written that supports this loop? Lets try: + +.. code-block:: nimrod + proc countup(a, b: int): int = + var res = a + while res <= b: + return res + inc(res) + +However, this does not work. The problem is that the procedure should not +only ``return``, but return and **continue** after an iteration has +finished. This *return and continue* is called a `yield` statement. Now +the only thing left to do is to replace the ``proc`` keyword by ``iterator`` +and there it is - our first iterator: + +.. code-block:: nimrod + iterator countup(a, b: int): int = + var res = a + while res <= b: + yield res + inc(res) + +Iterators look very similar to procedures, but there are several +important differences: + +* Iterators can only be called from for loops. +* Iterators cannot contain a ``return`` statement and procs cannot contain a + ``yield`` statement. +* Iterators have no implicit ``result`` variable. +* Iterators do not support recursion. (This restriction will be gone in a + future version of the compiler.) +* Iterators cannot be forward declared, because the compiler must be able + to inline an iterator. (This restriction will be gone in a + future version of the compiler.) + + +Basic types +=========== + +This section deals with the basic built-in types and the operations +that are available for them in detail. + +Booleans +-------- + +The `boolean`:idx: type is named ``bool`` in Nimrod and consists of the two +pre-defined values ``true`` and ``false``. Conditions in while, +if, elif, when statements need to be of type bool. + +The operators ``not, and, or, xor, <, <=, >, >=, !=, ==`` are defined +for the bool type. The ``and`` and ``or`` operators perform short-cut +evaluation. Example: + +.. code-block:: nimrod + + while p != nil and p.name != "xyz": + # p.name is not evaluated if p == nil + p = p.next + + +Characters +---------- +The `character type` is named ``char`` in Nimrod. Its size is one byte. +Thus it cannot represent an UTF-8 character, but a part of it. +The reason for this is efficiency: For the overwhelming majority of use-cases, +the resulting programs will still handle UTF-8 properly as UTF-8 was specially +designed for this. +Character literals are enclosed in single quotes. + +Chars can be compared with the ``==``, ``<``, ``<=``, ``>``, ``>=`` operators. +The ``$`` operator converts a ``char`` to a ``string``. Chars cannot be mixed +with integers; to get the ordinal value of a ``char`` use the ``ord`` proc. +Converting from an integer to a ``char`` is done with the ``chr`` proc. + + +Strings +------- +String variables in Nimrod are **mutable**, so appending to a string +is quite efficient. Strings in Nimrod are both zero-terminated and have a +length field. One can retrieve a string's length with the builtin ``len`` +procedure; the length never counts the terminating zero. Accessing the +terminating zero is no error and often leads to simpler code: + +.. code-block:: nimrod + if s[i] == 'a' and s[i+1] == 'b' and s[i+2] == '\0': + # no need to check whether ``i < len(s)``! + ... + +The assignment operator for strings copies the string. + +Strings are compared by their lexicographical order. All comparison operators +are available. Per convention, all strings are UTF-8 strings, but this is not +enforced. For example, when reading strings from binary files, they are merely +a sequence of bytes. The index operation ``s[i]`` means the i-th *char* of +``s``, not the i-th *unichar*. + +String variables are initialized with a special value, called ``nil``. However, +most string operations cannot deal with ``nil`` (leading to an exception being +raised) for performance reasons. Thus one should use empty strings ``""`` +rather than ``nil`` as the *empty* value. But ``""`` often creates a string +object on the heap, so there is a trade-off to be made here. + + +Integers +-------- +Nimrod has these integer types built-in: ``int int8 int16 int32 int64``. These +are all signed integer types, there are no `unsigned integer`:idx: types, only +`unsigned operations`:idx: that treat their arguments as unsigned. + +The default integer type is ``int``. Integer literals can have a *type suffix* +to mark them to be of another integer type: + + +.. code-block:: nimrod + var + x = 0 # x is of type ``int`` + y = 0'i8 # y is of type ``int8`` + z = 0'i64 # z is of type ``int64`` + +Most often integers are used for couting objects that reside in memory, so +``int`` has the same size as a pointer. + +The common operators ``+ - * div mod < <= == != > >=`` are defined for +integers. The ``and or xor not`` operators are defined for integers too and +provide *bitwise* operations. Left bit shifting is done with the ``shl``, right +shifting with the ``shr`` operator. Bit shifting operators always treat their +arguments as *unsigned*. For `arithmetic bit shifts`:idx: ordinary +multiplication or division can be used. + +Unsigned operations all wrap around; they cannot lead to over- or underflow +errors. Unsigned operations use the ``%`` suffix as convention: + +====================== ====================================================== +operation meaning +====================== ====================================================== +``a +% b`` unsigned integer addition +``a -% b`` unsigned integer substraction +``a *% b`` unsigned integer multiplication +``a /% b`` unsigned integer division +``a %% b`` unsigned integer modulo operation +``a <% b`` treat ``a`` and ``b`` as unsigned and compare +``a <=% b`` treat ``a`` and ``b`` as unsigned and compare +====================== ====================================================== + +`Automatic type conversion`:idx: is performed in expressions where different +kinds of integer types are used. However, if the type conversion +loses information, the `EOutOfRange`:idx: exception is raised (if the error +cannot be detected at compile time). + + + +Floats +------ +Nimrod has these floating point types built-in: ``float float32 float64``. + +The default float type is ``float``. In the current implementation, +``float`` is always 64 bit wide. + +Float literals can have a *type suffix* to mark them to be of another float +type: + +.. code-block:: nimrod + var + x = 0.0 # x is of type ``float`` + y = 0.0'f32 # y is of type ``float32`` + z = 0.0'f64 # z is of type ``int64`` + +The common operators ``+ - * / < <= == != > >=`` are defined for +floats and follow the IEEE standard. + +Automatic type conversion in expressions with different kinds +of floating point types is performed: The smaller type is +converted to the larger. Integer types are **not** converted to floating point +types automatically and vice versa. The ``toInt`` and ``toFloat`` procs can be +used for these conversions. + + +Advanced types +============== + +In Nimrod new types can be defined within a ``type`` statement: + +.. code-block:: nimrod + type + biggestInt = int64 # biggest integer type that is available + biggestFLoat = float64 # biggest float type that is available + +Enumeration and object types cannot be defined on the fly, but only within a +``type`` statement. + + +Enumerations +------------ +A variable of an `enumeration`:idx: type can only be assigned a value of a +limited set. This set consists of ordered symbols. Each symbol is mapped +to an integer value internally. The first symbol is represented +at runtime by 0, the second by 1 and so on. Example: + +.. code-block:: nimrod + + type + TDirection = enum + north, east, south, west + + var x = south # `x` is of type `TDirection`; its value is `south` + echo($x) # writes "south" to `stdout` + +(To prefix a new type with the letter ``T`` is a convention in Nimrod.) +All comparison operators can be used with enumeration types. + +An enumeration's symbol can be qualified to avoid ambiguities: +``TDirection.south``. + +The ``$`` operator can convert any enumeration value to its name, the ``ord`` +proc to its underlying integer value. + +For better interfacing to other programming languages, the symbols of enum +types can be assigned an explicit ordinal value. However, the ordinal values +have to be in ascending order. A symbol whose ordinal value is not +explicitly given is assigned the value of the previous symbol + 1. + +An explicit ordered enum can have *wholes*: + +.. code-block:: nimrod + type + TMyEnum = enum + a = 2, b = 4, c = 89 + + +Ordinal types +------------- +Enumerations without wholes, integer types, ``char`` and ``bool`` (and +subranges) are called `ordinal`:idx: types. Ordinal types have quite +a few special operations: + +----------------- -------------------------------------------------------- +Operation Comment +----------------- -------------------------------------------------------- +``ord(x)`` returns the integer value that is used to + represent `x`'s value +``inc(x)`` increments `x` by one +``inc(x, n)`` increments `x` by `n`; `n` is an integer +``dec(x)`` decrements `x` by one +``dec(x, n)`` decrements `x` by `n`; `n` is an integer +``succ(x)`` returns the successor of `x` +``succ(x, n)`` returns the `n`'th successor of `x` +``succ(x)`` returns the predecessor of `x` +``succ(x, n)`` returns the `n`'th predecessor of `x` +----------------- -------------------------------------------------------- + +The ``inc dec succ pred`` operations can fail by raising an `EOutOfRange` or +`EOverflow` exception. (If the code has been compiled with the proper runtime +checks turned on.) + + +Subranges +--------- +A `subrange`:idx: type is a range of values from an integer or enumeration type +(the base type). Example: + +.. code-block:: nimrod + type + TSubrange = range[0..5] + + +``TSubrange`` is a subrange of ``int`` which can only hold the values 0 +to 5. Assigning any other value to a variable of type ``TSubrange`` is a +compile-time or runtime error. Assignments from the base type to one of its +subrange types (and vice versa) are allowed. + +The ``system`` module defines the important ``natural`` type as +``range[0..high(int)]`` (``high`` returns the maximal value). Other programming +languages mandate the usage of unsigned integers for natural numbers. This is +often **wrong**: You don't want unsigned arithmetic (which wraps around) just +because the numbers cannot be negative. Nimrod's ``natural`` type helps to +avoid this common programming error. + + +Sets +---- +The `set type`:idx: models the mathematical notion of a set. The set's +basetype can only be an ordinal type. The reason is that sets are implemented +as high performance bit vectors. + +Sets can be constructed via the set constructor: ``{}`` is the empty set. The +empty set is type combatible with any concrete set type. The constructor +can also be used to include elements (and ranges of elements): + +.. code-block:: nimrod + type + TCharSet = set[char] + var + x: TCharSet + x = {'a'..'z', '0'..'9'} # This constructs a set that conains the + # letters from 'a' to 'z' and the digits + # from '0' to '9' + +These operations are supported by sets: + +================== ======================================================== +operation meaning +================== ======================================================== +``A + B`` union of two sets +``A * B`` intersection of two sets +``A - B`` difference of two sets (A without B's elements) +``A == B`` set equality +``A <= B`` subset relation (A is subset of B or equal to B) +``A < B`` strong subset relation (A is a real subset of B) +``e in A`` set membership (A contains element e) +``e notin A`` A does not contain element e +``contains(A, e)`` A contains element e +``A -+- B`` symmetric set difference (= (A - B) + (B - A)) +``card(A)`` the cardinality of A (number of elements in A) +``incl(A, elem)`` same as ``A = A + {elem}`` +``excl(A, elem)`` same as ``A = A - {elem}`` +================== ======================================================== + +Sets are often used to define a type for the *flags* of a procedure. This is +much cleaner (and type safe solution) solution than just defining integer +constants that should be ``or``'ed together. + + +Arrays +------ +An `array`:idx: is a simple fixed length container. Each element in +the array has the same type. The array's index type can be any ordinal type. + +Arrays can be constructed via the array constructor: ``[]`` is the empty +array. The constructor can also be used to include elements. + +.. code-block:: nimrod + + type + TIntArray = array[0..5, int] # an array that is indexed with 0..5 + var + x: TIntArray + x = [1, 2, 3, 4, 5, 6] + for i in low(x)..high(x): + echo(x[i]) + +The notation ``x[i]`` is used to access the i-th element of ``x``. +Array access is always bounds checked (at compile-time or at runtime). These +checks can be disabled via pragmas or invoking the compiler with the +``--bound_checks:off`` command line switch. + +Arrays are value types, like any other Nimrod type. The assignment operator +copies the whole array contents. + +The built-in ``len`` proc returns the array's length. ``low(a)`` returns the +lowest valid index for the array `a` and ``high(a)`` the highest valid index. + + +Open arrays +----------- +Often fixed size arrays turn out to be too inflexible; procedures should +be able to deal with arrays of different sizes. The `openarray`:idx: type +allows this. Openarrays are always indexed with an ``int`` starting at +position 0. The ``len``, ``low`` and ``high`` operations are available +for open arrays too. Any array with a compatible base type can be passed to +an openarray parameter, the index type does not matter. + +The openarray type cannot be nested: Multidimensional openarrays are not +supported because this is seldom needed and cannot be done efficiently. + +An openarray is also a means to implement passing a variable number of +arguments to a procedure. The compiler converts the list of arguments +to an array automatically: + +.. code-block:: nimrod + proc myWriteln(f: TFile, a: openarray[string]) = + for s in items(a): + write(f, s) + write(f, "\n") + + myWriteln(stdout, "abc", "def", "xyz") + # is transformed by the compiler to: + myWriteln(stdout, ["abc", "def", "xyz"]) + +This transformation is only done if the openarray parameter is the +last parameter in the procedure header. + + +Sequences +--------- +`Sequences`:idx: are similar to arrays but of dynamic length which may change +during runtime (like strings). Since sequences are resizeable they are always +allocated on the heap and garbage collected. + +Sequences are always indexed with an ``int`` starting at position 0. +The ``len``, ``low`` and ``high`` operations are available for sequences too. +The notation ``x[i]`` can be used to access the i-th element of ``x``. + +Sequences can be constructed by the array constructor ``[]`` in conjunction +with the array to sequence operator ``@``. Another way to allocate space for +a sequence is to call the built-in ``newSeq`` procedure. + +A sequence may be passed to an openarray parameter. + +Example: + +.. code-block:: nimrod + + var + x: seq[int] # a sequence of integers + x = @[1, 2, 3, 4, 5, 6] # the @ turns the array into a sequence + +Sequence variables are initialized with ``nil``. However, most sequence +operations cannot deal with ``nil`` (leading to an exception being +raised) for performance reasons. Thus one should use empty sequences ``@[]`` +rather than ``nil`` as the *empty* value. But ``@[]`` creates a sequence +object on the heap, so there is a trade-off to be made here. + + +Tuples +------ + +A tuple type defines various named *fields* and an *order* of the fields. +The constructor ``()`` can be used to construct tuples. The order of the +fields in the constructor must match the order in the tuple's definition. +Different tuple-types are *equivalent* if they specify the same fields of +the same type in the same order. + +The assignment operator for tuples copies each component. The notation +``t.field`` is used to access a tuple's field. Another notation is +``t[i]`` to access the ``i``'th field. Here ``i`` needs to be a constant +integer. + +.. code-block:: nimrod + + type + TPerson = tuple[name: string, age: int] # type representing a person: + # a person consists of a name + # and an age + var + person: TPerson + person = (name: "Peter", age: 30) + # the same, but less readable: + person = ("Peter", 30) + + echo(person.name) # "Peter" + echo(person.age) # 30 + + echo(person[0]) # "Peter" + echo(person[1]) # 30 + + +Reference and pointer types +--------------------------- +References (similiar to `pointers`:idx: in other programming languages) are a +way to introduce many-to-one relationships. This means different references can +point to and modify the same location in memory. + +Nimrod distinguishes between `traced`:idx: and `untraced`:idx: references. +Untraced references are also called *pointers*. Traced references point to +objects of a garbage collected heap, untraced references point to +manually allocated objects or to objects somewhere else in memory. Thus +untraced references are *unsafe*. However for certain low-level operations +(accessing the hardware) untraced references are unavoidable. + +Traced references are declared with the **ref** keyword, untraced references +are declared with the **ptr** keyword. + +The ``^`` operator can be used to *derefer* a reference, meaning to retrieve +the item the reference points to. The ``addr`` procedure returns the address +of an item. An address is always an untraced reference: +``addr`` is an *unsafe* feature. + +The ``.`` (access a tuple/object field operator) +and ``[]`` (array/string/sequence index operator) operators perform implicit +dereferencing operations for reference types: + +.. code-block:: nimrod + + type + PNode = ref TNode + TNode = tuple[le, ri: PNode, data: int] + var + n: PNode + new(n) + n.data = 9 # no need to write n^ .data + +(As a convention, reference types use a 'P' prefix.) + +To allocate a new traced object, the built-in procedure ``new`` has to be used. +To deal with untraced memory, the procedures ``alloc``, ``dealloc`` and +``realloc`` can be used. The documentation of the system module contains +further information. + +If a reference points to *nothing*, it has the value ``nil``. + +Special care has to be taken if an untraced object contains traced objects like +traced references, strings or sequences: In order to free everything properly, +the built-in procedure ``GCunref`` has to be called before freeing the untraced +memory manually: + +.. code-block:: nimrod + type + TData = tuple[x, y: int, s: string] + + # allocate memory for TData on the heap: + var d = cast[ptr TData](alloc0(sizeof(TData))) + + # create a new string on the garbage collected heap: + d.s = "abc" + + # tell the GC that the string is not needed anymore: + GCunref(d.s) + + # free the memory: + dealloc(d) + +Without the ``GCunref`` call the memory allocated for the ``d.s`` string would +never be freed. The example also demonstrates two important features for low +level programming: The ``sizeof`` proc returns the size of a type or value +in bytes. The ``cast`` operator can circumvent the type system: The compiler +is forced to treat the result of the ``alloc0`` call (which returns an untyped +pointer) as if it would have the type ``ptr TData``. Casting should only be +done if it is unavoidable: It breaks type safety and bugs can lead to +mysterious crashes. + +**Note**: The example only works because the memory is initialized with zero +(``alloc0`` instead of ``alloc`` does this): ``d.s`` is thus initialized to +``nil`` which the string assignment can handle. You need to know low level +details like this when mixing garbage collected data with unmanaged memory! + + +Procedural type +--------------- +A `procedural type`:idx: is a (somewhat abstract) pointer to a procedure. +``nil`` is an allowed value for a variable of a procedural type. +Nimrod uses procedural types to achieve `functional`:idx: programming +techniques. Dynamic dispatch for OOP constructs can also be implemented with +procedural types (details follow in the OOP section). + +Example: + +.. code-block:: nimrod + + type + TCallback = proc (x: int) + + proc echoItem(x: Int) = echo(x) + + proc forEach(callback: TCallback) = + const + data = [2, 3, 5, 7, 11] + for d in items(data): + callback(d) + + forEach(echoItem) + +A subtle issue with procedural types is that the calling convention of the +procedure influences the type compability: Procedural types are only compatible +if they have the same calling convention. The different calling conventions are +listed in the `user guide <nimrodc.html>`_. + + +Modules +======= +Nimrod supports splitting a program into pieces with a `module`:idx: concept. +Each module is in its own file. Modules enable `information hiding`:idx: and +`separate compilation`:idx:. A module may gain access to symbols of another +module by the `import`:idx: statement. Only top-level symbols that are marked +with an asterisk (``*``) are exported: + +.. code-block:: nimrod + # Module A + var + x*, y: int + + proc `*` *(a, b: seq[int]): seq[int] = + # allocate a new sequence: + newSeq(result, len(a)) + # multiply two int sequences: + for i in 0..len(a)-1: result[i] = a[i] * b[i] + +The above module exports ``x`` and ``*``, but not ``y``. + +Modules that depend on each other are possible, but strongly discouraged, +because then one module cannot be reused without the other. + +The algorithm for compiling modules is: + +- Compile the whole module as usual, following import statements recursively +- if there is a cycle only import the already parsed symbols (that are + exported); if an unknown identifier occurs then abort + +This is best illustrated by an example: + +.. code-block:: nimrod + # Module A + type + T1* = int # Module A exports the type ``T1`` + import B # the compiler starts parsing B + + proc main() = + var i = p(3) # works because B has been parsed completely here + + main() + + + # Module B + import A # A is not parsed here! Only the already known symbols + # of A are imported. + + proc p*(x: A.T1): A.T1 = + # this works because the compiler has already + # added T1 to A's interface symbol table + return x + 1 + + +A symbol of a module *can* be *qualified* with the ``module.symbol`` syntax. If +the symbol is ambigious, it even *has* to be qualified. A symbol is ambigious +if it is defined in two (or more) different modules and both modules are +imported by a third one: + +.. code-block:: nimrod + # Module A + var x*: string + + # Module B + var x*: int + + # Module C + import A, B + write(stdout, x) # error: x is ambigious + write(stdout, A.x) # no error: qualifier used + + var x = 4 + write(stdout, x) # not ambigious: uses the module C's x + + +But this rule does not apply to procedures or iterators. Here the overloading +rules apply: + +.. code-block:: nimrod + # Module A + proc x*(a: int): string = return $a + + # Module B + proc x*(a: string): string = return $a + + # Module C + import A, B + write(stdout, x(3)) # no error: A.x is called + write(stdout, x("")) # no error: B.x is called + + proc x*(a: int): string = nil + write(stdout, x(3)) # ambigious: which `x` is to call? + + +From statement +-------------- + +We have already seen the simple ``import`` statement that just imports all +exported symbols. An alternative that only imports listed symbols is the +``from import`` statement: + +.. code-block:: nimrod + from mymodule import x, y, z + + +Include statement +----------------- +The `include`:idx: statement does something fundametally different than +importing a module: It merely includes the contents of a file. The ``include`` +statement is useful to split up a large module into several files: + +.. code-block:: nimrod + include fileA, fileB, fileC + +**Note**: The documentation generator currently does not follow ``include`` +statements, so exported symbols in an include file will not show up in the +generated documentation. + + +Part 2 +====== + +So, now that we are done with the basics, let's see what Nimrod offers apart +from a nice syntax for procedural programming: `Part II <tut2.html>`_ + + +.. _strutils: strutils.html +.. _system: system.html diff --git a/doc/tut2.txt b/doc/tut2.txt new file mode 100644 index 000000000..dc14aabc0 --- /dev/null +++ b/doc/tut2.txt @@ -0,0 +1,718 @@ +============================= +The Nimrod Tutorial (Part II) +============================= + +:Author: Andreas Rumpf +:Version: |nimrodversion| + +.. contents:: + + +Introduction +============ + + "With great power comes great responsibility." -- Spider-man + +This document is a tutorial for the advanced constructs of the *Nimrod* +programming language. + + +Pragmas +======= +Pragmas are Nimrod's method to give the compiler additional information/ +commands without introducing a massive number of new keywords. Pragmas are +processed during semantic checking. Pragmas are enclosed in the +special ``{.`` and ``.}`` curly dot brackets. This tutorial does not cover +pragmas. See the `manual <manual.html>`_ or `user guide <nimrodc.html>`_ for +a description of the available pragmas. + + +Object Oriented Programming +=========================== + +While Nimrod's support for object oriented programming (OOP) is minimalistic, +powerful OOP technics can be used. OOP is seen as *one* way to design a +program, not *the only* way. Often a procedural approach leads to simpler +and more efficient code. + + +Objects +------- + +Like tuples, objects are a means to pack different values together in a +structured way. However, objects provide many features that tuples do not: +They provide inheritance and information hiding. Because objects encapsulate +data, the ``()`` tuple constructor cannot be used to construct objects. So +the order of the object's fields is not as important as it is for tuples. The +programmer should provide a proc to initialize the object (this is called +a *constructor*). + +Objects have access to their type at runtime. There is an +``is`` operator that can be used to check the object's type: + +.. code-block:: nimrod + + type + TPerson = object of TObject + name*: string # the * means that `name` is accessible from other modules + age: int # no * means that the field is hidden from other modules + + TStudent = object of TPerson # TStudent inherits from TPerson + id: int # with an id field + + var + student: TStudent + person: TPerson + assert(student is TStudent) # is true + +Object fields that should be visible from outside the defining module, have to +be marked by ``*``. In contrast to tuples, different object types are +never *equivalent*. New object types can only be defined within a type +section. + +Inheritance is done with the ``object of`` syntax. Multiple inheritance is +currently not supported. If an object type has no suitable ancestor, ``TObject`` +should be used as its ancestor, but this is only a convention. + +Note that aggregation (*has-a* relation) is often preferable to inheritance +(*is-a* relation) for simple code reuse. Since objects are value types in +Nimrod, aggregation is as efficient as inheritance. + + +Mutually recursive types +------------------------ + +Objects, tuples and references can model quite complex data structures which +depend on each other. This is called *mutually recursive types*. In Nimrod +these types need to be declared within a single type section. Anything else +would require arbitrary symbol lookahead which slows down compilation. + +Example: + +.. code-block:: nimrod + type + PNode = ref TNode # a traced reference to a TNode + TNode = object + le, ri: PNode # left and right subtrees + sym: ref TSym # leaves contain a reference to a TSym + + TSym = object # a symbol + name: string # the symbol's name + line: int # the line the symbol was declared in + code: PNode # the symbol's abstract syntax tree + + +Type conversions +---------------- +Nimrod distinguishes between `type casts`:idx: and `type conversions`:idx:. +Casts are done with the ``cast`` operator and force the compiler to +interpret a bit pattern to be of another type. + +Type conversions are a much more polite way to convert a type into another: +They preserve the abstract *value*, not necessarily the *bit-pattern*. If a +type conversion is not possible, the compiler complains or an exception is +raised. + +The syntax for type conversions is ``destination_type(expression_to_convert)`` +(like an ordinary call): + +.. code-block:: nimrod + proc getID(x: TPerson): int = + return TStudent(x).id + +The ``EInvalidObjectConversion`` exception is raised if ``x`` is not a +``TStudent``. + + +Object variants +--------------- +Often an object hierarchy is overkill in certain situations where simple +`variant`:idx: types are needed. + +An example: + +.. code-block:: nimrod + + # This is an example how an abstract syntax tree could be modelled in Nimrod + type + TNodeKind = enum # the different node types + nkInt, # a leaf with an integer value + nkFloat, # a leaf with a float value + nkString, # a leaf with a string value + nkAdd, # an addition + nkSub, # a subtraction + nkIf # an if statement + PNode = ref TNode + TNode = object + case kind: TNodeKind # the ``kind`` field is the discriminator + of nkInt: intVal: int + of nkFloat: floavVal: float + of nkString: strVal: string + of nkAdd, nkSub: + leftOp, rightOp: PNode + of nkIf: + condition, thenPart, elsePart: PNode + + var + n: PNode + new(n) # creates a new node + n.kind = nkFloat + n.floatVal = 0.0 # valid, because ``n.kind==nkFloat`` + + # the following statement raises an `EInvalidField` exception, because + # n.kind's value does not fit: + n.strVal = "" + +As can been seen from the example, an advantage to an object hierarchy is that +no conversion between different object types is needed. Yet, access to invalid +object fields raises an exception. + + +Methods +------- +In ordinary object oriented languages, procedures (also called *methods*) are +bound to a class. This has disadvantages: + +* Adding a method to a class the programmer has no control over is + impossible or needs ugly workarounds. +* Often it is unclear where the procedure should belong to: Is + ``join`` a string method or an array method? Should the complex + ``vertexCover`` algorithm really be a method of the ``graph`` class? + +Nimrod avoids these problems by not distinguishing between methods and +procedures. Methods are just ordinary procedures. However, there is a special +syntactic sugar for calling procedures: The syntax ``obj.method(args)`` can be +used instead of ``method(obj, args)``. If there are no remaining arguments, the +parentheses can be omitted: ``obj.len`` (instead of ``len(obj)``). + +This `method call syntax`:idx: is not restricted to objects, it can be used +for any type: + +.. code-block:: nimrod + + echo("abc".len) # is the same as echo(len("abc")) + echo("abc".toUpper()) + echo({'a', 'b', 'c'}.card) + stdout.writeln("Hallo") # the same as write(stdout, "Hallo") + +If it gives you warm fuzzy feelings, you can even write ``1.`+`(2)`` instead of +``1 + 2`` and claim that Nimrod is a pure object oriented language. (That +would not even be lying: *pure OO* has no meaning anyway. :-) + + +Properties +---------- +As the above example shows, Nimrod has no need for *get-properties*: +Ordinary get-procedures that are called with the *method call syntax* achieve +the same. But setting a value is different; for this a special setter syntax +is needed: + +.. code-block:: nimrod + + type + TSocket* = object of TObject + FHost: int # cannot be accessed from the outside of the module + # the `F` prefix is a convention to avoid clashes since + # the accessors are named `host` + + proc `host=`*(s: var TSocket, value: int) {.inline.} = + ## setter of hostAddr + s.FHost = value + + proc host*(s: TSocket): int {.inline.} = + ## getter of hostAddr + return s.FHost + + var + s: TSocket + s.host = 34 # same as `host=`(s, 34) + +(The example also shows ``inline`` procedures.) + + +The ``[]`` array access operator can be overloaded to provide +`array properties`:idx:\ : + +.. code-block:: nimrod + type + TVector* = object + x, y, z: float + + proc `[]=`* (v: var TVector, i: int, value: float) = + # setter + case i + of 0: v.x = value + of 1: v.y = value + of 2: v.z = value + else: assert(false) + + proc `[]`* (v: TVector, i: int): float = + # getter + case i + of 0: result = v.x + of 1: result = v.y + of 2: result = v.z + else: assert(false) + +The example is silly, since a vector is better modelled by a tuple which +already provides ``v[]`` access. + + +Dynamic binding +--------------- +In Nimrod procedural types are used to implement dynamic binding. The following +example also shows some more conventions: The ``self`` or ``this`` object +is named ``my`` (because it is shorter than the alternatives), each class +provides a constructor, etc. + +.. code-block:: nimrod + type + TFigure = object of TObject # abstract base class: + draw: proc (my: var TFigure) # concrete classes implement this proc + + proc init(f: var TFigure) = + f.draw = nil + + type + TCircle = object of TFigure + radius: int + + proc drawCircle(my: var TCircle) = echo("o " & $my.radius) + + proc init(my: var TCircle) = + init(TFigure(my)) # call base constructor + my.radius = 5 + my.draw = drawCircle + + type + TRectangle = object of TFigure + width, height: int + + proc drawRectangle(my: var TRectangle) = echo("[]") + + proc init(my: var TRectangle) = + init(TFigure(my)) # call base constructor + my.width = 5 + my.height = 10 + my.draw = drawRectangle + + # now use these classes: + var + r: TRectangle + c: TCircle + init(r) + init(c) + r.draw(r) + c.draw(c) + +The last line shows the syntactical difference between static and dynamic +binding: The ``r.draw(r)`` dynamic call refers to ``r`` twice. This difference +is not necessarily bad. But if you want to eliminate the somewhat redundant +``r``, it can be done by using *closures*: + +.. code-block:: nimrod + type + TFigure = object of TObject # abstract base class: + draw: proc () {.closure.} # concrete classes implement this proc + + proc init(f: var TFigure) = + f.draw = nil + + type + TCircle = object of TFigure + radius: int + + proc init(me: var TCircle) = + init(TFigure(me)) # call base constructor + me.radius = 5 + me.draw = lambda () = + echo("o " & $me.radius) + + type + TRectangle = object of TFigure + width, height: int + + proc init(me: var TRectangle) = + init(TFigure(me)) # call base constructor + me.width = 5 + me.height = 10 + me.draw = lambda () = + echo("[]") + + # now use these classes: + var + r: TRectangle + c: TCircle + init(r) + init(c) + r.draw() + c.draw() + +The example also introduces `lambda`:idx: expressions: A ``lambda`` expression +defines a new proc with the ``closure`` calling convention on the fly. + +`Version 0.7.4: Closures and lambda expressions are not implemented.`:red: + + +Exceptions +========== + +In Nimrod `exceptions`:idx: are objects. By convention, exception types are +prefixed with an 'E', not 'T'. The ``system`` module defines an exception +hierarchy that you should stick to. Reusing an existing exception type is +often better than defining a new exception type: It avoids a proliferation of +types. + +Exceptions should be allocated on the heap because their lifetime is unknown. + +A convention is that exceptions should be raised in *exceptional* cases: +For example, if a file cannot be opened, this should not raise an exception +since this is quite common (the file may have been deleted). + + +Raise statement +--------------- +Raising an exception is done with the ``raise`` statement: + +.. code-block:: nimrod + var + e: ref EOS + new(e) + e.msg = "the request to the OS failed" + raise e + +If the ``raise`` keyword is not followed by an expression, the last exception +is *re-raised*. + + +Try statement +------------- + +The `try`:idx: statement handles exceptions: + +.. code-block:: nimrod + # read the first two lines of a text file that should contain numbers + # and tries to add them + var + f: TFile + if openFile(f, "numbers.txt"): + try: + var a = readLine(f) + var b = readLine(f) + echo("sum: " & $(parseInt(a) + parseInt(b))) + except EOverflow: + echo("overflow!") + except EInvalidValue: + echo("could not convert string to integer") + except EIO: + echo("IO error!") + except: + echo("Unknown exception!") + # reraise the unknown exception: + raise + finally: + closeFile(f) + +The statements after the ``try`` are executed unless an exception is +raised. Then the appropriate ``except`` part is executed. + +The empty ``except`` part is executed if there is an exception that is +not explicitely listed. It is similiar to an ``else`` part in ``if`` +statements. + +If there is a ``finally`` part, it is always executed after the +exception handlers. + +The exception is *consumed* in an ``except`` part. If an exception is not +handled, it is propagated through the call stack. This means that often +the rest of the procedure - that is not within a ``finally`` clause - +is not executed (if an exception occurs). + + +Generics +======== + +`Version 0.7.4: Complex generic types like in the example do not work.`:red: + +`Generics`:idx: are Nimrod's means to parametrize procs, iterators or types +with `type parameters`:idx:. They are most useful for efficient type safe +containers: + +.. code-block:: nimrod + type + TBinaryTree[T] = object # TBinaryTree is a generic type with + # with generic param ``T`` + le, ri: ref TBinaryTree[T] # left and right subtrees; may be nil + data: T # the data stored in a node + PBinaryTree*[T] = ref TBinaryTree[T] # type that is exported + + proc newNode*[T](data: T): PBinaryTree[T] = + # constructor for a node + new(result) + result.dat = data + + proc add*[T](root: var PBinaryTree[T], n: PBinaryTree[T]) = + # insert a node into the tree + if root == nil: + root = n + else: + var it = root + while it != nil: + # compare the data items; uses the generic ``cmd`` proc that works for + # any type that has a ``==`` and ``<`` operator + var c = cmp(it.data, n.data) + if c < 0: + if it.le == nil: + it.le = n + return + it = it.le + else: + if it.ri == nil: + it.ri = n + return + it = it.ri + + proc add*[T](root: var PBinaryTree[T], data: T) = + # convenience proc: + add(root, newNode(data)) + + iterator preorder*[T](root: PBinaryTree[T]): T = + # Preorder traversal of a binary tree. + # Since recursive iterators are not yet implemented, + # this uses an explicit stack (which is more efficient anyway): + var stack: seq[PBinaryTree[T]] = @[root] + while stack.len > 0: + var n = stack[stack.len-1] + setLen(stack, stack.len-1) # pop `n` of the stack + while n != nil: + yield n + add(stack, n.ri) # push right subtree onto the stack + n = n.le # and follow the left pointer + + var + root: PBinaryTree[string] # instantiate a PBinaryTree with ``string`` + add(root, newNode("hallo")) # instantiates generic procs ``newNode`` and ``add`` + add(root, "world") # instantiates the second ``add`` proc + for str in preorder(root): + stdout.writeln(str) + +The example shows a generic binary tree. Depending on context, the brackets are +used either to introduce type parameters or to instantiate a generic proc, +iterator or type. As the example shows, generics work with overloading: The +best match of ``add`` is used. The built-in ``add`` procedure for sequences +is not hidden and used in the ``preorder`` iterator. + + +Templates +========= + +Templates are a simple substitution mechanism that operates on Nimrod's +abstract syntax trees. Templates are processed in the semantic pass of the +compiler. They integrate well with the rest of the language and share none +of C's preprocessor macros flaws. However, they may lead to code that is harder +to understand and maintain. So one should use them sparingly. + +To *invoke* a template, call it like a procedure. + +Example: + +.. code-block:: nimrod + template `!=` (a, b: expr): expr = + # this definition exists in the System module + not (a == b) + + assert(5 != 6) # the compiler rewrites that to: assert(not (5 == 6)) + +The ``!=``, ``>``, ``>=``, ``in``, ``notin``, ``isnot`` operators are in fact +templates: This has the benefit that if you overload the ``==`` operator, +the ``!=`` operator is available automatically and does the right thing. + +``a > b`` is transformed into ``b < a``. +``a in b`` is transformed into ``contains(b, a)``. +``notin`` and ``isnot`` have the obvious meanings. + +Templates are especially useful for lazy evaluation purposes. Consider a +simple proc for logging: + +.. code-block:: nimrod + const + debug = True + + proc log(msg: string) {.inline.} = + if debug: + stdout.writeln(msg) + + var + x = 4 + log("x has the value: " & $x) + +This code has a shortcoming: If ``debug`` is set to false someday, the quite +expensive ``$`` and ``&`` operations are still performed! (The argument +evaluation for procedures is said to be *eager*). + +Turning the ``log`` proc into a template solves this problem in an elegant way: + +.. code-block:: nimrod + const + debug = True + + template log(msg: expr): stmt = + if debug: + stdout.writeln(msg) + + var + x = 4 + log("x has the value: " & $x) + +The "types" of templates can be the symbols ``expr`` (stands for *expression*), +``stmt`` (stands for *statement*) or ``typedesc`` (stands for *type +description*). These are no real types, they just help the compiler parsing. + +The template body does not open a new scope. To open a new scope +use a ``block`` statement: + +.. code-block:: nimrod + template declareInScope(x: expr, t: typeDesc): stmt = + var x: t + + template declareInNewScope(x: expr, t: typeDesc): stmt = + # open a new scope: + block: + var x: t + + declareInScope(a, int) + a = 42 # works, `a` is known here + + declareInNewScope(b, int) + b = 42 # does not work, `b` is unknown + + +Macros +====== + +If the template mechanism scares you, you will be pleased to hear that +templates are not really necessary: Macros can do anything that templates can +do and much more. Macros are harder to write than templates and even harder +to get right :-). Now that you have been warned, lets see what a macro *is*. + +Macros enable advanced compile-time code tranformations, but they +cannot change Nimrod's syntax. However, this is no real restriction because +Nimrod's syntax is flexible enough anyway. + +`Macros`:idx: can be used to implement `domain specific languages`:idx:. + +To write macros, one needs to know how the Nimrod concrete syntax is converted +to an abstract syntax tree (AST). (Unfortunately the AST is not documented yet.) + +There are two ways to invoke a macro: +(1) invoking a macro like a procedure call (`expression macros`:idx:) +(2) invoking a macro with the special ``macrostmt`` syntax (`statement macros`:idx:) + + +Expression Macros +----------------- + +The following example implements a powerful ``debug`` command that accepts a +variable number of arguments (this cannot be done with templates): + +.. code-block:: nimrod + # to work with Nimrod syntax trees, we need an API that is defined in the + # ``macros`` module: + import macros + + macro debug(n: expr): stmt = + # `n` is a Nimrod AST that contains the whole macro expression + # this macro returns a list of statements: + result = newNimNode(nnkStmtList, n) + # iterate over any argument that is passed to this macro: + for i in 1..n.len-1: + # add a call to the statement list that writes the expression; + # `toStrLit` converts an AST to its string representation: + result.add(newCall("write", newIdentNode("stdout"), toStrLit(n[i]))) + # add a call to the statement list that writes ": " + result.add(newCall("write", newIdentNode("stdout"), newStrLitNode(": "))) + # add a call to the statement list that writes the expressions value: + result.add(newCall("writeln", newIdentNode("stdout"), n[i])) + + var + a: array[0..10, int] + x = "some string" + a[0] = 42 + a[1] = 45 + + debug(a[0], a[1], x) + +The macro call expands to: + +.. code-block:: nimrod + write(stdout, "a[0]") + write(stdout, ": ") + writeln(stdout, a[0]) + + write(stdout, "a[1]") + write(stdout, ": ") + writeln(stdout, a[1]) + + write(stdout, "x") + write(stdout, ": ") + writeln(stdout, x) + + +Lets return to the dynamic binding ``r.draw(r)`` notational "problem". Apart +from closures, there is another "solution": Define an infix ``!`` macro +operator which hides it: + +.. code-block:: + + macro `!` (n: expr): expr = + result = newNimNode(nnkCall, n) + var dot = newNimNode(nnkDotExpr, n) + dot.add(n[1]) # obj + if n[2].kind == nnkCall: + # transforms ``obj!method(arg1, arg2, ...)`` to + # ``(obj.method)(obj, arg1, arg2, ...)`` + dot.add(n[2][0]) # method + result.add(dot) + result.add(n[1]) # obj + for i in 1..n[2].len-1: + result.add(n[2][i]) + else: + # transforms ``obj!method`` to + # ``(obj.method)(obj)`` + dot.add(n[2]) # method + result.add(dot) + result.add(n[1]) # obj + + r!draw(a, b, c) # will be transfomed into ``r.draw(r, a, b, c)`` + +Great! 20 lines of complex code to safe a few keystrokes! Obviously, this is +exactly you should not do! (But it makes a cool example.) + + +Statement Macros +---------------- + +Statement macros are defined just as expression macros. However, they are +invoked by an expression following a colon. + +The following example outlines a macro that generates a lexical analyser from +regular expressions: + +.. code-block:: nimrod + + macro case_token(n: stmt): stmt = + # creates a lexical analyser from regular expressions + # ... (implementation is an exercise for the reader :-) + nil + + case_token: # this colon tells the parser it is a macro statement + of r"[A-Za-z_]+[A-Za-z_0-9]*": + return tkIdentifier + of r"0-9+": + return tkInteger + of r"[\+\-\*\?]+": + return tkOperator + else: + return tkUnknown + + diff --git a/doc/tutorial.txt b/doc/tutorial.txt deleted file mode 100644 index 795fc0d90..000000000 --- a/doc/tutorial.txt +++ /dev/null @@ -1,215 +0,0 @@ -=========================================== -Tutorial of the Nimrod Programming Language -=========================================== - -:Author: Andreas Rumpf - -Motivation -========== - -Why yet another programming language? - -Look at the trends behind all the new programming languages: - -* They try to be dynamic: Dynamic typing, dynamic method binding, etc. - In my opinion the most things the dynamic features buy could be achieved - with static means in a more efficient and *understandable* way. - -* They depend on big runtime environments which you need to - ship with your program as each new version of these may break compability - in subtle ways or you use recently added features - thus forcing your - users to update their runtime environment. Compiled programs where the - executable contains all needed code are simply the better solution. - -* They are unsuitable for systems programming: Do you really want to - write an operating system, a device driver or an interpreter in a language - that is just-in-time compiled (or interpreted)? - - -So what lacks are *good* systems programming languages. Nimrod is such a -language. It offers the following features: - -* It is readable: It reads from left to right (unlike the C-syntax - languages). -* It is strongly and statically typed: This enables the compiler to find - more errors. Static typing also makes programs more *readable*. -* It is compiled. (Currently this is done via compilation to C.) -* It is garbage collected. Big systems need garbage collection. Manuell - memory management is also supported through *untraced pointers*. -* It scales because high level features are also available: It has built-in - bit sets, strings, enumerations, objects, arrays and dynamically resizeable - arrays (called *sequences*). -* It has high performance: The current implementation compiles to C - and uses a Deutsch-Bobrow garbage collector together with Christoper's - partial mark-sweep garbage collector leading to excellent execution - speed and a small memory footprint. -* It has real modules with proper interfaces and supports separate - compilation. -* It is portable: It compiles to C and platform specific features have - been separated and documented. So even if your platform is not supported - porting should be easy. -* It is flexible: Although primilarily a procedural language, generic, - functional and object-oriented programming is also supported. -* It is easy to learn, easy to use and leads to elegant programs. -* You can link an embedded debugger to your program (ENDB). ENDB is - very easy to use - there is no need to clutter your code with - ``echo`` statements for proper debugging. - - -Introduction -============ - -This document is a tutorial for the programming language *Nimrod*. It should -be a readable quick tour through the language instead of a dry specification -(which can be found `here <manual.html>`_). This tutorial assumes that -the reader already knows some other programming language such as Pascal. Thus -it is detailed in cases where Nimrod differs from other programming languages -and kept short where Nimrod is more or less the same. - - -A quick tour through the language -================================= - -The first program ------------------ - -We start the tour with a modified "hallo world" program: - -.. code-block:: Nimrod - # This is a comment - # Standard IO-routines are always accessible - write(stdout, "What's your name? ") - var name: string = readLine(stdin) - write(stdout, "Hi, " & name & "!\n") - - -Save this code to the file "greeting.nim". Now compile and run it:: - - nimrod compile --run greeting.nim - -As you see, with the ``--run`` switch Nimrod executes the file automatically -after compilation. You can even give your program command line arguments by -appending them after the filename that is to be compiled and run:: - - nimrod compile --run greeting.nim arg1 arg2 - -Though it should be pretty obvious what the program does, I will explain the -syntax: Statements which are not indented are executed when the program -starts. Indentation is Nimrod's way of grouping statements. String literals -are enclosed in double quotes. The ``var`` statement declares a new variable -named ``name`` of type ``string`` with the value that is returned by the -``readline`` procedure. Since the compiler knows that ``readline`` returns -a string, you can leave out the type in the declaration. So this will work too: - -.. code-block:: Nimrod - var name = readline(stdin) - -Note that this is the only form of type inference that exists in Nimrod: -This is because it yields a good compromise between brevity and readability. - -The ``&`` operator concates strings together. ``\n`` stands for the -new line character(s). On several operating systems ``\n`` is represented by -*two* characters: Linefeed and Carriage Return. That is why -*character literals* cannot contain ``\n``. But since Nimrod handles strings -so well, this is a nonissue. - -The "hallo world" program contains several identifiers that are already -known to the compiler: ``write``, ``stdout``, ``readLine``, etc. These -built-in items are declared in the system_ module which is implicitly -imported by any other module. - - -Lexical elements ----------------- - -Let us look into Nimrod's lexical elements in more detail: Like other -programming languages Nimrod consists of identifiers, keywords, comments, -operators, and other punctation marks. Case is *insignificant* in Nimrod and -even underscores are ignored: ``This_is_an_identifier`` and this is the same -identifier ``ThisIsAnIdentifier``. This feature enables one to use other -peoples code without bothering about a naming convention that one does not -like. - -String literals are enclosed in double quotes, character literals in single -quotes. There exist also *raw* string and character literals: - -.. code-block:: Nimrod - r"C:\program files\nim" - -In raw literals the backslash is not an escape character, so they fit -the principle *what you see is what you get*. *Long string literals* -are also available (``""" ... """``); they can span over multiple lines -and the ``\`` is not an escape character either. They are very useful -for embedding SQL code templates for example. - -Comments start with ``#`` and run till the end of the line. (Well this is not -quite true, but you should read the manual for a proper explanation.) - -... XXX number literals - - -The usual statements - if, while, for, case -------------------------------------------- - -In Nimrod indentation is used to group statements. -An example showing the most common statement types: - -.. code-block:: Nimrod - var name = readLine(stdin) - - if name == "Andreas": - echo("What a nice name!") - elif name == "": - echo("Don't you have a name?") - else: - echo("Boring name...") - - for i in 0..length(name)-1: - if name[i] == 'm': - echo("hey, there is an *m* in your name!") - - echo("Please give your password: \n") - var pw = readLine(stdin) - - while pw != "12345": - echo("Wrong password! Next try: \n") - pw = readLine(stdin) - - echo("""Login complete! - What do you want to do? - delete-everything - restart-computer - go-for-a-walk - """) - - case readline(stdin) - of "delete-everything", "restart-computer": - echo("permission denied") - of "go-for-a-walk": echo("please yourself") - else: echo("unknown command") - - -.. - Types - ----- - - Nimrod has a rich type system. This tutorial only gives a few examples. Read - the `manual <manual.html>`_ for further information: - - .. code-block:: Nimrod - type - TMyRecord = object - x, y: int - - - Procedures - ---------- - - Procedures are subroutines. They are declared in this way: - - .. code-block:: Nimrod - proc findSubStr(sub: string, - - -.. _strutils: strutils.html -.. _system: system.html diff --git a/install.sh b/install.sh deleted file mode 100644 index eb592da84..000000000 --- a/install.sh +++ /dev/null @@ -1,126 +0,0 @@ -#! /bin/sh -# -# Nimrod installation script -# (c) 2008 Andreas Rumpf -# - -if [ $# -eq 1 ] ; then - - if test -f bin/nimrod - then - echo "Nimrod already built -- skipping this phase" - else - echo "building Nimrod..." - sh ./build.sh || exit 1 - echo "...done" - fi - - case $1 in - "/usr/bin") - configdir=/etc - libdir=/usr/lib/nimrod - mkdir -p /usr/lib/nimrod - mkdir -p /usr/share/nimrod/doc - - cp bin/nimrod /usr/bin/nimrod - cp config/nimdoc.cfg /etc/nimdoc.cfg - cp -r -p lib /usr/lib/nimrod - cp -r -p doc /usr/share/nimrod/doc - ;; - "/usr/local/bin") - configdir=/etc - libdir=/usr/local/lib/nimrod - mkdir -p /usr/local/lib/nimrod - mkdir -p /usr/local/share/nimrod/doc - - cp bin/nimrod /usr/local/bin/nimrod - cp config/nimdoc.cfg /etc/nimdoc.cfg - cp -r -p lib /usr/local/lib/nimrod - cp -r -p doc /usr/local/share/nimrod/doc - ;; - *) - configdir="$1/nimrod/config" - libdir="$1/nimrod/lib" - mkdir -p $1/nimrod - mkdir -p $1/nimrod/bin - mkdir -p $1/nimrod/config - mkdir -p $1/nimrod/lib - mkdir -p $1/nimrod/doc - - cp bin/nimrod $1/nimrod/bin/nimrod - cp config/nimdoc.cfg $1/nimrod/config/nimdoc.cfg - cp -r -p lib $1/nimrod - cp -r -p doc $1/nimrod - ;; - esac - # write the configuration file - cat >$configdir/nimrod.cfg <<EOF -# Configuration file for the Nimrod Compiler. -# Feel free to edit the default values as you need. - -cc = gcc -lib=$libdir -path="\$lib/base" -path="\$lib/base/gtk" -path="\$lib/base/cairo" -path="\$lib/base/x11" -path="\$lib/base/sdl" -path="\$lib/base/opengl" -path="\$lib/base/zip" -path="\$lib/windows" -path="\$lib/posix" -path="\$lib/ecmas" -path="\$lib/extra" - -@if release: - obj_checks:off - field_checks:off - range_checks:off - bound_checks:off - overflow_checks:off - assertions:off - - stacktrace:off - debugger:off - line_dir:off - opt:speed -@end - -# additional options always passed to the compiler: ---verbosity: "1" -hint[LineTooLong]=off - -@if unix and not bsd: - passl= "-ldl" -@end - -@if icc: - passl = "-cxxlib" - passc = "-cxxlib" -@end - -# Configuration for the GNU C/C++ compiler: -#gcc.exe = "gcc-4.3" -#gcc.linkerExe = "gcc-4.3" -gcc.options.debug = "-g" -@if macosx: - gcc.options.always = "-w -fasm-blocks" -@else: - gcc.options.always = "-w" -@end -gcc.options.speed = "-O3 -fno-strict-aliasing" -gcc.options.size = "-Os" -EOF - echo "installation successful" -else - echo "Nimrod installation script" - echo "Usage: [sudo] sh install.h DIR" - echo "Where DIR may be:" - echo " /usr/bin" - echo " /usr/local/bin" - echo " /opt" - echo " <some other dir> (treated like '/opt')" - echo "To deinstall, use the command:" - echo "sh deinstall.sh DIR" - exit 1 -fi diff --git a/install.txt b/install.txt index c6059882a..568c54282 100644 --- a/install.txt +++ b/install.txt @@ -1,66 +1,66 @@ -Installation -============ - - -Installation on Linux/UNIX --------------------------- - -Note: - A C compiler is required - knowledge of C is not! - -The GNU C Compiler is fully supported, other compilers may work. The C compiler -should be in your ``$PATH`` (most likely the case). Note that some few Linux -distributions do not ship with a GCC compiler preinstalled - then you have to -install it. - -Install Nimrod by downloading the appropriate ``.zip`` file and extracting it -to a directory of your choice. The Nimrod Compiler will stay in this -directory (unless you copy it somewhere else). The compiler does not need -write access to its directory anymore, so copying the nimrod folder to ``/opt`` -does work. - -Then run the following command:: - - sh build.sh - -Unlike other software, Nimrod does not distribute its files over the whole file -hierarchy. This has the advantage that you can deinstall it by just deleting -its folder. The disadvantage is that you have to add it to your ``PATH`` -manually. An alternative is to create a symbolic link in ``/usr/bin``:: - - [sudo] ln -s $your_install_dir/bin/nimrod /usr/bin/nimrod - - -Installation on the Macintosh ------------------------------ - -Only MacOS X is supported. -Since MacOS X is UNIX based too, it works like the installation on Linux. You -need to install Apple's developer's tools for the GNU Compiler Collection -though. - - -Installation on Windows ------------------------ - -Install Nimrod by downloading and running -the ``nimrod_$version.exe`` file. As default, the ``LLVM-GCC`` -compiler is used that is bundled with this installer. You can change -the configuration file to use another C compiler. - -Currently, the following C compilers are supported under Windows: - -- | Microsoft's Visual C++ - | http://msdn.microsoft.com/visualc - | (You need the SDK too - but not the full one: Essential are only - the win32api header files and import libraries.) -- | Gnu C Compiler (the mingw version; the cygwin version has not been tested!) - | http://www.mingw.org/download.shtml -- | LLVM with GNU C/C++ frontend - | http://llvm.org/releases/download.html#2.2 -- | Digital Mars C++ - | http://www.digitalmars.com/download/freecompiler.html - -For better compile times I recommend Digital Mars C++ -- it is easy to install -and a small package. - +Installation +============ + + +Installation on Linux/UNIX +-------------------------- + +Note: + A C compiler is required - knowledge of C is not! + +The GNU C Compiler is fully supported, other compilers may work. The C compiler +should be in your ``$PATH`` (most likely the case). Note that some few Linux +distributions do not ship with a GCC compiler preinstalled - then you have to +install it. + +Install Nimrod by downloading the appropriate ``.zip`` file and extracting it +to a directory of your choice. The Nimrod Compiler will stay in this +directory (unless you copy it somewhere else). The compiler does not need +write access to its directory anymore, so copying the nimrod folder to ``/opt`` +does work. + +Then run the following command:: + + sh build.sh + +Unlike other software, Nimrod does not distribute its files over the whole file +hierarchy. This has the advantage that you can deinstall it by just deleting +its folder. The disadvantage is that you have to add it to your ``PATH`` +manually. An alternative is to create a symbolic link in ``/usr/bin``:: + + [sudo] ln -s $your_install_dir/bin/nimrod /usr/bin/nimrod + + +Installation on the Macintosh +----------------------------- + +Only MacOS X is supported. +Since MacOS X is UNIX based too, it works like the installation on Linux. You +need to install Apple's developer's tools for the GNU Compiler Collection +though. + + +Installation on Windows +----------------------- + +Install Nimrod by downloading and running +the ``nimrod_$version.exe`` file. As default, the ``LLVM-GCC`` +compiler is used that is bundled with this installer. You can change +the configuration file to use another C compiler. + +Currently, the following C compilers are supported under Windows: + +- | Microsoft's Visual C++ + | http://msdn.microsoft.com/visualc + | (You need the SDK too - but not the full one: Essential are only + the win32api header files and import libraries.) +- | Gnu C Compiler (the mingw version; the cygwin version has not been tested!) + | http://www.mingw.org/download.shtml +- | LLVM with GNU C/C++ frontend + | http://llvm.org/releases/download.html#2.2 +- | Digital Mars C++ + | http://www.digitalmars.com/download/freecompiler.html + +For better compile times I recommend Digital Mars C++ -- it is easy to install +and a small package. + diff --git a/koch.py b/koch.py index 1f5ae0d2c..974fdec04 100644 --- a/koch.py +++ b/koch.py @@ -18,7 +18,7 @@ False = 0 == 1 # --------------------- constants ---------------------------------------- -NIMROD_VERSION = '0.7.2' +NIMROD_VERSION = '0.7.4' # This string contains Nimrod's version. It is the only place # where the version needs to be updated. The rest is done by # the build process automatically. It is replaced **everywhere** @@ -35,8 +35,6 @@ force = False GENERATE_DIFF = False # if set, a diff.log file is generated when bootstrapping -# this uses quite a good amount of RAM (ca. 12 MB), so it should not be done -# on underpowered systems. USE_FPC = True @@ -45,31 +43,6 @@ BOOTCMD = "%s cc --compile:build/platdef.c %s rod/nimrod.nim" # -------------------------------------------------------------------------- -DOC = split("""endb intern lib manual nimrodc steps overview""") -SRCDOC = split("""system os strutils base/regexprs math complex times - parseopt hashes strtabs lexbase parsecfg base/dialogs - posix/posix - streams base/odbcsql - base/zip/zipfiles base/zip/zlib base/zip/libzip - """) - -ADD_SRCDOC = split(""" - base/cairo/cairo base/cairo/cairoft - base/cairo/cairowin32 base/cairo/cairoxlib - base/gtk/atk base/gtk/gdk2 base/gtk/gdk2pixbuf - base/gtk/gdkglext base/gtk/glib2 base/gtk/gtk2 - base/gtk/gtkglext base/gtk/gtkhtml base/gtk/libglade2 - base/gtk/pango base/gtk/pangoutils - windows/windows windows/mmsystem windows/nb30 - windows/ole2 windows/shellapi windows/shfolder - base/x11/*.nim - base/opengl/*.nim - base/sdl/*.nim - base/lua/*.nim - """) - -# -------------------------------------------------------------------------- - def Error(msg): sys.exit("[Koch] *** ERROR: " + msg) def Warn(msg): print "[Koch] *** WARNING: " + msg def Echo(msg): print "[Koch] " + msg @@ -140,7 +113,7 @@ BaseDir = _baseDir def Path(a): # Gets a UNIX like path and converts it to a path on this platform. # With UNIX like, I mean: slashes, not backslashes, only relative - # paths ('../etc' can be used) + # paths ('../etc') can be used result = a if os.sep != "/": result = replace(result, "/", os.sep) if os.pardir != "..": result = replace(result, "..", os.pardir) @@ -401,12 +374,12 @@ Options: Possible Commands: nim builds the Pascal version of Nimrod rod [options] builds the Nimrod version of Nimrod (with options) - doc builds the documentation in HTML clean cleans Nimrod project; removes generated files boot [options] bootstraps with given command line options rodsrc generates Nimrod version from Pascal version web generates the website profile profile the Nimrod compiler + csource build the C sources for installation zip build the installation ZIP package inno build the Inno Setup installer """ % (NIMROD_VERSION + ' ' * (44-len(NIMROD_VERSION)), sys.version) @@ -436,7 +409,6 @@ def main(args): cmd = args[i] if cmd == "rod": cmd_rod(join(args[i+1:])) elif cmd == "nim": cmd_nim() - elif cmd == "doc": cmd_doc() elif cmd == "clean": cmd_clean() elif cmd == "boot": cmd_boot(join(args[i+1:])) elif cmd == "rodsrc": cmd_rodsrc() @@ -444,11 +416,14 @@ def main(args): elif cmd == "profile": cmd_profile() elif cmd == "zip": cmd_zip() elif cmd == "inno": cmd_inno() + elif cmd == "csource": cmd_csource() else: Error("illegal command: " + cmd) - -def cmd_zip(): + +def cmd_csource(): Exec("nimrod cc -r tools/niminst --var:version=%s csource rod/nimrod" % NIMROD_VERSION) + +def cmd_zip(): Exec("nimrod cc -r tools/niminst --var:version=%s zip rod/nimrod" % NIMROD_VERSION) @@ -586,50 +561,10 @@ def cmd_profile(): # ------------------ web ------------------------------------------------------ -def buildDoc(destPath): - # call nim for the documentation: - for d in DOC: - Exec("nimrod rst2html --putenv:nimrodversion=%s -o:%s/%s.html " - "--index=%s/theindex doc/%s" % - (NIMROD_VERSION, destPath, d, destPath, d)) - for d in SRCDOC: - Exec("nimrod doc --putenv:nimrodversion=%s -o:%s/%s.html " - "--index=%s/theindex lib/%s" % - (NIMROD_VERSION, destPath, FilenameNoExt(d), destPath, d)) - Exec("nimrod rst2html -o:%s/theindex.html %s/theindex" % (destPath, destPath)) - -def buildAddDoc(destPath): - # build additional documentation (without the index): - def build(d): - c = Changed("web__"+d, ["lib/"+d+".nim"], EXPLAIN) - if c.check() or force: - Exec("nimrod doc --putenv:nimrodversion=%s -o:%s/%s.html " - " lib/%s" % (NIMROD_VERSION, destPath, FilenameNoExt(d), d)) - c.success() - - for a in ADD_SRCDOC: - if '*' in a: - for d in Glob("lib/" + a): build(d) - else: - build(a) - def cmd_web(): Exec("nimrod cc -r tools/nimweb.nim web/nimrod --putenv:nimrodversion=%s" % NIMROD_VERSION) -# ------------------ doc ------------------------------------------------------ - -def cmd_doc(): - c = Changed("doc", ["koch.py"] + - Glob("doc/*.txt") + Glob("lib/*.txt") + Glob("lib/*.nim")+ - Glob("config/*.cfg"), - EXPLAIN) - if c.check() or force: - cmd_nim() # we need Nimrod for processing the documentation - buildDoc("doc") - if Exists("doc/overview.html"): - c.success() - # ----------------------------------------------------------------------------- def getVersion(): diff --git a/lib/arithm.nim b/lib/arithm.nim index 5c8b5726c..b307daba3 100644 --- a/lib/arithm.nim +++ b/lib/arithm.nim @@ -102,51 +102,16 @@ proc absInt(a: int): int {.compilerProc, inline.} = raiseOverflow() const - asmVersion = defined(I386) and (defined(vcc) or defined(wcc) or defined(dmc)) + asmVersion = defined(I386) and (defined(vcc) or defined(wcc) or + defined(dmc) or defined(gcc) or defined(llvm_gcc)) # my Version of Borland C++Builder does not have # tasm32, which is needed for assembler blocks # this is why Borland is not included in the 'when' - useInline = not asmVersion - -when asmVersion and defined(gcc): - proc addInt(a, b: int): int {.compilerProc, pure, inline.} - proc subInt(a, b: int): int {.compilerProc, pure, inline.} - proc mulInt(a, b: int): int {.compilerProc, pure, inline.} - proc divInt(a, b: int): int {.compilerProc, pure, inline.} - proc modInt(a, b: int): int {.compilerProc, pure, inline.} - proc negInt(a: int): int {.compilerProc, pure, inline.} - -elif asmVersion: - proc addInt(a, b: int): int {.compilerProc, pure.} - proc subInt(a, b: int): int {.compilerProc, pure.} - proc mulInt(a, b: int): int {.compilerProc, pure.} - proc divInt(a, b: int): int {.compilerProc, pure.} - proc modInt(a, b: int): int {.compilerProc, pure.} - proc negInt(a: int): int {.compilerProc, pure.} - -elif useInline: - proc addInt(a, b: int): int {.compilerProc, inline.} - proc subInt(a, b: int): int {.compilerProc, inline.} - proc mulInt(a, b: int): int {.compilerProc.} - # mulInt is to large for inlining? - proc divInt(a, b: int): int {.compilerProc, inline.} - proc modInt(a, b: int): int {.compilerProc, inline.} - proc negInt(a: int): int {.compilerProc, inline.} - -else: - proc addInt(a, b: int): int {.compilerProc.} - proc subInt(a, b: int): int {.compilerProc.} - proc mulInt(a, b: int): int {.compilerProc.} - proc divInt(a, b: int): int {.compilerProc.} - proc modInt(a, b: int): int {.compilerProc.} - proc negInt(a: int): int {.compilerProc.} - -# implementation: - -when asmVersion and not defined(gcc): + +when asmVersion and not defined(gcc) and not defined(llvm_gcc): # assembler optimized versions for compilers that # have an intel syntax assembler: - proc addInt(a, b: int): int = + proc addInt(a, b: int): int {.compilerProc, pure.} = # a in eax, and b in edx asm """ mov eax, `a` @@ -156,7 +121,7 @@ when asmVersion and not defined(gcc): theEnd: """ - proc subInt(a, b: int): int = + proc subInt(a, b: int): int {.compilerProc, pure.} = asm """ mov eax, `a` sub eax, `b` @@ -165,7 +130,7 @@ when asmVersion and not defined(gcc): theEnd: """ - proc negInt(a: int): int = + proc negInt(a: int): int {.compilerProc, pure.} = asm """ mov eax, `a` neg eax @@ -174,7 +139,7 @@ when asmVersion and not defined(gcc): theEnd: """ - proc divInt(a, b: int): int = + proc divInt(a, b: int): int {.compilerProc, pure.} = asm """ mov eax, `a` mov ecx, `b` @@ -185,7 +150,7 @@ when asmVersion and not defined(gcc): theEnd: """ - proc modInt(a, b: int): int = + proc modInt(a, b: int): int {.compilerProc, pure.} = asm """ mov eax, `a` mov ecx, `b` @@ -197,7 +162,7 @@ when asmVersion and not defined(gcc): mov eax, edx """ - proc mulInt(a, b: int): int = + proc mulInt(a, b: int): int {.compilerProc, pure.} = asm """ mov eax, `a` mov ecx, `b` @@ -208,99 +173,105 @@ when asmVersion and not defined(gcc): theEnd: """ -elif asmVersion and defined(gcc): - proc addInt(a, b: int): int = - asm """ "addl %1,%%eax\n" - "jno 1\n" - "call _raiseOverflow\n" - "1: \n" - :"=a"(`a`) - :"a"(`a`), "r"(`b`) +elif false: # asmVersion and (defined(gcc) or defined(llvm_gcc)): + proc addInt(a, b: int): int {.compilerProc, inline.} = + # don't use a pure proc here! + asm """ + "addl %%ecx, %%eax\n" + "jno 1\n" + "call _raiseOverflow\n" + "1: \n" + :"=a"(`result`) + :"a"(`a`), "c"(`b`) """ - proc subInt(a, b: int): int = - asm """ "subl %1,%%eax\n" - "jno 1\n" - "call _raiseOverflow\n" - "1: \n" - :"=a"(`a`) - :"a"(`a`), "r"(`b`) + proc subInt(a, b: int): int {.compilerProc, inline.} = + asm """ "subl %%ecx,%%eax\n" + "jno 1\n" + "call _raiseOverflow\n" + "1: \n" + :"=a"(`result`) + :"a"(`a`), "c"(`b`) """ - proc negInt(a: int): int = - asm """ "negl %%eax\n" + proc mulInt(a, b: int): int {.compilerProc, inline.} = + asm """ "xorl %%edx, %%edx\n" + "imull %%ecx\n" "jno 1\n" "call _raiseOverflow\n" "1: \n" - :"=a"(`a`) - :"a"(`a`) + :"=a"(`result`) + :"a"(`a`), "c"(`b`) + :"%edx" """ - proc divInt(a, b: int): int = - asm """ "xorl %%edx, %%edx\n" - "idivl %%ecx\n" - "jno 1\n" - "call _raiseOverflow\n" - "1: \n" - :"=a"(`a`) - :"a"(`a`), "c"(`b`) - :"%edx" + proc negInt(a: int): int {.compilerProc, inline.} = + asm """ "negl %%eax\n" + "jno 1\n" + "call _raiseOverflow\n" + "1: \n" + :"=a"(`result`) + :"a"(`a`) """ - proc modInt(a, b: int): int = + proc divInt(a, b: int): int {.compilerProc, inline.} = asm """ "xorl %%edx, %%edx\n" "idivl %%ecx\n" "jno 1\n" "call _raiseOverflow\n" "1: \n" - "movl %%edx, %%eax" - :"=a"(`a`) - :"a"(`a`), "c"(`b`) - :"%edx" + :"=a"(`result`) + :"a"(`a`), "c"(`b`) + :"%edx" """ - proc mulInt(a, b: int): int = + proc modInt(a, b: int): int {.compilerProc, inline.} = asm """ "xorl %%edx, %%edx\n" - "imull %%ecx\n" + "idivl %%ecx\n" "jno 1\n" "call _raiseOverflow\n" "1: \n" - :"=a"(`a`) - :"a"(`a`), "c"(`b`) - :"%edx" + "movl %%edx, %%eax" + :"=a"(`result`) + :"a"(`a`), "c"(`b`) + :"%edx" """ -else: - # Platform independant versions of the above (slower!) - - proc addInt(a, b: int): int = +# Platform independant versions of the above (slower!) +when not defined(addInt): + proc addInt(a, b: int): int {.compilerProc, inline.} = result = a +% b if (result xor a) >= 0 or (result xor b) >= 0: return result raiseOverflow() - proc subInt(a, b: int): int = +when not defined(subInt): + proc subInt(a, b: int): int {.compilerProc, inline.} = result = a -% b if (result xor a) >= 0 or (result xor not b) >= 0: return result raiseOverflow() - proc negInt(a: int): int = +when not defined(negInt): + proc negInt(a: int): int {.compilerProc, inline.} = if a != low(int): return -a raiseOverflow() - proc divInt(a, b: int): int = +when not defined(divInt): + proc divInt(a, b: int): int {.compilerProc, inline.} = if b == 0: raiseDivByZero() if a == low(int) and b == -1: raiseOverflow() return a div b - proc modInt(a, b: int): int = +when not defined(modInt): + proc modInt(a, b: int): int {.compilerProc, inline.} = if b == 0: raiseDivByZero() return a mod b +when not defined(mulInt): # # This code has been inspired by Python's source code. # The native int product x*y is either exactly right or *way* off, being @@ -321,7 +292,7 @@ else: # the only one that can lose catastrophic amounts of information, it's the # native int product that must have overflowed. # - proc mulInt(a, b: int): int = + proc mulInt(a, b: int): int {.compilerProc.} = var resAsFloat, floatProd: float diff --git a/lib/base/cgi.nim b/lib/base/cgi.nim index 3ed94c9b7..59b7b9d09 100644 --- a/lib/base/cgi.nim +++ b/lib/base/cgi.nim @@ -281,7 +281,7 @@ proc getServerSoftware*(): string = proc setTestData*(keysvalues: openarray[string]) = ## fills the appropriate environment variables to test your CGI application. - ## This can only simulate the 'GET' 'REQUEST_METHOD'. `keysvalues` should + ## This can only simulate the 'GET' request method. `keysvalues` should ## provide embedded (name, value)-pairs. Example: ## ## .. code-block:: Nimrod @@ -300,6 +300,7 @@ proc setTestData*(keysvalues: openarray[string]) = proc writeContentType*() = ## call this before starting to send your HTML data to `stdout`. This ## is just a shorthand for: + ## ## .. code-block:: Nimrod ## write(stdout, "Content-type: text/html\n\n") write(stdout, "Content-type: text/html\n\n") diff --git a/lib/base/gtk/atk.nim b/lib/base/gtk/atk.nim index 8004eccfc..ae7a34c4b 100644 --- a/lib/base/gtk/atk.nim +++ b/lib/base/gtk/atk.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2 diff --git a/lib/base/gtk/gdk2.nim b/lib/base/gtk/gdk2.nim index 66838ab99..0ca5056b5 100644 --- a/lib/base/gtk/gdk2.nim +++ b/lib/base/gtk/gdk2.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2, gdk2pixbuf, pango diff --git a/lib/base/gtk/gdk2pixbuf.nim b/lib/base/gtk/gdk2pixbuf.nim index 8ef3ac0f9..daaa1479b 100644 --- a/lib/base/gtk/gdk2pixbuf.nim +++ b/lib/base/gtk/gdk2pixbuf.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2 diff --git a/lib/base/gtk/gdkglext.nim b/lib/base/gtk/gdkglext.nim index d5e6b128e..524b5f730 100644 --- a/lib/base/gtk/gdkglext.nim +++ b/lib/base/gtk/gdkglext.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import Glib2, Gdk2 diff --git a/lib/base/gtk/glib2.nim b/lib/base/gtk/glib2.nim index dfcc586da..aca1b5551 100644 --- a/lib/base/gtk/glib2.nim +++ b/lib/base/gtk/glib2.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + when defined(windows): const gliblib = "libglib-2.0-0.dll" diff --git a/lib/base/gtk/gtk2.nim b/lib/base/gtk/gtk2.nim index 22bbd3c6c..b20d5e635 100644 --- a/lib/base/gtk/gtk2.nim +++ b/lib/base/gtk/gtk2.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2, atk, pango, gdk2pixbuf, gdk2 diff --git a/lib/base/gtk/gtkglext.nim b/lib/base/gtk/gtkglext.nim index 7d9e35b13..38da5d25e 100644 --- a/lib/base/gtk/gtkglext.nim +++ b/lib/base/gtk/gtkglext.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import Glib2, Gdk2, Gtk2, GdkGLExt diff --git a/lib/base/gtk/gtkhtml.nim b/lib/base/gtk/gtkhtml.nim index 17d3ac56c..d015a78bc 100644 --- a/lib/base/gtk/gtkhtml.nim +++ b/lib/base/gtk/gtkhtml.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import gtk2, glib2, atk, pango, gdk2pixbuf, gdk2 diff --git a/lib/base/gtk/libglade2.nim b/lib/base/gtk/libglade2.nim index cc90b0623..5e323680e 100644 --- a/lib/base/gtk/libglade2.nim +++ b/lib/base/gtk/libglade2.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2, gtk2 diff --git a/lib/base/gtk/pango.nim b/lib/base/gtk/pango.nim index 363650f1f..ade2da989 100644 --- a/lib/base/gtk/pango.nim +++ b/lib/base/gtk/pango.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2 diff --git a/lib/base/gtk/pangoutils.nim b/lib/base/gtk/pangoutils.nim index 6033cca7d..e6f3ab94c 100644 --- a/lib/base/gtk/pangoutils.nim +++ b/lib/base/gtk/pangoutils.nim @@ -1,3 +1,5 @@ +{.deadCodeElim: on.} + import glib2, pango diff --git a/lib/base/sdl/sdl.nim b/lib/base/sdl/sdl.nim index 2c83c4893..7d2b6ba26 100644 --- a/lib/base/sdl/sdl.nim +++ b/lib/base/sdl/sdl.nim @@ -270,7 +270,8 @@ # # -# +{.deadCodeElim: on.} + when defined(windows): const SDLLibName = "SDL.dll" elif defined(macosx): diff --git a/lib/base/sdl/sdl_mixer.nim b/lib/base/sdl/sdl_mixer.nim index b5dd91dfa..f840dc52a 100644 --- a/lib/base/sdl/sdl_mixer.nim +++ b/lib/base/sdl/sdl_mixer.nim @@ -2,93 +2,93 @@ #****************************************************************************** # # $Id: sdl_mixer.pas,v 1.18 2007/05/29 21:31:44 savage Exp $ -# -# -# -# Borland Delphi SDL_Mixer - Simple DirectMedia Layer Mixer Library -# Conversion of the Simple DirectMedia Layer Headers -# -# Portions created by Sam Lantinga <slouken@devolution.com> are -# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga -# 5635-34 Springhouse Dr. -# Pleasanton, CA 94588 (USA) -# -# All Rights Reserved. -# -# The original files are : SDL_mixer.h -# music_cmd.h -# wavestream.h -# timidity.h -# playmidi.h -# music_ogg.h -# mikmod.h -# -# The initial developer of this Pascal code was : -# Dominqiue Louis <Dominique@SavageSoftware.com.au> -# -# Portions created by Dominqiue Louis are -# Copyright (C) 2000 - 2001 Dominqiue Louis. -# -# -# Contributor(s) -# -------------- -# Matthias Thoma <ma.thoma@gmx.de> -# -# Obtained through: -# Joint Endeavour of Delphi Innovators ( Project JEDI ) -# -# You may retrieve the latest version of this file at the Project -# JEDI home page, located at http://delphi-jedi.org -# -# The contents of this file are used with permission, subject to -# the Mozilla Public License Version 1.1 (the "License"); you may -# not use this file except in compliance with the License. You may -# obtain a copy of the License at -# http://www.mozilla.org/MPL/MPL-1.1.html -# -# Software distributed under the License is distributed on an -# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or -# implied. See the License for the specific language governing -# rights and limitations under the License. -# -# Description -# ----------- -# -# -# -# -# -# -# -# Requires -# -------- -# SDL.pas & SMPEG.pas somewhere within your search path. -# -# Programming Notes -# ----------------- -# See the Aliens Demo to see how this library is used -# -# Revision History -# ---------------- -# April 02 2001 - DL : Initial Translation -# -# February 02 2002 - DL : Update to version 1.2.1 -# -# April 03 2003 - DL : Added jedi-sdl.inc include file to support more -# Pascal compilers. Initial support is now included -# for GnuPascal, VirtualPascal, TMT and obviously -# continue support for Delphi Kylix and FreePascal. -# +# +# +# +# Borland Delphi SDL_Mixer - Simple DirectMedia Layer Mixer Library +# Conversion of the Simple DirectMedia Layer Headers +# +# Portions created by Sam Lantinga <slouken@devolution.com> are +# Copyright (C) 1997, 1998, 1999, 2000, 2001 Sam Lantinga +# 5635-34 Springhouse Dr. +# Pleasanton, CA 94588 (USA) +# +# All Rights Reserved. +# +# The original files are : SDL_mixer.h +# music_cmd.h +# wavestream.h +# timidity.h +# playmidi.h +# music_ogg.h +# mikmod.h +# +# The initial developer of this Pascal code was : +# Dominqiue Louis <Dominique@SavageSoftware.com.au> +# +# Portions created by Dominqiue Louis are +# Copyright (C) 2000 - 2001 Dominqiue Louis. +# +# +# Contributor(s) +# -------------- +# Matthias Thoma <ma.thoma@gmx.de> +# +# Obtained through: +# Joint Endeavour of Delphi Innovators ( Project JEDI ) +# +# You may retrieve the latest version of this file at the Project +# JEDI home page, located at http://delphi-jedi.org +# +# The contents of this file are used with permission, subject to +# the Mozilla Public License Version 1.1 (the "License"); you may +# not use this file except in compliance with the License. You may +# obtain a copy of the License at +# http://www.mozilla.org/MPL/MPL-1.1.html +# +# Software distributed under the License is distributed on an +# "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# Description +# ----------- +# +# +# +# +# +# +# +# Requires +# -------- +# SDL.pas & SMPEG.pas somewhere within your search path. +# +# Programming Notes +# ----------------- +# See the Aliens Demo to see how this library is used +# +# Revision History +# ---------------- +# April 02 2001 - DL : Initial Translation +# +# February 02 2002 - DL : Update to version 1.2.1 +# +# April 03 2003 - DL : Added jedi-sdl.inc include file to support more +# Pascal compilers. Initial support is now included +# for GnuPascal, VirtualPascal, TMT and obviously +# continue support for Delphi Kylix and FreePascal. +# # April 24 2003 - DL : under instruction from Alexey Barkovoy, I have added -# better TMT Pascal support and under instruction +# better TMT Pascal support and under instruction # from Prof. Abimbola Olowofoyeku (The African Chief), -# I have added better Gnu Pascal support -# -# April 30 2003 - DL : under instruction from David Mears AKA -# Jason Siletto, I have added FPC Linux support. -# This was compiled with fpc 1.1, so remember to set -# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* -# +# I have added better Gnu Pascal support +# +# April 30 2003 - DL : under instruction from David Mears AKA +# Jason Siletto, I have added FPC Linux support. +# This was compiled with fpc 1.1, so remember to set +# include file path. ie. -Fi/usr/share/fpcsrc/rtl/* +# # # $Log: sdl_mixer.pas,v $ # Revision 1.18 2007/05/29 21:31:44 savage @@ -166,19 +166,19 @@ const MIX_MAJOR_VERSION* = SDL_MIXER_MAJOR_VERSION MIX_MINOR_VERSION* = SDL_MIXER_MINOR_VERSION MIX_PATCHLEVEL* = SDL_MIXER_PATCHLEVEL # SDL_Mixer.h constants - # The default mixer has 8 simultaneous mixing channels - MIX_CHANNELS* = 8 # Good default values for a PC soundcard + # The default mixer has 8 simultaneous mixing channels + MIX_CHANNELS* = 8 # Good default values for a PC soundcard MIX_DEFAULT_FREQUENCY* = 22050 -when defined(IA32): - const +when defined(IA32): + const MIX_DEFAULT_FORMAT* = AUDIO_S16LSB -else: - const +else: + const MIX_DEFAULT_FORMAT* = AUDIO_S16MSB -const +const MIX_DEFAULT_CHANNELS* = 2 - MIX_MAX_VOLUME* = 128 # Volume of a chunk + MIX_MAX_VOLUME* = 128 # Volume of a chunk PATH_MAX* = 255 # mikmod.h constants #* # * Library version @@ -204,7 +204,7 @@ type #music_cmd.h types cvt*: TSDL_AudioCVT PMidiEvent* = ptr TMidiEvent - TMidiEvent*{.final.} = object + TMidiEvent*{.final.} = object time*: int32 channel*: uint8 type_*: uint8 @@ -228,43 +228,43 @@ type #music_cmd.h types len_available*: int snd_available*: PUint8 - TErrorEnum* = enum - MMERR_OPENING_FILE, MMERR_OUT_OF_MEMORY, MMERR_DYNAMIC_LINKING, - MMERR_SAMPLE_TOO_BIG, MMERR_OUT_OF_HANDLES, MMERR_UNKNOWN_WAVE_TYPE, - MMERR_LOADING_PATTERN, MMERR_LOADING_TRACK, MMERR_LOADING_HEADER, - MMERR_LOADING_SAMPLEINFO, MMERR_NOT_A_MODULE, MMERR_NOT_A_STREAM, - MMERR_MED_SYNTHSAMPLES, MMERR_ITPACK_INVALID_DATA, MMERR_DETECTING_DEVICE, - MMERR_INVALID_DEVICE, MMERR_INITIALIZING_MIXER, MMERR_OPENING_AUDIO, - MMERR_8BIT_ONLY, MMERR_16BIT_ONLY, MMERR_STEREO_ONLY, MMERR_ULAW, - MMERR_NON_BLOCK, MMERR_AF_AUDIO_PORT, MMERR_AIX_CONFIG_INIT, - MMERR_AIX_CONFIG_CONTROL, MMERR_AIX_CONFIG_START, MMERR_GUS_SETTINGS, - MMERR_GUS_RESET, MMERR_GUS_TIMER, MMERR_HP_SETSAMPLESIZE, MMERR_HP_SETSPEED, - MMERR_HP_CHANNELS, MMERR_HP_AUDIO_OUTPUT, MMERR_HP_AUDIO_DESC, - MMERR_HP_BUFFERSIZE, MMERR_OSS_SETFRAGMENT, MMERR_OSS_SETSAMPLESIZE, - MMERR_OSS_SETSTEREO, MMERR_OSS_SETSPEED, MMERR_SGI_SPEED, MMERR_SGI_16BIT, - MMERR_SGI_8BIT, MMERR_SGI_STEREO, MMERR_SGI_MONO, MMERR_SUN_INIT, - MMERR_OS2_MIXSETUP, MMERR_OS2_SEMAPHORE, MMERR_OS2_TIMER, MMERR_OS2_THREAD, - MMERR_DS_PRIORITY, MMERR_DS_BUFFER, MMERR_DS_FORMAT, MMERR_DS_NOTIFY, - MMERR_DS_EVENT, MMERR_DS_THREAD, MMERR_DS_UPDATE, MMERR_WINMM_HANDLE, - MMERR_WINMM_ALLOCATED, MMERR_WINMM_DEVICEID, MMERR_WINMM_FORMAT, + TErrorEnum* = enum + MMERR_OPENING_FILE, MMERR_OUT_OF_MEMORY, MMERR_DYNAMIC_LINKING, + MMERR_SAMPLE_TOO_BIG, MMERR_OUT_OF_HANDLES, MMERR_UNKNOWN_WAVE_TYPE, + MMERR_LOADING_PATTERN, MMERR_LOADING_TRACK, MMERR_LOADING_HEADER, + MMERR_LOADING_SAMPLEINFO, MMERR_NOT_A_MODULE, MMERR_NOT_A_STREAM, + MMERR_MED_SYNTHSAMPLES, MMERR_ITPACK_INVALID_DATA, MMERR_DETECTING_DEVICE, + MMERR_INVALID_DEVICE, MMERR_INITIALIZING_MIXER, MMERR_OPENING_AUDIO, + MMERR_8BIT_ONLY, MMERR_16BIT_ONLY, MMERR_STEREO_ONLY, MMERR_ULAW, + MMERR_NON_BLOCK, MMERR_AF_AUDIO_PORT, MMERR_AIX_CONFIG_INIT, + MMERR_AIX_CONFIG_CONTROL, MMERR_AIX_CONFIG_START, MMERR_GUS_SETTINGS, + MMERR_GUS_RESET, MMERR_GUS_TIMER, MMERR_HP_SETSAMPLESIZE, MMERR_HP_SETSPEED, + MMERR_HP_CHANNELS, MMERR_HP_AUDIO_OUTPUT, MMERR_HP_AUDIO_DESC, + MMERR_HP_BUFFERSIZE, MMERR_OSS_SETFRAGMENT, MMERR_OSS_SETSAMPLESIZE, + MMERR_OSS_SETSTEREO, MMERR_OSS_SETSPEED, MMERR_SGI_SPEED, MMERR_SGI_16BIT, + MMERR_SGI_8BIT, MMERR_SGI_STEREO, MMERR_SGI_MONO, MMERR_SUN_INIT, + MMERR_OS2_MIXSETUP, MMERR_OS2_SEMAPHORE, MMERR_OS2_TIMER, MMERR_OS2_THREAD, + MMERR_DS_PRIORITY, MMERR_DS_BUFFER, MMERR_DS_FORMAT, MMERR_DS_NOTIFY, + MMERR_DS_EVENT, MMERR_DS_THREAD, MMERR_DS_UPDATE, MMERR_WINMM_HANDLE, + MMERR_WINMM_ALLOCATED, MMERR_WINMM_DEVICEID, MMERR_WINMM_FORMAT, MMERR_WINMM_UNKNOWN, MMERR_MAC_SPEED, MMERR_MAC_START, MMERR_MAX PMODULE* = ptr TMODULE - TMODULE*{.final.} = object + TMODULE*{.final.} = object PUNIMOD* = ptr TUNIMOD TUNIMOD* = TMODULE #SDL_mixer.h types - # The internal format for an audio chunk + # The internal format for an audio chunk PMix_Chunk* = ptr TMix_Chunk - TMix_Chunk*{.final.} = object + TMix_Chunk*{.final.} = object allocated*: int abuf*: PUint8 alen*: Uint32 - volume*: Uint8 # Per-sample volume, 0-128 - - Mix_Chunk* = TMix_Chunk # The different fading types supported - TMix_Fading* = enum + volume*: Uint8 # Per-sample volume, 0-128 + + Mix_Chunk* = TMix_Chunk # The different fading types supported + TMix_Fading* = enum MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN Mix_Fading* = TMix_Fading - TMix_MusicType* = enum + TMix_MusicType* = enum MUS_NONE, MUS_CMD, MUS_WAV, MUS_MOD, MUS_MID, MUS_OGG, MUS_MP3 Mix_MusicType* = TMix_MusicType # # TMusicUnion = record @@ -279,89 +279,84 @@ type #music_cmd.h types # {$ENDIF} # end; PMix_Music* = ptr TMix_Music - TMix_Music*{.final.} = object # The internal format for a music chunk interpreted via mikmod + TMix_Music*{.final.} = object # The internal format for a music chunk interpreted via mikmod type_*: TMix_MusicType # other fields are not aviable # data : TMusicUnion; # fading : TMix_Fading; # fade_volume : integer; # fade_step : integer; # fade_steps : integer; - # error : integer; - + # error : integer; + TMixFunction* = proc (udata: Pointer, stream: PUint8, length: int): Pointer{. cdecl.} # This macro can be used to fill a version structure with the compile-time - # version of the SDL_mixer library. + # version of the SDL_mixer library. proc SDL_MIXER_VERSION*(X: var TSDL_Version) # This function gets the version of the dynamically linked SDL_mixer library. # It should NOT be used to fill a version structure, instead you should use the - # SDL_MIXER_VERSION() macro. + # SDL_MIXER_VERSION() macro. proc Mix_Linked_Version*(): PSDL_version{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Open the mixer with a certain audio format -proc Mix_OpenAudio*(frequency: int, format: Uint16, channels: int, + # Open the mixer with a certain audio format +proc Mix_OpenAudio*(frequency: int, format: Uint16, channels: int, chunksize: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Dynamically change the number of channels managed by the mixer. # If decreasing the number of channels, the upper channels are # stopped. # This function returns the new number of allocated channels. - # -proc Mix_AllocateChannels*(numchannels: int): int{.cdecl, + # +proc Mix_AllocateChannels*(numchannels: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Find out what the actual audio device parameters are. # This function returns 1 if the audio has been opened, 0 otherwise. - # + # proc Mix_QuerySpec*(frequency: var int, format: var Uint16, channels: var int): int{. cdecl, importc, dynlib: SDL_MixerLibName.} - # Load a wave file or a music (.mod .s3m .it .xm) file -proc Mix_LoadWAV_RW*(src: PSDL_RWops, freesrc: int): PMix_Chunk{.cdecl, + # Load a wave file or a music (.mod .s3m .it .xm) file +proc Mix_LoadWAV_RW*(src: PSDL_RWops, freesrc: int): PMix_Chunk{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_LoadWAV*(filename: cstring): PMix_Chunk -proc Mix_LoadMUS*(filename: cstring): PMix_Music{.cdecl, +proc Mix_LoadMUS*(filename: cstring): PMix_Music{.cdecl, importc, dynlib: SDL_MixerLibName.} - ##if 0 { This hasn't been hooked into music.c yet } - #{ Load a music file from an SDL_RWop object (MikMod-specific currently) - # Matt Campbell (matt@campbellhome.dhs.org) April 2000 } - #function Mix_LoadMUS_RW(SDL_RWops *rw) : PMix_Music; cdecl; - ##endif - # Load a wave file of the mixer format from a memory buffer -proc Mix_QuickLoad_WAV*(mem: PUint8): PMix_Chunk{.cdecl, + # Load a wave file of the mixer format from a memory buffer +proc Mix_QuickLoad_WAV*(mem: PUint8): PMix_Chunk{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Free an audio chunk previously loaded + # Free an audio chunk previously loaded proc Mix_FreeChunk*(chunk: PMix_Chunk){.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_FreeMusic*(music: PMix_Music){.cdecl, importc, dynlib: SDL_MixerLibName.} # Find out the music format of a mixer music, or the currently playing # music, if 'music' is NULL. -proc Mix_GetMusicType*(music: PMix_Music): TMix_MusicType{.cdecl, +proc Mix_GetMusicType*(music: PMix_Music): TMix_MusicType{.cdecl, importc, dynlib: SDL_MixerLibName.} # Set a function that is called after all mixing is performed. # This can be used to provide real-time visual display of the audio stream # or add a custom mixer filter for the stream data. # -proc Mix_SetPostMix*(mix_func: TMixFunction, arg: Pointer){.cdecl, +proc Mix_SetPostMix*(mix_func: TMixFunction, arg: Pointer){.cdecl, importc, dynlib: SDL_MixerLibName.} # Add your own music player or additional mixer function. # If 'mix_func' is NULL, the default music player is re-enabled. - # -proc Mix_HookMusic*(mix_func: TMixFunction, arg: Pointer){.cdecl, + # +proc Mix_HookMusic*(mix_func: TMixFunction, arg: Pointer){.cdecl, importc, dynlib: SDL_MixerLibName.} # Add your own callback when the music has finished playing. - # -proc Mix_HookMusicFinished*(music_finished: Pointer){.cdecl, + # +proc Mix_HookMusicFinished*(music_finished: Pointer){.cdecl, importc, dynlib: SDL_MixerLibName.} - # Get a pointer to the user data for the current music hook + # Get a pointer to the user data for the current music hook proc Mix_GetMusicHookData*(): Pointer{.cdecl, importc, dynlib: SDL_MixerLibName.} #* Add your own callback when a channel has finished playing. NULL # * to disable callback.* -type +type TChannel_finished* = proc (channel: int){.cdecl.} -proc Mix_ChannelFinished*(channel_finished: TChannel_finished){.cdecl, +proc Mix_ChannelFinished*(channel_finished: TChannel_finished){.cdecl, importc, dynlib: SDL_MixerLibName.} -const +const MIX_CHANNEL_POST* = - 2 # This is the format of a special effect callback: # myeffect(int chan, void *stream, int len, void *udata); - # + # # (chan) is the channel number that your effect is affecting. (stream) is # the buffer of data to work upon. (len) is the size of (stream), and # (udata) is a user-defined bit of data, which you pass as the last arg of @@ -372,10 +367,10 @@ const # down the mixing pipeline, through any other effect functions, then finally # to be mixed with the rest of the channels and music for the final output # stream. - # + # -type - TMix_EffectFunc* = proc (chan: int, stream: Pointer, length: int, +type + TMix_EffectFunc* = proc (chan: int, stream: Pointer, length: int, udata: Pointer): Pointer{.cdecl.} # * This is a callback that signifies that a channel has finished all its # * loops and has completed playback. This gets called if the buffer @@ -428,7 +423,7 @@ type # * Error messages can be retrieved from Mix_GetError(). # * -proc Mix_RegisterEffect*(chan: int, f: TMix_EffectFunc, d: TMix_EffectDone, +proc Mix_RegisterEffect*(chan: int, f: TMix_EffectFunc, d: TMix_EffectDone, arg: Pointer): int{.cdecl, importc, dynlib: SDL_MixerLibName.} #* You may not need to call this explicitly, unless you need to stop an # * effect from processing in the middle of a chunk's playback. @@ -438,7 +433,7 @@ proc Mix_RegisterEffect*(chan: int, f: TMix_EffectFunc, d: TMix_EffectDone, # * returns zero if error (no such channel or effect), nonzero if removed. # * Error messages can be retrieved from Mix_GetError(). # * -proc Mix_UnregisterEffect*(channel: int, f: TMix_EffectFunc): int{.cdecl, +proc Mix_UnregisterEffect*(channel: int, f: TMix_EffectFunc): int{.cdecl, importc, dynlib: SDL_MixerLibName.} #* You may not need to call this explicitly, unless you need to stop all # * effects from processing in the middle of a chunk's playback. Note that @@ -451,17 +446,17 @@ proc Mix_UnregisterEffect*(channel: int, f: TMix_EffectFunc): int{.cdecl, # * returns zero if error( no such channel ), nonzero if all effects removed. # * Error messages can be retrieved from Mix_GetError( ). # * -proc Mix_UnregisterAllEffects*(channel: int): int{.cdecl, +proc Mix_UnregisterAllEffects*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} -const - MIX_EFFECTSMAXSPEED* = "MIX_EFFECTSMAXSPEED" +const + MIX_EFFECTSMAXSPEED* = "MIX_EFFECTSMAXSPEED" # * These are the internally - defined mixing effects.They use the same API that # * effects defined in the application use, but are provided here as a # * convenience.Some effects can reduce their quality or use more memory in # * the name of speed; to enable this, make sure the environment variable # * MIX_EFFECTSMAXSPEED( see above ) is defined before you call # * Mix_OpenAudio( ). - # * + # * #* set the panning of a channel.The left and right channels are specified # * as integers between 0 and 255, quietest to loudest, respectively. # * @@ -486,9 +481,9 @@ const # * nonzero if panning effect enabled.Note that an audio device in mono # * mode is a no - op, but this call will return successful in that case . # * Error messages can be retrieved from Mix_GetError( ). - # * + # * -proc Mix_SetPanning*(channel: int, left: Uint8, right: Uint8): int{.cdecl, +proc Mix_SetPanning*(channel: int, left: Uint8, right: Uint8): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # * set the position ofa channel.( angle ) is an integer from 0 to 360, that # * specifies the location of the sound in relation to the listener.( angle ) @@ -526,8 +521,8 @@ proc Mix_SetPanning*(channel: int, left: Uint8, right: Uint8): int{.cdecl, # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), # * nonzero if position effect is enabled. # * Error messages can be retrieved from Mix_GetError( ). - # * -proc Mix_SetPosition*(channel: int, angle: Sint16, distance: Uint8): int{.cdecl, + # * +proc Mix_SetPosition*(channel: int, angle: Sint16, distance: Uint8): int{.cdecl, importc, dynlib: SDL_MixerLibName.} #* set the "distance" of a channel.( distance ) is an integer from 0 to 255 # * that specifies the location of the sound in relation to the listener. @@ -555,8 +550,8 @@ proc Mix_SetPosition*(channel: int, angle: Sint16, distance: Uint8): int{.cdecl, # * returns zero if error( no such channel or Mix_RegisterEffect( )fails ), # * nonzero if position effect is enabled. # * Error messages can be retrieved from Mix_GetError( ). - # * -proc Mix_SetDistance*(channel: int, distance: Uint8): int{.cdecl, + # * +proc Mix_SetDistance*(channel: int, distance: Uint8): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # * # * !!! FIXME : Haven't implemented, since the effect goes past the @@ -600,39 +595,39 @@ proc Mix_SetDistance*(channel: int, distance: Uint8): int{.cdecl, # * nonzero if reversing effect is enabled.Note that an audio device in mono # * mode is a no - op, but this call will return successful in that case . # * Error messages can be retrieved from Mix_GetError( ). - # * -proc Mix_SetReverseStereo*(channel: int, flip: int): int{.cdecl, + # * +proc Mix_SetReverseStereo*(channel: int, flip: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # end of effects API. - -ryan. * # Reserve the first channels (0 -> n-1) for the application, i.e. don't allocate # them dynamically to the next sample if requested with a -1 value below. # Returns the number of reserved channels. - # + # proc Mix_ReserveChannels*(num: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Channel grouping functions + # Channel grouping functions # Attach a tag to a channel. A tag can be assigned to several mixer # channels, to form groups of channels. # If 'tag' is -1, the tag is removed (actually -1 is the tag used to # represent the group of all the channels). # Returns true if everything was OK. - # -proc Mix_GroupChannel*(which: int, tag: int): int{.cdecl, + # +proc Mix_GroupChannel*(which: int, tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Assign several consecutive channels to a group -proc Mix_GroupChannels*(`from`: int, `to`: int, tag: int): int{.cdecl, + # Assign several consecutive channels to a group +proc Mix_GroupChannels*(`from`: int, `to`: int, tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Finds the first available channel in a group of channels + # Finds the first available channel in a group of channels proc Mix_GroupAvailable*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Returns the number of channels in a group. This is also a subtle # way to get the total number of channels when 'tag' is -1 - # + # proc Mix_GroupCount*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Finds the "oldest" sample playing in a group of channels + # Finds the "oldest" sample playing in a group of channels proc Mix_GroupOldest*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Finds the "most recent" (i.e. last) sample playing in a group of channels + # Finds the "most recent" (i.e. last) sample playing in a group of channels proc Mix_GroupNewer*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # The same as above, but the sound is played at most 'ticks' milliseconds -proc Mix_PlayChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, + # The same as above, but the sound is played at most 'ticks' milliseconds +proc Mix_PlayChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, ticks: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Play an audio chunk on a specific channel. # If the specified channel is -1, play on the first free channel. @@ -641,13 +636,13 @@ proc Mix_PlayChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, # Returns which channel was used to play the sound. # proc Mix_PlayChannel*(channel: int, chunk: PMix_Chunk, loops: int): int -proc Mix_PlayMusic*(music: PMix_Music, loops: int): int{.cdecl, +proc Mix_PlayMusic*(music: PMix_Music, loops: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions -proc Mix_FadeInMusic*(music: PMix_Music, loops: int, ms: int): int{.cdecl, + # Fade in music or a channel over "ms" milliseconds, same semantics as the "Play" functions +proc Mix_FadeInMusic*(music: PMix_Music, loops: int, ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} -proc Mix_FadeInChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, - ms: int, ticks: int): int{.cdecl, +proc Mix_FadeInChannelTimed*(channel: int, chunk: PMix_Chunk, loops: int, + ms: int, ticks: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_FadeInChannel*(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int # Set the volume in the range of 0-128 of a specific channel or chunk. @@ -655,12 +650,12 @@ proc Mix_FadeInChannel*(channel: int, chunk: PMix_Chunk, loops: int, ms: int): i # Returns the original volume. # If the specified volume is -1, just return the current volume. # -proc Mix_Volume*(channel: int, volume: int): int{.cdecl, +proc Mix_Volume*(channel: int, volume: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} -proc Mix_VolumeChunk*(chunk: PMix_Chunk, volume: int): int{.cdecl, +proc Mix_VolumeChunk*(chunk: PMix_Chunk, volume: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_VolumeMusic*(volume: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Halt playing of a particular channel + # Halt playing of a particular channel proc Mix_HaltChannel*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_HaltGroup*(tag: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_HaltMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} @@ -668,25 +663,25 @@ proc Mix_HaltMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # The sample will stop playing after the 'ticks' milliseconds have elapsed, # or remove the expiration if 'ticks' is -1 # -proc Mix_ExpireChannel*(channel: int, ticks: int): int{.cdecl, +proc Mix_ExpireChannel*(channel: int, ticks: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Halt a channel, fading it out progressively till it's silent # The ms parameter indicates the number of milliseconds the fading # will take. - # -proc Mix_FadeOutChannel*(which: int, ms: int): int{.cdecl, + # +proc Mix_FadeOutChannel*(which: int, ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_FadeOutGroup*(tag: int, ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_FadeOutMusic*(ms: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Query the fading status of a channel + # Query the fading status of a channel proc Mix_FadingMusic*(): TMix_Fading{.cdecl, importc, dynlib: SDL_MixerLibName.} -proc Mix_FadingChannel*(which: int): TMix_Fading{.cdecl, +proc Mix_FadingChannel*(which: int): TMix_Fading{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Pause/Resume a particular channel + # Pause/Resume a particular channel proc Mix_Pause*(channel: int){.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_Resume*(channel: int){.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_Paused*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Pause/Resume the music stream + # Pause/Resume the music stream proc Mix_PauseMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_ResumeMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_RewindMusic*(){.cdecl, importc, dynlib: SDL_MixerLibName.} @@ -697,16 +692,16 @@ proc Mix_PausedMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # order number) and for OGG music (set position in seconds), at the # moment. # -proc Mix_SetMusicPosition*(position: float64): int{.cdecl, +proc Mix_SetMusicPosition*(position: float64): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Check the status of a specific channel. # If the specified channel is -1, check all channels. # proc Mix_Playing*(channel: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_PlayingMusic*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Stop music and set external music playback command + # Stop music and set external music playback command proc Mix_SetMusicCMD*(command: cstring): int{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Synchro value is set by MikMod from modules while playing + # Synchro value is set by MikMod from modules while playing proc Mix_SetSynchroValue*(value: int): int{.cdecl, importc, dynlib: SDL_MixerLibName.} proc Mix_GetSynchroValue*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # @@ -714,29 +709,29 @@ proc Mix_GetSynchroValue*(): int{.cdecl, importc, dynlib: SDL_MixerLibName.} # Returns nil if it's an invalid channel, or there's no chunk associated. # proc Mix_GetChunk*(channel: int): PMix_Chunk{.cdecl, importc, dynlib: SDL_MixerLibName.} - # Close the mixer, halting all playing audio + # Close the mixer, halting all playing audio proc Mix_CloseAudio*(){.cdecl, importc, dynlib: SDL_MixerLibName.} - # We'll use SDL for reporting errors + # We'll use SDL for reporting errors proc Mix_SetError*(fmt: cstring) proc Mix_GetError*(): cstring # implementation -proc SDL_MIXER_VERSION(X: var TSDL_version) = +proc SDL_MIXER_VERSION(X: var TSDL_version) = X.major = SDL_MIXER_MAJOR_VERSION X.minor = SDL_MIXER_MINOR_VERSION X.patch = SDL_MIXER_PATCHLEVEL -proc Mix_LoadWAV(filename: cstring): PMix_Chunk = +proc Mix_LoadWAV(filename: cstring): PMix_Chunk = result = Mix_LoadWAV_RW(SDL_RWFromFile(filename, "rb"), 1) -proc Mix_PlayChannel(channel: int, chunk: PMix_Chunk, loops: int): int = +proc Mix_PlayChannel(channel: int, chunk: PMix_Chunk, loops: int): int = result = Mix_PlayChannelTimed(channel, chunk, loops, - 1) -proc Mix_FadeInChannel(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int = +proc Mix_FadeInChannel(channel: int, chunk: PMix_Chunk, loops: int, ms: int): int = result = Mix_FadeInChannelTimed(channel, chunk, loops, ms, - 1) -proc Mix_SetError(fmt: cstring) = +proc Mix_SetError(fmt: cstring) = SDL_SetError(fmt) -proc Mix_GetError(): cstring = +proc Mix_GetError(): cstring = result = SDL_GetError() diff --git a/lib/dyncalls.nim b/lib/dyncalls.nim index 7d7ade26c..6e74a9698 100644 --- a/lib/dyncalls.nim +++ b/lib/dyncalls.nim @@ -126,5 +126,5 @@ elif defined(mac): nss = NSLookupSymbolInModule(NSModule(lib), name) result = TProcAddr(NSAddressOfSymbol(nss)) -else: # workaround a newly introduced bug :-( +else: {.error: "no implementation for dyncalls".} diff --git a/lib/ecmasys.nim b/lib/ecmasys.nim index 2bbbd5f79..e26e763be 100644 --- a/lib/ecmasys.nim +++ b/lib/ecmasys.nim @@ -326,6 +326,9 @@ proc echo*(x: cstring) = ewriteln(x) proc echo[Ty](x: Ty) = echo(x) +proc echo[Ty](x: openArray[Ty]) = + for a in items(x): echo(a) + # Arithmetic: proc addInt(a, b: int): int {.pure, compilerproc.} = asm """ diff --git a/lib/excpt.nim b/lib/excpt.nim index 9c87fab55..be307af09 100644 --- a/lib/excpt.nim +++ b/lib/excpt.nim @@ -61,9 +61,6 @@ type filename: CString len: int # length of slots (when not debugging always zero) - TTempFrame = tuple[ # used for recursion elimination in WriteStackTrace - procname: CString, line: int] - var buf: string # cannot be allocated on the stack! assertBuf: string # we need a different buffer for @@ -72,33 +69,45 @@ var framePtr {.exportc.}: PFrame - tempFrames: array [0..255, TTempFrame] # cannot be allocated - # on the stack! + tempFrames: array [0..127, PFrame] # cannot be allocated on the stack! proc auxWriteStackTrace(f: PFrame, s: var string) = + const + firstCalls = 32 var it = f i = 0 total = 0 - while it != nil and i <= high(tempFrames): - tempFrames[i] = (it.procname, it.line) + while it != nil and i <= high(tempFrames)-(firstCalls-1): + # the (-1) is for a nil entry that marks where the '...' should occur + tempFrames[i] = it inc(i) inc(total) it = it.prev + var b = it while it != nil: inc(total) it = it.prev - # if the buffer overflowed print '...': + for j in 1..total-i-(firstCalls-1): + if b != nil: b = b.prev if total != i: - add(s, "(") - add(s, $(total-i)) - add(s, " calls omitted) ...\n") + tempFrames[i] = nil + inc(i) + while b != nil and i <= high(tempFrames): + tempFrames[i] = b + inc(i) + b = b.prev for j in countdown(i-1, 0): - add(s, $tempFrames[j].procname) - if tempFrames[j].line > 0: - add(s, ", line: ") - add(s, $tempFrames[j].line) - add(s, "\n") + if tempFrames[j] == nil: + add(s, "(") + add(s, $(total-i-1)) + add(s, " calls omitted) ...\n") + else: + add(s, $tempFrames[j].procname) + if tempFrames[j].line > 0: + add(s, ", line: ") + add(s, $tempFrames[j].line) + add(s, "\n") proc rawWriteStackTrace(s: var string) = if framePtr == nil: @@ -156,8 +165,7 @@ proc internalAssert(file: cstring, line: int, cond: bool) {.compilerproc.} = raise gAssertionFailed # newException(EAssertionFailed, assertBuf) proc WriteStackTrace() = - var - s: string = "" + var s = "" rawWriteStackTrace(s) writeToStdErr(s) @@ -208,13 +216,13 @@ assertBuf = newString(2048) setLen(buf, 0) setLen(assertBuf, 0) -proc raiseRangeError(val: biggestInt) {.compilerproc, noreturn.} = +proc raiseRangeError(val: biggestInt) {.compilerproc, noreturn, noinline.} = raise newException(EOutOfRange, "value " & $val & " out of range") -proc raiseIndexError() {.compilerproc, noreturn.} = +proc raiseIndexError() {.compilerproc, noreturn, noinline.} = raise newException(EInvalidIndex, "index out of bounds") -proc raiseFieldError(f: string) {.compilerproc, noreturn.} = +proc raiseFieldError(f: string) {.compilerproc, noreturn, noinline.} = raise newException(EInvalidField, f & " is not accessible") proc chckIndx(i, a, b: int): int = diff --git a/lib/gc.nim b/lib/gc.nim index a103bfc22..e5e8072c5 100644 --- a/lib/gc.nim +++ b/lib/gc.nim @@ -13,11 +13,10 @@ # * incremental # * non-recursive # * generational -# * excellent performance # Future Improvements: # * Both dlmalloc and TLSF lack zero-overhead object allocation. Thus, for -# small objects we will should use our own allocator. +# small objects we should use our own allocator. # * Support for multi-threading. However, locks for the reference counting # might turn out to be too slow. @@ -332,7 +331,7 @@ proc CellSetPut(t: var TCellSet, key: TAddress): PPageDesc = # ---------- slightly higher level procs -------------------------------------- -proc in_Operator(s: TCellSet, cell: PCell): bool = +proc contains(s: TCellSet, cell: PCell): bool = var u = cast[TAddress](cell) var t = CellSetGet(s, u shr PageShift) if t != nil: @@ -468,23 +467,6 @@ proc prepareDealloc(cell: PCell) = proc setStackBottom(theStackBottom: pointer) {.compilerproc.} = stackBottom = theStackBottom -proc initGC() = - when traceGC: - for i in low(TCellState)..high(TCellState): CellSetInit(states[i]) - gch.stackScans = 0 - gch.cycleCollections = 0 - gch.maxThreshold = 0 - gch.maxStackSize = 0 - gch.maxStackPages = 0 - gch.cycleTableSize = 0 - # init the rt - init(gch.zct) - init(gch.tempStack) - CellSetInit(gch.cycleRoots) - CellSetInit(gch.stackCells) - gch.mask = 0 - new(gOutOfMem) # reserve space for the EOutOfMemory exception here! - proc PossibleRoot(gch: var TGcHeap, c: PCell) {.inline.} = if canbeCycleRoot(c): incl(gch.cycleRoots, c) @@ -535,6 +517,23 @@ proc unsureAsgnRef(dest: ppointer, src: pointer) = if dest^ != nil: decRef(usrToCell(dest^)) dest^ = src +proc initGC() = + when traceGC: + for i in low(TCellState)..high(TCellState): CellSetInit(states[i]) + gch.stackScans = 0 + gch.cycleCollections = 0 + gch.maxThreshold = 0 + gch.maxStackSize = 0 + gch.maxStackPages = 0 + gch.cycleTableSize = 0 + # init the rt + init(gch.zct) + init(gch.tempStack) + CellSetInit(gch.cycleRoots) + CellSetInit(gch.stackCells) + gch.mask = 0 + new(gOutOfMem) # reserve space for the EOutOfMemory exception here! + proc getDiscriminant(aa: Pointer, n: ptr TNimNode): int = assert(n.kind == nkCase) var d: int diff --git a/lib/lexbase.nim b/lib/lexbase.nim index ea9a61821..f6861a5b6 100644 --- a/lib/lexbase.nim +++ b/lib/lexbase.nim @@ -151,8 +151,7 @@ proc open(L: var TBaseLexer, input: PStream, bufLen: int = 8192) = skip_UTF_8_BOM(L) proc getColNumber(L: TBaseLexer, pos: int): int = - result = pos - L.lineStart - assert(result >= 0) + result = abs(pos - L.lineStart) proc getCurrentLine(L: TBaseLexer, marker: bool = true): string = var i: int diff --git a/lib/macros.nim b/lib/macros.nim index 809531c4c..f2783b637 100644 --- a/lib/macros.nim +++ b/lib/macros.nim @@ -30,59 +30,59 @@ # if key[-4:] == "Flag": continue # cog.out(toEnum(key, val)) #]]] -type - TNimrodTypeKind* = enum - ntyNone, ntyBool, ntyChar, ntyEmpty, - ntyArrayConstr, ntyNil, ntyGeneric, ntyGenericInst, - ntyGenericParam, ntyEnum, ntyAnyEnum, ntyArray, - ntyObject, ntyTuple, ntySet, ntyRange, - ntyPtr, ntyRef, ntyVar, ntySequence, - ntyProc, ntyPointer, ntyOpenArray, ntyString, - ntyCString, ntyForward, ntyInt, ntyInt8, - ntyInt16, ntyInt32, ntyInt64, ntyFloat, - ntyFloat32, ntyFloat64, ntyFloat128 - TNimTypeKinds* = set[TNimrodTypeKind] - TNimrodSymKind* = enum - nskUnknownSym, nskConditional, nskDynLib, nskParam, - nskTypeParam, nskTemp, nskType, nskConst, - nskVar, nskProc, nskIterator, nskConverter, - nskMacro, nskTemplate, nskField, nskEnumField, - nskForVar, nskModule, nskLabel, nskStub - TNimSymKinds* = set[TNimrodSymKind] - TNimrodNodeKind* = enum - nnkNone, nnkEmpty, nnkIdent, nnkSym, - nnkType, nnkCharLit, nnkIntLit, nnkInt8Lit, - nnkInt16Lit, nnkInt32Lit, nnkInt64Lit, nnkFloatLit, - nnkFloat32Lit, nnkFloat64Lit, nnkStrLit, nnkRStrLit, - nnkTripleStrLit, nnkMetaNode, nnkNilLit, nnkDotCall, - nnkCommand, nnkCall, nnkGenericCall, nnkExplicitTypeListCall, - nnkExprEqExpr, nnkExprColonExpr, nnkIdentDefs, nnkInfix, - nnkPrefix, nnkPostfix, nnkPar, nnkCurly, - nnkBracket, nnkBracketExpr, nnkPragmaExpr, nnkRange, - nnkDotExpr, nnkCheckedFieldExpr, nnkDerefExpr, nnkIfExpr, - nnkElifExpr, nnkElseExpr, nnkLambda, nnkAccQuoted, - nnkHeaderQuoted, nnkTableConstr, nnkQualified, nnkHiddenStdConv, - nnkHiddenSubConv, nnkHiddenCallConv, nnkConv, nnkCast, - nnkAddr, nnkHiddenAddr, nnkHiddenDeref, nnkObjDownConv, - nnkObjUpConv, nnkChckRangeF, nnkChckRange64, nnkChckRange, - nnkStringToCString, nnkCStringToString, nnkPassAsOpenArray, nnkAsgn, - nnkDefaultTypeParam, nnkGenericParams, nnkFormalParams, nnkOfInherit, - nnkModule, nnkProcDef, nnkConverterDef, nnkMacroDef, - nnkTemplateDef, nnkIteratorDef, nnkOfBranch, nnkElifBranch, - nnkExceptBranch, nnkElse, nnkMacroStmt, nnkAsmStmt, - nnkPragma, nnkIfStmt, nnkWhenStmt, nnkForStmt, - nnkWhileStmt, nnkCaseStmt, nnkVarSection, nnkConstSection, - nnkConstDef, nnkTypeSection, nnkTypeDef, nnkYieldStmt, - nnkTryStmt, nnkFinally, nnkRaiseStmt, nnkReturnStmt, - nnkBreakStmt, nnkContinueStmt, nnkBlockStmt, nnkDiscardStmt, - nnkStmtList, nnkImportStmt, nnkFromStmt, nnkImportAs, - nnkIncludeStmt, nnkAccessStmt, nnkCommentStmt, nnkStmtListExpr, - nnkBlockExpr, nnkStmtListType, nnkBlockType, nnkVm, - nnkTypeOfExpr, nnkObjectTy, nnkTupleTy, nnkRecList, - nnkRecCase, nnkRecWhen, nnkRefTy, nnkPtrTy, - nnkVarTy, nnkProcTy, nnkEnumTy, nnkEnumFieldDef, - nnkReturnToken - TNimNodeKinds* = set[TNimrodNodeKind] +type + TNimrodNodeKind* = enum + nnkNone, nnkEmpty, nnkIdent, nnkSym, + nnkType, nnkCharLit, nnkIntLit, nnkInt8Lit, + nnkInt16Lit, nnkInt32Lit, nnkInt64Lit, nnkFloatLit, + nnkFloat32Lit, nnkFloat64Lit, nnkStrLit, nnkRStrLit, + nnkTripleStrLit, nnkMetaNode, nnkNilLit, nnkDotCall, + nnkCommand, nnkCall, nnkGenericCall, nnkExplicitTypeListCall, + nnkExprEqExpr, nnkExprColonExpr, nnkIdentDefs, nnkVarTuple, + nnkInfix, nnkPrefix, nnkPostfix, nnkPar, + nnkCurly, nnkBracket, nnkBracketExpr, nnkPragmaExpr, + nnkRange, nnkDotExpr, nnkCheckedFieldExpr, nnkDerefExpr, + nnkIfExpr, nnkElifExpr, nnkElseExpr, nnkLambda, + nnkAccQuoted, nnkHeaderQuoted, nnkTableConstr, nnkQualified, + nnkHiddenStdConv, nnkHiddenSubConv, nnkHiddenCallConv, nnkConv, + nnkCast, nnkAddr, nnkHiddenAddr, nnkHiddenDeref, + nnkObjDownConv, nnkObjUpConv, nnkChckRangeF, nnkChckRange64, + nnkChckRange, nnkStringToCString, nnkCStringToString, nnkPassAsOpenArray, + nnkAsgn, nnkFastAsgn, nnkDefaultTypeParam, nnkGenericParams, + nnkFormalParams, nnkOfInherit, nnkModule, nnkProcDef, + nnkConverterDef, nnkMacroDef, nnkTemplateDef, nnkIteratorDef, + nnkOfBranch, nnkElifBranch, nnkExceptBranch, nnkElse, + nnkMacroStmt, nnkAsmStmt, nnkPragma, nnkIfStmt, + nnkWhenStmt, nnkForStmt, nnkWhileStmt, nnkCaseStmt, + nnkVarSection, nnkConstSection, nnkConstDef, nnkTypeSection, + nnkTypeDef, nnkYieldStmt, nnkTryStmt, nnkFinally, + nnkRaiseStmt, nnkReturnStmt, nnkBreakStmt, nnkContinueStmt, + nnkBlockStmt, nnkDiscardStmt, nnkStmtList, nnkImportStmt, + nnkFromStmt, nnkImportAs, nnkIncludeStmt, nnkAccessStmt, + nnkCommentStmt, nnkStmtListExpr, nnkBlockExpr, nnkStmtListType, + nnkBlockType, nnkVm, nnkTypeOfExpr, nnkObjectTy, + nnkTupleTy, nnkRecList, nnkRecCase, nnkRecWhen, + nnkRefTy, nnkPtrTy, nnkVarTy, nnkProcTy, + nnkEnumTy, nnkEnumFieldDef, nnkReturnToken + TNimNodeKinds* = set[TNimrodNodeKind] + TNimrodTypeKind* = enum + ntyNone, ntyBool, ntyChar, ntyEmpty, + ntyArrayConstr, ntyNil, ntyGeneric, ntyGenericInst, + ntyGenericParam, ntyEnum, ntyAnyEnum, ntyArray, + ntyObject, ntyTuple, ntySet, ntyRange, + ntyPtr, ntyRef, ntyVar, ntySequence, + ntyProc, ntyPointer, ntyOpenArray, ntyString, + ntyCString, ntyForward, ntyInt, ntyInt8, + ntyInt16, ntyInt32, ntyInt64, ntyFloat, + ntyFloat32, ntyFloat64, ntyFloat128 + TNimTypeKinds* = set[TNimrodTypeKind] + TNimrodSymKind* = enum + nskUnknownSym, nskConditional, nskDynLib, nskParam, + nskTypeParam, nskTemp, nskType, nskConst, + nskVar, nskProc, nskIterator, nskConverter, + nskMacro, nskTemplate, nskField, nskEnumField, + nskForVar, nskModule, nskLabel, nskStub + TNimSymKinds* = set[TNimrodSymKind] #[[[end]]] type diff --git a/lib/nimbase.h b/lib/nimbase.h index f7e41f2b1..378b66278 100644 --- a/lib/nimbase.h +++ b/lib/nimbase.h @@ -421,18 +421,4 @@ struct NimException { }; #endif -#if 0 -typedef struct TStringDesc { - NI len; - NI space; - NIM_CHAR data[1]; /* SEQ_DECL_SIZE]; */ -} TStringDesc; - -typedef struct { - NI len, space; -} TGenericSeq; - -typedef TGenericSeq* PGenericSeq; -#endif - #endif diff --git a/lib/os.nim b/lib/os.nim index fa53fa3e2..bffc6014c 100644 --- a/lib/os.nim +++ b/lib/os.nim @@ -11,6 +11,7 @@ ## retrieving environment variables, reading command line arguments, ## working with directories, running shell commands, etc. ## This module is -- like any other basic library -- platform independant. +{.deadCodeElim: on.} {.push debugger: off.} @@ -863,9 +864,9 @@ var when defined(windows): # because we support Windows GUI applications, things get really # messy here... - proc GetEnvironmentStringsA*(): cstring {. + proc GetEnvironmentStringsA(): cstring {. stdcall, dynlib: "kernel32", importc.} - proc FreeEnvironmentStringsA*(para1: cstring): int32 {. + proc FreeEnvironmentStringsA(para1: cstring): int32 {. stdcall, dynlib: "kernel32", importc.} proc strEnd(cstr: CString, c = 0): CString {.importc: "strchr", nodecl.} @@ -1091,8 +1092,8 @@ proc expandFilename(filename: string): string = proc parseCmdLine*(c: string): seq[string] = ## Splits a command line into several components; components are separated by - ## whitespace or are quoted with the ``"`` or ``'`` characters. This proc is - ## only occassionally useful, better use the `parseopt` module. + ## whitespace unless the whitespace occurs within ``"`` or ``'`` quotes. + ## This proc is only occassionally useful, better use the `parseopt` module. result = @[] var i = 0 while c[i] != '\0': diff --git a/lib/parsecfg.nim b/lib/parsecfg.nim index a148f3e3a..2508c8bd6 100644 --- a/lib/parsecfg.nim +++ b/lib/parsecfg.nim @@ -54,7 +54,7 @@ type TTokKind = enum tkInvalid, tkEof, tkSymbol, tkEquals, tkColon, tkBracketLe, tkBracketRi, tkDashDash - TToken{.final.} = object # a token + TToken {.final.} = object # a token kind: TTokKind # the type of the token literal: string # the parsed (string) literal @@ -139,7 +139,7 @@ proc getEscapedChar(c: var TCfgParser, tok: var TToken) = inc(c.bufpos) # skip '\' case c.buf[c.bufpos] of 'n', 'N': - tok.literal = tok.literal & nl + add(tok.literal, nl) Inc(c.bufpos) of 'r', 'R', 'c', 'C': add(tok.literal, '\c') diff --git a/lib/parseopt.nim b/lib/parseopt.nim index 243b7497f..1cce0a11e 100644 --- a/lib/parseopt.nim +++ b/lib/parseopt.nim @@ -53,7 +53,7 @@ proc init(cmdline: string = ""): TOptParser = else: result.cmd = "" for i in countup(1, ParamCount()): - result.cmd = result.cmd & quoteIfSpaceExists(paramStr(i)) & ' ' + result.cmd = result.cmd & quoteIfContainsWhite(paramStr(i)) & ' ' result.kind = cmdEnd result.key = "" result.val = "" diff --git a/lib/repr.nim b/lib/repr.nim index 2f29d839d..7f5b0d33c 100644 --- a/lib/repr.nim +++ b/lib/repr.nim @@ -22,12 +22,12 @@ proc reprPointer(x: pointer): string {.compilerproc.} = proc reprStrAux(result: var string, s: string) = if cast[pointer](s) == nil: - add result "nil" + add result, "nil" return add result, reprPointer(cast[pointer](s)) & "\"" for c in items(s): case c - of '"': add result "\\\"" + of '"': add result, "\\\"" of '\\': add result, "\\\\" # BUGFIX: forgotten of '\10': add result, "\\10\"\n\"" # " \n " # better readability of '\128' .. '\255', '\0'..'\9', '\11'..'\31': diff --git a/lib/strutils.nim b/lib/strutils.nim index 7e1a329d6..6189c6a88 100644 --- a/lib/strutils.nim +++ b/lib/strutils.nim @@ -12,6 +12,8 @@ ## All the routines here are avaiable for the EMCAScript target ## too! +{.deadCodeElim: on.} + {.push debugger:off .} # the user does not want to trace a part # of the standard library! @@ -41,19 +43,19 @@ proc strip*(s: string): string {.noSideEffect.} proc toLower*(s: string): string {.noSideEffect.} ## Converts `s` into lower case. This works only for the letters A-Z. - ## See `charsets.nativeToLower` for a version that is locale-dependant. + ## See `unicode.toLower` for a version that works for any Unicode character. proc toLower*(c: Char): Char {.noSideEffect.} ## Converts `c` into lower case. This works only for the letters A-Z. - ## See `charsets.nativeToLower()` for a version that is locale-dependant. + ## See `unicode.toLower` for a version that works for any Unicode character. proc toUpper*(s: string): string {.noSideEffect.} ## Converts `s` into upper case. This works only for the letters a-z. - ## See `charsets.nativeToUpper()` for a version that is locale-dependant. + ## See `unicode.toUpper` for a version that works for any Unicode character. proc toUpper*(c: Char): Char {.noSideEffect.} ## Converts `c` into upper case. This works only for the letters a-z. - ## See `charsets.nativeToUpper()` for a version that is locale-dependant. + ## See `unicode.toUpper` for a version that works for any Unicode character. proc capitalize*(s: string): string {.noSideEffect.} ## Converts the first character of `s` into upper case. @@ -71,6 +73,10 @@ proc findSubStr*(sub: char, s: string, start: int = 0): int {.noSideEffect.} ## Searches for `sub` in `s` starting at position `start`. Searching is ## case-sensitive. If `sub` is not in `s`, -1 is returned. +proc findChars*(chars: set[char], s: string, start: int = 0): int {.noSideEffect.} + ## Searches for `chars` in `s` starting at position `start`. If `s` contains + ## none of the characters in `chars`, -1 is returned. + proc replaceStr*(s, sub, by: string): string {.noSideEffect.} ## Replaces `sub` in `s` by the string `by`. @@ -173,11 +179,14 @@ proc cmpIgnoreStyle*(a, b: string): int {.noSideEffect.} ## | < 0 iff a < b ## | > 0 iff a > b -proc in_Operator*(s: string, c: char): bool {.noSideEffect.} - ## Same as `findSubStr(c, s) >= 0`. +proc contains*(s: string, c: char): bool {.noSideEffect.} + ## Same as ``findSubStr(c, s) >= 0``. -proc in_Operator*(s, sub: string): bool {.noSideEffect.} - ## Same as `findSubStr(sub, s) >= 0`. +proc contains*(s, sub: string): bool {.noSideEffect.} + ## Same as ``findSubStr(sub, s) >= 0``. + +proc contains*(s: string, chars: set[char]): bool {.noSideEffect.} + ## Same as ``findChars(s, chars) >= 0``. proc toHex*(x: BiggestInt, len: int): string {.noSideEffect.} ## Converts `x` to its hexadecimal representation. The resulting string @@ -259,10 +268,10 @@ proc allCharsInSet*(s: string, theSet: TCharSet): bool = if not (c in theSet): return false return true -proc quoteIfSpaceExists*(s: string): string = +proc quoteIfContainsWhite*(s: string): string = ## returns ``'"' & s & '"'`` if `s` contains a space and does not ## start with a quote, else returns `s` - if findSubStr(' ', s) >= 0 and s[0] != '"': + if findChars({' ', '\t'}, s) >= 0 and s[0] != '"': result = '"' & s & '"' else: result = s @@ -488,11 +497,19 @@ proc findSubStr(sub: char, s: string, start: int = 0): int = for i in start..len(s)-1: if sub == s[i]: return i return -1 + +proc findChars(chars: set[char], s: string, start: int = 0): int = + for i in start..s.len-1: + if s[i] in chars: return i + return -1 + +proc contains(s: string, chars: set[char]): bool = + return findChars(chars, s) >= 0 -proc in_Operator(s: string, c: char): bool = +proc contains(s: string, c: char): bool = return findSubStr(c, s) >= 0 -proc in_Operator(s, sub: string): bool = +proc contains(s, sub: string): bool = return findSubStr(sub, s) >= 0 proc replaceStr(s, sub, by: string): string = diff --git a/lib/sysio.nim b/lib/sysio.nim index c178ff559..d79b5e287 100644 --- a/lib/sysio.nim +++ b/lib/sysio.nim @@ -91,10 +91,13 @@ proc writeln[Ty](f: TFile, x: Ty) = write(f, "\n") proc writeln[Ty](f: TFile, x: openArray[Ty]) = - write(f, x) + for i in items(x): write(f, i) write(f, "\n") proc echo[Ty](x: Ty) = writeln(stdout, x) +proc echo[Ty](x: openArray[Ty]) = + for i in items(x): write(stdout, i) + write(stdout, "\n") # interface to the C procs: proc fopen(filename, mode: CString): pointer {.importc: "fopen", noDecl.} diff --git a/lib/sysstr.nim b/lib/sysstr.nim index 921a92ff5..72f50f85a 100644 --- a/lib/sysstr.nim +++ b/lib/sysstr.nim @@ -15,13 +15,6 @@ # we don't use refcounts because that's a behaviour # the programmer may not want -type - # len and space without counting the terminating zero: - NimStringDesc {.compilerproc, final.} = object of TGenericSeq - data: array[0..100_000_000, char] # for the '\0' character - - NimString = ptr NimStringDesc - # implementation: proc resize(old: int): int {.inline.} = diff --git a/lib/system.nim b/lib/system.nim index 97ad7297a..1ac6a8445 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -58,6 +58,17 @@ proc defined*[T] (x: T): bool {.magic: "Defined", noSideEffect.} proc `not` *(x: bool): bool {.magic: "Not", noSideEffect.} ## Boolean not; returns true iff ``x == false``. +proc `and`*(x, y: bool): bool {.magic: "And", noSideEffect.} + ## Boolean ``and``; returns true iff ``x == y == true``. + ## Evaluation is short-circuited: This means that if ``x`` is false, + ## ``y`` will not even be evaluated. +proc `or`*(x, y: bool): bool {.magic: "Or", noSideEffect.} + ## Boolean ``or``; returns true iff ``not (not x and not y)``. + ## Evaluation is short-circuited: This means that if ``x`` is true, + ## ``y`` will not even be evaluated. +proc `xor`*(x, y: bool): bool {.magic: "Xor", noSideEffect.} + ## Boolean `exclusive or`; returns true iff ``x != y``. + proc new*[T](a: var ref T) {.magic: "New".} ## creates a new object of type ``T`` and returns a safe (traced) ## reference to it in ``a``. @@ -94,6 +105,19 @@ type seq*{.magic: "Seq".}[T] ## Generic type to construct sequences. set*{.magic: "Set".}[T] ## Generic type to construct bit sets. +when not defined(EcmaScript) and not defined(NimrodVM): + type + TGenericSeq {.compilerproc, pure.} = object + len, space: int + PGenericSeq {.exportc.} = ptr TGenericSeq + # len and space without counting the terminating zero: + NimStringDesc {.compilerproc, final.} = object of TGenericSeq + data: array[0..100_000_000, char] + NimString = ptr NimStringDesc + + include hti + +type Byte* = Int8 ## this is an alias for ``int8``, that is a signed ## int 8 bits wide. @@ -403,8 +427,8 @@ proc abs*(x: int8): int8 {.magic: "AbsI", noSideEffect.} proc abs*(x: int16): int16 {.magic: "AbsI", noSideEffect.} proc abs*(x: int32): int32 {.magic: "AbsI", noSideEffect.} proc abs*(x: int64): int64 {.magic: "AbsI64", noSideEffect.} - ## returns the absolute value of `x`. If `x` is ``low(x)`` (that is - ## -MININT for its type), an overflow exception is thrown (if overflow + ## returns the absolute value of `x`. If `x` is ``low(x)`` (that + ## is -MININT for its type), an overflow exception is thrown (if overflow ## checking is turned on). proc min*(x, y: int): int {.magic: "MinI", noSideEffect.} @@ -500,18 +524,6 @@ proc abs*(x: float): float {.magic: "AbsF64", noSideEffect.} proc min*(x, y: float): float {.magic: "MinF64", noSideEffect.} proc max*(x, y: float): float {.magic: "MaxF64", noSideEffect.} -# boolean operators: -proc `and`*(x, y: bool): bool {.magic: "And", noSideEffect.} - ## Boolean ``and``; returns true iff ``x == y == true``. - ## Evaluation is short-circuited: This means that if ``x`` is false, - ## ``y`` will not even be evaluated. -proc `or`*(x, y: bool): bool {.magic: "Or", noSideEffect.} - ## Boolean ``or``; returns true iff ``not (not x and not y)``. - ## Evaluation is short-circuited: This means that if ``x`` is true, - ## ``y`` will not even be evaluated. -proc `xor`*(x, y: bool): bool {.magic: "Xor", noSideEffect.} - ## Boolean `exclusive or`; returns true iff ``x != y``. - # set operators proc `*` *[T](x, y: set[T]): set[T] {.magic: "MulSet", noSideEffect.} ## This operator computes the intersection of two sets. @@ -563,11 +575,12 @@ template `>` * (x, y: expr): expr = ## "is greater" operator. This is the same as ``y < x``. y < x -proc in_Operator*[T](x: set[T], y: T): bool {.magic: "InSet", noSideEffect.} +proc contains*[T](x: set[T], y: T): bool {.magic: "InSet", noSideEffect.} ## One should overload this proc if one wants to overload the ``in`` operator. - ## The parameters are in reverse order! This is because the unification - ## algorithm that Nimrod uses for overload resolution works from left to - ## right. + ## The parameters are in reverse order! ``a in b`` is a template for + ## ``contains(b, a)``. + ## This is because the unification algorithm that Nimrod uses for overload + ## resolution works from left to right. ## But for the ``in`` operator that would be the wrong direction for this ## piece of code: ## @@ -578,11 +591,11 @@ proc in_Operator*[T](x: set[T], y: T): bool {.magic: "InSet", noSideEffect.} ## If ``in`` had been declared as ``[T](elem: T, s: set[T])`` then ``T`` would ## have been bound to ``char``. But ``s`` is not compatible to type ## ``set[char]``! The solution is to bind ``T`` to ``range['a'..'z']``. This - ## is achieved by reversing the parameters for ``in_operator``; ``in`` then + ## is achieved by reversing the parameters for ``contains``; ``in`` then ## passes its arguments in reverse order. -template `in` * (x, y: expr): expr = in_Operator(y, x) -template `not_in` * (x, y: expr): expr = not in_Operator(y, x) +template `in` * (x, y: expr): expr = contains(y, x) +template `not_in` * (x, y: expr): expr = not contains(y, x) proc `is` *[T, S](x: T, y: S): bool {.magic: "Is", noSideEffect.} template `is_not` *(x, y: expr): expr = not (x is y) @@ -616,15 +629,17 @@ proc `&` * (x: char, y: string): string {. magic: "ConStrStr", noSideEffect, merge.} ## is the `concatenation operator`. It concatenates `x` and `y`. -proc add * (x: var string, y: char) {.magic: "AppendStrCh".} -proc add * (x: var string, y: string) {.magic: "AppendStrStr".} +proc add*(x: var string, y: char) {.magic: "AppendStrCh".} +proc add*(x: var string, y: string) {.magic: "AppendStrStr".} when not defined(ECMAScript): + {.push overflow_checks:off} proc add* (x: var string, y: cstring) = var i = 0 while y[i] != '\0': add(x, y[i]) inc(i) + {.pop.} else: proc add* (x: var string, y: cstring) {.pure.} = asm """ @@ -646,7 +661,7 @@ proc add *[T](x: var seq[T], y: seq[T]) {.magic: "AppendSeqSeq".} proc repr*[T](x: T): string {.magic: "Repr", noSideEffect.} ## takes any Nimrod variable and returns its string representation. It - ## works even for complex data graphs with cycles. This is an invaluable + ## works even for complex data graphs with cycles. This is a great ## debugging tool. type @@ -729,7 +744,16 @@ const cpuEndian* {.magic: "CpuEndian"}: TEndian = littleEndian ## is the endianness of the target CPU. This is a valuable piece of ## information for low-level code only. This works thanks to compiler magic. - + + hostOS* {.magic: "HostOS"}: string = "" + ## a string that describes the host operating system. Possible values: + ## "windows", "macosx", "linux", "netbsd", "freebsd", "openbsd", "solaris", + ## "aix" + + hostCPU* {.magic: "HostCPU"}: string = "" + ## a string that describes the host CPU. Possible values: + ## "i386", "alpha", "powerpc", "sparc", "amd64", "mips", "arm" + proc toFloat*(i: int): float {. magic: "ToFloat", noSideEffect, importc: "toFloat".} ## converts an integer `i` into a ``float``. If the conversion @@ -896,6 +920,12 @@ proc `$` *(x: string): string {.magic: "StrToStr", noSideEffect.} ## as it is. This operator is useful for generic code, so ## that ``$expr`` also works if ``expr`` is already a string. +proc `$` *(x: TAnyEnum): string {.magic: "EnumToStr", noSideEffect.} + ## The stingify operator for an enumeration argument. This works for + ## any enumeration type thanks to compiler magic. If a + ## a ``$`` operator for a concrete enumeration is provided, this is + ## used instead. (In other words: *Overwriting* is possible.) + # undocumented: proc getRefcount*[T](x: ref T): int {.importc: "getRefcount".} ## retrieves the reference count of an heap-allocated object. The @@ -1136,6 +1166,10 @@ proc echo*[Ty](x: Ty) {.inline.} ## equivalent to ``writeln(stdout, x); flush(stdout)``. BUT: This is ## available for the ECMAScript target too! +proc echo*[Ty](x: openarray[Ty]) {.inline.} + ## equivalent to ``writeln(stdout, x); flush(stdout)``. BUT: This is + ## available for the ECMAScript target too! + template newException(exceptn, message: expr): expr = block: # open a new scope @@ -1169,8 +1203,6 @@ when not defined(EcmaScript) and not defined(NimrodVM): when not defined(EcmaScript) and not defined(NimrodVM): - include hti - proc initGC() var @@ -1370,13 +1402,6 @@ when not defined(EcmaScript) and not defined(NimrodVM): include arithm {.pop.} # stack trace - # sequence type declarations here because the GC needs them too: - type - TGenericSeq {.compilerproc, pure.} = object - len, space: int - - PGenericSeq {.exportc.} = ptr TGenericSeq - const GenericSeqSize = (2 * sizeof(int)) @@ -1417,13 +1442,12 @@ elif defined(NimrodVM): proc getFreeMem(): int = return -1 proc getTotalMem(): int = return -1 proc echo[Ty](x: Ty) = nil + proc echo[Ty](x: openarray[Ty]) = nil proc cmp(x, y: string): int = if x == y: return 0 if x < y: return -1 return 1 -include macros - {.pop.} # checks {.pop.} # hints diff --git a/lib/times.nim b/lib/times.nim index 774c9930c..459b6c2ad 100644 --- a/lib/times.nim +++ b/lib/times.nim @@ -276,8 +276,8 @@ else: proc getDateStr(): string = var ti = getLocalTime(getTime()) - result = $ti.year & "-" & intToStr(ord(ti.month)+1, 2) & - "-" & intToStr(ti.monthDay, 2) + result = $ti.year & '-' & intToStr(ord(ti.month)+1, 2) & + '-' & intToStr(ti.monthDay, 2) proc getClockStr(): string = var ti = getLocalTime(getTime()) diff --git a/lib/unicode.nim b/lib/unicode.nim index e6665fbe2..045439690 100644 --- a/lib/unicode.nim +++ b/lib/unicode.nim @@ -7,28 +7,28 @@ # distribution, for details about the copyright. # -## This module provides a way to handle various Unicode (or other) encodings. +## This module provides support to handle the Unicode UTF-8 encoding. type - TUniChar* = int32 ## type that can hold any Unicode character - TUniChar16* = int16 ## 16 bit Unicode character + TRune* = int ## type that can hold any Unicode character + TRune16* = int16 ## 16 bit Unicode character -template ones(n) = ((1 shl n)-1) +template ones(n: expr): expr = ((1 shl n)-1) -proc uniCharLen*(s: string): int = +proc runeLen*(s: string): int = ## returns the number of Unicode characters of the string `s`. var i = 0 while i < len(s): - if ord(s[i]) <= 127: inc(i) + if ord(s[i]) <=% 127: inc(i) elif ord(s[i]) shr 5 == 0b110: inc(i, 2) elif ord(s[i]) shr 4 == 0b1110: inc(i, 3) elif ord(s[i]) shr 3 == 0b11110: inc(i, 4) else: assert(false) inc(result) -proc uniCharAt*(s: string, i: int): TUniChar = +proc runeAt*(s: string, i: int): TRune = ## returns the unicode character in `s` at byte index `i` - if ord(s[i]) <= 127: + if ord(s[i]) <=% 127: result = ord(s[i]) elif ord(s[i]) shr 5 == 0b110: assert(ord(s[i+1]) shr 6 == 0b10) @@ -50,104 +50,1119 @@ proc uniCharAt*(s: string, i: int): TUniChar = else: assert(false) -iterator unichars*(s: string): TUniChar = - ## iterates over any unicode character of the string `s`. - var - i = 0 - result: TUniChar - while i < len(s): - if ord(s[i]) <= 127: - result = ord(s[i]) - inc(i) - elif ord(s[i]) shr 5 == 0b110: - result = (ord(s[i]) and ones(5)) shl 6 or (ord(s[i+1]) and ones(6)) - inc(i, 2) - elif ord(s[i]) shr 4 == 0b1110: - result = (ord(s[i]) and ones(4)) shl 12 or - (ord(s[i+1]) and ones(6)) shl 6 or - (ord(s[i+2]) and ones(6)) - inc(i, 3) - elif ord(s[i]) shr 3 == 0b11110: - result = (ord(s[i]) and ones(3)) shl 18 or - (ord(s[i+1]) and ones(6)) shl 12 or - (ord(s[i+2]) and ones(6)) shl 6 or - (ord(s[i+3]) and ones(6)) - inc(i, 4) - else: - assert(false) - yield result - -type - TCharacterSet = enum - cs8859_1, cs8859_2 - +template fastRuneAt(s, i, result: expr): stmt = + if ord(s[i]) <=% 127: + result = ord(s[i]) + inc(i) + elif ord(s[i]) shr 5 == 0b110: + assert(ord(s[i+1]) shr 6 == 0b10) + result = (ord(s[i]) and ones(5)) shl 6 or (ord(s[i+1]) and ones(6)) + inc(i, 2) + elif ord(s[i]) shr 4 == 0b1110: + assert(ord(s[i+1]) shr 6 == 0b10) + assert(ord(s[i+2]) shr 6 == 0b10) + result = (ord(s[i]) and ones(4)) shl 12 or + (ord(s[i+1]) and ones(6)) shl 6 or + (ord(s[i+2]) and ones(6)) + inc(i, 3) + elif ord(s[i]) shr 3 == 0b11110: + assert(ord(s[i+1]) shr 6 == 0b10) + assert(ord(s[i+2]) shr 6 == 0b10) + assert(ord(s[i+3]) shr 6 == 0b10) + result = (ord(s[i]) and ones(3)) shl 18 or + (ord(s[i+1]) and ones(6)) shl 12 or + (ord(s[i+2]) and ones(6)) shl 6 or + (ord(s[i+3]) and ones(6)) + inc(i, 4) + else: + assert(false) + +proc toUTF8*(c: TRune): string = + ## converts a character into its UTF8 representation + if c <=% 127: + result = newString(1) + result[0] = chr(c) + elif c <=% 0x07FF: + result = newString(2) + result[0] = chr(c shr 6 or 0b110_0000) + result[1] = chr(c and ones(6) or 0b10_000000) + elif c <=% 0xFFFF: + result = newString(3) + result[0] = chr(c shr 12 or 0b1110_0000) + result[1] = chr(c shr 6 and ones(6) or 0b10_0000_00) + result[2] = chr(c and ones(6) or 0b10_0000_00) + elif c <=% 0x0010FFFF: + result = newString(4) + result[0] = chr(c shr 18 or 0b1111_0000) + result[1] = chr(c shr 12 and ones(6) or 0b10_0000_00) + result[2] = chr(c shr 6 and ones(6) or 0b10_0000_00) + result[3] = chr(c and ones(6) or 0b10_0000_00) + else: + assert false + const - characterSetToName: array [TCharacterSet, string] = [ - "ISO/IEC 8859-1:1998", - "ISO 8859-2:1999", - "", - "" - ] - - cs8859_2toUnicode: array [0xA1..0xff, TUniChar16] = [ - 0x0104'i16, 0x02D8'i16, 0x0141'i16, 0x00A4'i16, 0x013D'i16, 0x015A'i16, - 0x00A7'i16, 0x00A8'i16, 0x0160'i16, 0x015E'i16, 0x0164'i16, 0x0179'i16, - 0x00AD'i16, 0x017D'i16, 0x017B'i16, 0x00B0'i16, 0x0105'i16, 0x02DB'i16, - 0x0142'i16, 0x00B4'i16, 0x013E'i16, 0x015B'i16, 0x02C7'i16, 0x00B8'i16, - 0x0161'i16, 0x015F'i16, 0x0165'i16, 0x017A'i16, 0x02DD'i16, 0x017E'i16, - 0x017C'i16, 0x0154'i16, 0x00C1'i16, 0x00C2'i16, 0x0102'i16, 0x00C4'i16, - 0x0139'i16, 0x0106'i16, 0x00C7'i16, 0x010C'i16, 0x00C9'i16, 0x0118'i16, - 0x00CB'i16, 0x011A'i16, 0x00CD'i16, 0x00CE'i16, 0x010E'i16, 0x0110'i16, - 0x0143'i16, 0x0147'i16, 0x00D3'i16, 0x00D4'i16, 0x0150'i16, 0x00D6'i16, - 0x00D7'i16, 0x0158'i16, 0x016E'i16, 0x00DA'i16, 0x0170'i16, 0x00DC'i16, - 0x00DD'i16, 0x0162'i16, 0x00DF'i16, 0x0155'i16, 0x00E1'i16, 0x00E2'i16, - 0x0103'i16, 0x00E4'i16, 0x013A'i16, 0x0107'i16, 0x00E7'i16, 0x010D'i16, - 0x00E9'i16, 0x0119'i16, 0x00EB'i16, 0x011B'i16, 0x00ED'i16, 0x00EE'i16, - 0x010F'i16, 0x0111'i16, 0x0144'i16, 0x0148'i16, 0x00F3'i16, 0x00F4'i16, - 0x0151'i16, 0x00F6'i16, 0x00F7'i16, 0x0159'i16, 0x016F'i16, 0x00FA'i16, - 0x0171'i16, 0x00FC'i16, 0x00FD'i16, 0x0163'i16, 0x02D9'i16] - -proc searchTable(tab: openarray[TUniChar16], u: TUniChar16): int8 = - var idx = find(tab, u) - assert(idx > 0) - result = toU8(idx) - -proc csToUnicode(cs: TCharacterSet, c: int8): TUniChar16 = - case cs - of cs8859_1: result = ze16(c) # no table lookup necessary - of cs8859_2: - if c <=% 0xA0'i8: - result = ze16(c) - else: - result = cs8859_2toUnicode[ze(c)] - -proc unicodeToCS(cs: TCharacterSet, u: TUniChar16): int8 = - case cs - of cs8859_1: result = toU8(u) # no table lookup necessary - of cs8859_2: - if u <=% 0x00A0'i16: - result = toU8(u) + alphaRanges = [ + 0x00d8, 0x00f6, # Ø - ö + 0x00f8, 0x01f5, # ø - ǵ + 0x0250, 0x02a8, # ɐ - ʨ + 0x038e, 0x03a1, # Ύ - Ρ + 0x03a3, 0x03ce, # Σ - ώ + 0x03d0, 0x03d6, # ϐ - ϖ + 0x03e2, 0x03f3, # Ϣ - ϳ + 0x0490, 0x04c4, # Ґ - ӄ + 0x0561, 0x0587, # ա - և + 0x05d0, 0x05ea, # א - ת + 0x05f0, 0x05f2, # װ - ײ + 0x0621, 0x063a, # ء - غ + 0x0640, 0x064a, # ـ - ي + 0x0671, 0x06b7, # ٱ - ڷ + 0x06ba, 0x06be, # ں - ھ + 0x06c0, 0x06ce, # ۀ - ێ + 0x06d0, 0x06d3, # ې - ۓ + 0x0905, 0x0939, # अ - ह + 0x0958, 0x0961, # क़ - ॡ + 0x0985, 0x098c, # অ - ঌ + 0x098f, 0x0990, # এ - ঐ + 0x0993, 0x09a8, # ও - ন + 0x09aa, 0x09b0, # প - র + 0x09b6, 0x09b9, # শ - হ + 0x09dc, 0x09dd, # ড় - ঢ় + 0x09df, 0x09e1, # য় - ৡ + 0x09f0, 0x09f1, # ৰ - ৱ + 0x0a05, 0x0a0a, # ਅ - ਊ + 0x0a0f, 0x0a10, # ਏ - ਐ + 0x0a13, 0x0a28, # ਓ - ਨ + 0x0a2a, 0x0a30, # ਪ - ਰ + 0x0a32, 0x0a33, # ਲ - ਲ਼ + 0x0a35, 0x0a36, # ਵ - ਸ਼ + 0x0a38, 0x0a39, # ਸ - ਹ + 0x0a59, 0x0a5c, # ਖ਼ - ੜ + 0x0a85, 0x0a8b, # અ - ઋ + 0x0a8f, 0x0a91, # એ - ઑ + 0x0a93, 0x0aa8, # ઓ - ન + 0x0aaa, 0x0ab0, # પ - ર + 0x0ab2, 0x0ab3, # લ - ળ + 0x0ab5, 0x0ab9, # વ - હ + 0x0b05, 0x0b0c, # ଅ - ଌ + 0x0b0f, 0x0b10, # ଏ - ଐ + 0x0b13, 0x0b28, # ଓ - ନ + 0x0b2a, 0x0b30, # ପ - ର + 0x0b32, 0x0b33, # ଲ - ଳ + 0x0b36, 0x0b39, # ଶ - ହ + 0x0b5c, 0x0b5d, # ଡ଼ - ଢ଼ + 0x0b5f, 0x0b61, # ୟ - ୡ + 0x0b85, 0x0b8a, # அ - ஊ + 0x0b8e, 0x0b90, # எ - ஐ + 0x0b92, 0x0b95, # ஒ - க + 0x0b99, 0x0b9a, # ங - ச + 0x0b9e, 0x0b9f, # ஞ - ட + 0x0ba3, 0x0ba4, # ண - த + 0x0ba8, 0x0baa, # ந - ப + 0x0bae, 0x0bb5, # ம - வ + 0x0bb7, 0x0bb9, # ஷ - ஹ + 0x0c05, 0x0c0c, # అ - ఌ + 0x0c0e, 0x0c10, # ఎ - ఐ + 0x0c12, 0x0c28, # ఒ - న + 0x0c2a, 0x0c33, # ప - ళ + 0x0c35, 0x0c39, # వ - హ + 0x0c60, 0x0c61, # ౠ - ౡ + 0x0c85, 0x0c8c, # ಅ - ಌ + 0x0c8e, 0x0c90, # ಎ - ಐ + 0x0c92, 0x0ca8, # ಒ - ನ + 0x0caa, 0x0cb3, # ಪ - ಳ + 0x0cb5, 0x0cb9, # ವ - ಹ + 0x0ce0, 0x0ce1, # ೠ - ೡ + 0x0d05, 0x0d0c, # അ - ഌ + 0x0d0e, 0x0d10, # എ - ഐ + 0x0d12, 0x0d28, # ഒ - ന + 0x0d2a, 0x0d39, # പ - ഹ + 0x0d60, 0x0d61, # ൠ - ൡ + 0x0e01, 0x0e30, # ก - ะ + 0x0e32, 0x0e33, # า - ำ + 0x0e40, 0x0e46, # เ - ๆ + 0x0e5a, 0x0e5b, # ๚ - ๛ + 0x0e81, 0x0e82, # ກ - ຂ + 0x0e87, 0x0e88, # ງ - ຈ + 0x0e94, 0x0e97, # ດ - ທ + 0x0e99, 0x0e9f, # ນ - ຟ + 0x0ea1, 0x0ea3, # ມ - ຣ + 0x0eaa, 0x0eab, # ສ - ຫ + 0x0ead, 0x0eae, # ອ - ຮ + 0x0eb2, 0x0eb3, # າ - ຳ + 0x0ec0, 0x0ec4, # ເ - ໄ + 0x0edc, 0x0edd, # ໜ - ໝ + 0x0f18, 0x0f19, # ༘ - ༙ + 0x0f40, 0x0f47, # ཀ - ཇ + 0x0f49, 0x0f69, # ཉ - ཀྵ + 0x10d0, 0x10f6, # ა - ჶ + 0x1100, 0x1159, # ᄀ - ᅙ + 0x115f, 0x11a2, # ᅟ - ᆢ + 0x11a8, 0x11f9, # ᆨ - ᇹ + 0x1e00, 0x1e9b, # Ḁ - ẛ + 0x1f50, 0x1f57, # ὐ - ὗ + 0x1f80, 0x1fb4, # ᾀ - ᾴ + 0x1fb6, 0x1fbc, # ᾶ - ᾼ + 0x1fc2, 0x1fc4, # ῂ - ῄ + 0x1fc6, 0x1fcc, # ῆ - ῌ + 0x1fd0, 0x1fd3, # ῐ - ΐ + 0x1fd6, 0x1fdb, # ῖ - Ί + 0x1fe0, 0x1fec, # ῠ - Ῥ + 0x1ff2, 0x1ff4, # ῲ - ῴ + 0x1ff6, 0x1ffc, # ῶ - ῼ + 0x210a, 0x2113, # ℊ - ℓ + 0x2115, 0x211d, # ℕ - ℝ + 0x2120, 0x2122, # ℠ - ™ + 0x212a, 0x2131, # K - ℱ + 0x2133, 0x2138, # ℳ - ℸ + 0x3041, 0x3094, # ぁ - ゔ + 0x30a1, 0x30fa, # ァ - ヺ + 0x3105, 0x312c, # ㄅ - ㄬ + 0x3131, 0x318e, # ㄱ - ㆎ + 0x3192, 0x319f, # ㆒ - ㆟ + 0x3260, 0x327b, # ㉠ - ㉻ + 0x328a, 0x32b0, # ㊊ - ㊰ + 0x32d0, 0x32fe, # ㋐ - ㋾ + 0x3300, 0x3357, # ㌀ - ㍗ + 0x3371, 0x3376, # ㍱ - ㍶ + 0x337b, 0x3394, # ㍻ - ㎔ + 0x3399, 0x339e, # ㎙ - ㎞ + 0x33a9, 0x33ad, # ㎩ - ㎭ + 0x33b0, 0x33c1, # ㎰ - ㏁ + 0x33c3, 0x33c5, # ㏃ - ㏅ + 0x33c7, 0x33d7, # ㏇ - ㏗ + 0x33d9, 0x33dd, # ㏙ - ㏝ + 0x4e00, 0x9fff, # 一 - 鿿 + 0xac00, 0xd7a3, # 가 - 힣 + 0xf900, 0xfb06, # 豈 - st + 0xfb13, 0xfb17, # ﬓ - ﬗ + 0xfb1f, 0xfb28, # ײַ - ﬨ + 0xfb2a, 0xfb36, # שׁ - זּ + 0xfb38, 0xfb3c, # טּ - לּ + 0xfb40, 0xfb41, # נּ - סּ + 0xfb43, 0xfb44, # ףּ - פּ + 0xfb46, 0xfbb1, # צּ - ﮱ + 0xfbd3, 0xfd3d, # ﯓ - ﴽ + 0xfd50, 0xfd8f, # ﵐ - ﶏ + 0xfd92, 0xfdc7, # ﶒ - ﷇ + 0xfdf0, 0xfdf9, # ﷰ - ﷹ + 0xfe70, 0xfe72, # ﹰ - ﹲ + 0xfe76, 0xfefc, # ﹶ - ﻼ + 0xff66, 0xff6f, # ヲ - ッ + 0xff71, 0xff9d, # ア - ン + 0xffa0, 0xffbe, # ᅠ - ᄒ + 0xffc2, 0xffc7, # ᅡ - ᅦ + 0xffca, 0xffcf, # ᅧ - ᅬ + 0xffd2, 0xffd7, # ᅭ - ᅲ + 0xffda, 0xffdc] # ᅳ - ᅵ + + alphaSinglets = [ + 0x00aa, # ª + 0x00b5, # µ + 0x00ba, # º + 0x03da, # Ϛ + 0x03dc, # Ϝ + 0x03de, # Ϟ + 0x03e0, # Ϡ + 0x06d5, # ە + 0x09b2, # ল + 0x0a5e, # ਫ਼ + 0x0a8d, # ઍ + 0x0ae0, # ૠ + 0x0b9c, # ஜ + 0x0cde, # ೞ + 0x0e4f, # ๏ + 0x0e84, # ຄ + 0x0e8a, # ຊ + 0x0e8d, # ຍ + 0x0ea5, # ລ + 0x0ea7, # ວ + 0x0eb0, # ະ + 0x0ebd, # ຽ + 0x1fbe, # ι + 0x207f, # ⁿ + 0x20a8, # ₨ + 0x2102, # ℂ + 0x2107, # ℇ + 0x2124, # ℤ + 0x2126, # Ω + 0x2128, # ℨ + 0xfb3e, # מּ + 0xfe74] # ﹴ + + spaceRanges = [ + 0x0009, 0x000a, # tab and newline + 0x0020, 0x0020, # space + 0x00a0, 0x00a0, # + 0x2000, 0x200b, # - + 0x2028, 0x2029, # - 0x3000, 0x3000, # + 0xfeff, 0xfeff] # + + toupperRanges = [ + 0x0061, 0x007a, 468, # a-z A-Z + 0x00e0, 0x00f6, 468, # à-ö À-Ö + 0x00f8, 0x00fe, 468, # ø-þ Ø-Þ + 0x0256, 0x0257, 295, # ɖ-ɗ Ɖ-Ɗ + 0x0258, 0x0259, 298, # ɘ-ə Ǝ-Ə + 0x028a, 0x028b, 283, # ʊ-ʋ Ʊ-Ʋ + 0x03ad, 0x03af, 463, # έ-ί Έ-Ί + 0x03b1, 0x03c1, 468, # α-ρ Α-Ρ + 0x03c3, 0x03cb, 468, # σ-ϋ Σ-Ϋ + 0x03cd, 0x03ce, 437, # ύ-ώ Ύ-Ώ + 0x0430, 0x044f, 468, # а-я А-Я + 0x0451, 0x045c, 420, # ё-ќ Ё-Ќ + 0x045e, 0x045f, 420, # ў-џ Ў-Џ + 0x0561, 0x0586, 452, # ա-ֆ Ա-Ֆ + 0x1f00, 0x1f07, 508, # ἀ-ἇ Ἀ-Ἇ + 0x1f10, 0x1f15, 508, # ἐ-ἕ Ἐ-Ἕ + 0x1f20, 0x1f27, 508, # ἠ-ἧ Ἠ-Ἧ + 0x1f30, 0x1f37, 508, # ἰ-ἷ Ἰ-Ἷ + 0x1f40, 0x1f45, 508, # ὀ-ὅ Ὀ-Ὅ + 0x1f60, 0x1f67, 508, # ὠ-ὧ Ὠ-Ὧ + 0x1f70, 0x1f71, 574, # ὰ-ά Ὰ-Ά + 0x1f72, 0x1f75, 586, # ὲ-ή Ὲ-Ή + 0x1f76, 0x1f77, 600, # ὶ-ί Ὶ-Ί + 0x1f78, 0x1f79, 628, # ὸ-ό Ὸ-Ό + 0x1f7a, 0x1f7b, 612, # ὺ-ύ Ὺ-Ύ + 0x1f7c, 0x1f7d, 626, # ὼ-ώ Ὼ-Ώ + 0x1f80, 0x1f87, 508, # ᾀ-ᾇ ᾈ-ᾏ + 0x1f90, 0x1f97, 508, # ᾐ-ᾗ ᾘ-ᾟ + 0x1fa0, 0x1fa7, 508, # ᾠ-ᾧ ᾨ-ᾯ + 0x1fb0, 0x1fb1, 508, # ᾰ-ᾱ Ᾰ-Ᾱ + 0x1fd0, 0x1fd1, 508, # ῐ-ῑ Ῐ-Ῑ + 0x1fe0, 0x1fe1, 508, # ῠ-ῡ Ῠ-Ῡ + 0x2170, 0x217f, 484, # ⅰ-ⅿ Ⅰ-Ⅿ + 0x24d0, 0x24e9, 474, # ⓐ-ⓩ Ⓐ-Ⓩ + 0xff41, 0xff5a, 468] # a-z A-Z + + toupperSinglets = [ + 0x00ff, 621, # ÿ Ÿ + 0x0101, 499, # ā Ā + 0x0103, 499, # ă Ă + 0x0105, 499, # ą Ą + 0x0107, 499, # ć Ć + 0x0109, 499, # ĉ Ĉ + 0x010b, 499, # ċ Ċ + 0x010d, 499, # č Č + 0x010f, 499, # ď Ď + 0x0111, 499, # đ Đ + 0x0113, 499, # ē Ē + 0x0115, 499, # ĕ Ĕ + 0x0117, 499, # ė Ė + 0x0119, 499, # ę Ę + 0x011b, 499, # ě Ě + 0x011d, 499, # ĝ Ĝ + 0x011f, 499, # ğ Ğ + 0x0121, 499, # ġ Ġ + 0x0123, 499, # ģ Ģ + 0x0125, 499, # ĥ Ĥ + 0x0127, 499, # ħ Ħ + 0x0129, 499, # ĩ Ĩ + 0x012b, 499, # ī Ī + 0x012d, 499, # ĭ Ĭ + 0x012f, 499, # į Į + 0x0131, 268, # ı I + 0x0133, 499, # ij IJ + 0x0135, 499, # ĵ Ĵ + 0x0137, 499, # ķ Ķ + 0x013a, 499, # ĺ Ĺ + 0x013c, 499, # ļ Ļ + 0x013e, 499, # ľ Ľ + 0x0140, 499, # ŀ Ŀ + 0x0142, 499, # ł Ł + 0x0144, 499, # ń Ń + 0x0146, 499, # ņ Ņ + 0x0148, 499, # ň Ň + 0x014b, 499, # ŋ Ŋ + 0x014d, 499, # ō Ō + 0x014f, 499, # ŏ Ŏ + 0x0151, 499, # ő Ő + 0x0153, 499, # œ Œ + 0x0155, 499, # ŕ Ŕ + 0x0157, 499, # ŗ Ŗ + 0x0159, 499, # ř Ř + 0x015b, 499, # ś Ś + 0x015d, 499, # ŝ Ŝ + 0x015f, 499, # ş Ş + 0x0161, 499, # š Š + 0x0163, 499, # ţ Ţ + 0x0165, 499, # ť Ť + 0x0167, 499, # ŧ Ŧ + 0x0169, 499, # ũ Ũ + 0x016b, 499, # ū Ū + 0x016d, 499, # ŭ Ŭ + 0x016f, 499, # ů Ů + 0x0171, 499, # ű Ű + 0x0173, 499, # ų Ų + 0x0175, 499, # ŵ Ŵ + 0x0177, 499, # ŷ Ŷ + 0x017a, 499, # ź Ź + 0x017c, 499, # ż Ż + 0x017e, 499, # ž Ž + 0x017f, 200, # ſ S + 0x0183, 499, # ƃ Ƃ + 0x0185, 499, # ƅ Ƅ + 0x0188, 499, # ƈ Ƈ + 0x018c, 499, # ƌ Ƌ + 0x0192, 499, # ƒ Ƒ + 0x0199, 499, # ƙ Ƙ + 0x01a1, 499, # ơ Ơ + 0x01a3, 499, # ƣ Ƣ + 0x01a5, 499, # ƥ Ƥ + 0x01a8, 499, # ƨ Ƨ + 0x01ad, 499, # ƭ Ƭ + 0x01b0, 499, # ư Ư + 0x01b4, 499, # ƴ Ƴ + 0x01b6, 499, # ƶ Ƶ + 0x01b9, 499, # ƹ Ƹ + 0x01bd, 499, # ƽ Ƽ + 0x01c5, 499, # Dž DŽ + 0x01c6, 498, # dž DŽ + 0x01c8, 499, # Lj LJ + 0x01c9, 498, # lj LJ + 0x01cb, 499, # Nj NJ + 0x01cc, 498, # nj NJ + 0x01ce, 499, # ǎ Ǎ + 0x01d0, 499, # ǐ Ǐ + 0x01d2, 499, # ǒ Ǒ + 0x01d4, 499, # ǔ Ǔ + 0x01d6, 499, # ǖ Ǖ + 0x01d8, 499, # ǘ Ǘ + 0x01da, 499, # ǚ Ǚ + 0x01dc, 499, # ǜ Ǜ + 0x01df, 499, # ǟ Ǟ + 0x01e1, 499, # ǡ Ǡ + 0x01e3, 499, # ǣ Ǣ + 0x01e5, 499, # ǥ Ǥ + 0x01e7, 499, # ǧ Ǧ + 0x01e9, 499, # ǩ Ǩ + 0x01eb, 499, # ǫ Ǫ + 0x01ed, 499, # ǭ Ǭ + 0x01ef, 499, # ǯ Ǯ + 0x01f2, 499, # Dz DZ + 0x01f3, 498, # dz DZ + 0x01f5, 499, # ǵ Ǵ + 0x01fb, 499, # ǻ Ǻ + 0x01fd, 499, # ǽ Ǽ + 0x01ff, 499, # ǿ Ǿ + 0x0201, 499, # ȁ Ȁ + 0x0203, 499, # ȃ Ȃ + 0x0205, 499, # ȅ Ȅ + 0x0207, 499, # ȇ Ȇ + 0x0209, 499, # ȉ Ȉ + 0x020b, 499, # ȋ Ȋ + 0x020d, 499, # ȍ Ȍ + 0x020f, 499, # ȏ Ȏ + 0x0211, 499, # ȑ Ȑ + 0x0213, 499, # ȓ Ȓ + 0x0215, 499, # ȕ Ȕ + 0x0217, 499, # ȗ Ȗ + 0x0253, 290, # ɓ Ɓ + 0x0254, 294, # ɔ Ɔ + 0x025b, 297, # ɛ Ɛ + 0x0260, 295, # ɠ Ɠ + 0x0263, 293, # ɣ Ɣ + 0x0268, 291, # ɨ Ɨ + 0x0269, 289, # ɩ Ɩ + 0x026f, 289, # ɯ Ɯ + 0x0272, 287, # ɲ Ɲ + 0x0283, 282, # ʃ Ʃ + 0x0288, 282, # ʈ Ʈ + 0x0292, 281, # ʒ Ʒ + 0x03ac, 462, # ά Ά + 0x03cc, 436, # ό Ό + 0x03d0, 438, # ϐ Β + 0x03d1, 443, # ϑ Θ + 0x03d5, 453, # ϕ Φ + 0x03d6, 446, # ϖ Π + 0x03e3, 499, # ϣ Ϣ + 0x03e5, 499, # ϥ Ϥ + 0x03e7, 499, # ϧ Ϧ + 0x03e9, 499, # ϩ Ϩ + 0x03eb, 499, # ϫ Ϫ + 0x03ed, 499, # ϭ Ϭ + 0x03ef, 499, # ϯ Ϯ + 0x03f0, 414, # ϰ Κ + 0x03f1, 420, # ϱ Ρ + 0x0461, 499, # ѡ Ѡ + 0x0463, 499, # ѣ Ѣ + 0x0465, 499, # ѥ Ѥ + 0x0467, 499, # ѧ Ѧ + 0x0469, 499, # ѩ Ѩ + 0x046b, 499, # ѫ Ѫ + 0x046d, 499, # ѭ Ѭ + 0x046f, 499, # ѯ Ѯ + 0x0471, 499, # ѱ Ѱ + 0x0473, 499, # ѳ Ѳ + 0x0475, 499, # ѵ Ѵ + 0x0477, 499, # ѷ Ѷ + 0x0479, 499, # ѹ Ѹ + 0x047b, 499, # ѻ Ѻ + 0x047d, 499, # ѽ Ѽ + 0x047f, 499, # ѿ Ѿ + 0x0481, 499, # ҁ Ҁ + 0x0491, 499, # ґ Ґ + 0x0493, 499, # ғ Ғ + 0x0495, 499, # ҕ Ҕ + 0x0497, 499, # җ Җ + 0x0499, 499, # ҙ Ҙ + 0x049b, 499, # қ Қ + 0x049d, 499, # ҝ Ҝ + 0x049f, 499, # ҟ Ҟ + 0x04a1, 499, # ҡ Ҡ + 0x04a3, 499, # ң Ң + 0x04a5, 499, # ҥ Ҥ + 0x04a7, 499, # ҧ Ҧ + 0x04a9, 499, # ҩ Ҩ + 0x04ab, 499, # ҫ Ҫ + 0x04ad, 499, # ҭ Ҭ + 0x04af, 499, # ү Ү + 0x04b1, 499, # ұ Ұ + 0x04b3, 499, # ҳ Ҳ + 0x04b5, 499, # ҵ Ҵ + 0x04b7, 499, # ҷ Ҷ + 0x04b9, 499, # ҹ Ҹ + 0x04bb, 499, # һ Һ + 0x04bd, 499, # ҽ Ҽ + 0x04bf, 499, # ҿ Ҿ + 0x04c2, 499, # ӂ Ӂ + 0x04c4, 499, # ӄ Ӄ + 0x04c8, 499, # ӈ Ӈ + 0x04cc, 499, # ӌ Ӌ + 0x04d1, 499, # ӑ Ӑ + 0x04d3, 499, # ӓ Ӓ + 0x04d5, 499, # ӕ Ӕ + 0x04d7, 499, # ӗ Ӗ + 0x04d9, 499, # ә Ә + 0x04db, 499, # ӛ Ӛ + 0x04dd, 499, # ӝ Ӝ + 0x04df, 499, # ӟ Ӟ + 0x04e1, 499, # ӡ Ӡ + 0x04e3, 499, # ӣ Ӣ + 0x04e5, 499, # ӥ Ӥ + 0x04e7, 499, # ӧ Ӧ + 0x04e9, 499, # ө Ө + 0x04eb, 499, # ӫ Ӫ + 0x04ef, 499, # ӯ Ӯ + 0x04f1, 499, # ӱ Ӱ + 0x04f3, 499, # ӳ Ӳ + 0x04f5, 499, # ӵ Ӵ + 0x04f9, 499, # ӹ Ӹ + 0x1e01, 499, # ḁ Ḁ + 0x1e03, 499, # ḃ Ḃ + 0x1e05, 499, # ḅ Ḅ + 0x1e07, 499, # ḇ Ḇ + 0x1e09, 499, # ḉ Ḉ + 0x1e0b, 499, # ḋ Ḋ + 0x1e0d, 499, # ḍ Ḍ + 0x1e0f, 499, # ḏ Ḏ + 0x1e11, 499, # ḑ Ḑ + 0x1e13, 499, # ḓ Ḓ + 0x1e15, 499, # ḕ Ḕ + 0x1e17, 499, # ḗ Ḗ + 0x1e19, 499, # ḙ Ḙ + 0x1e1b, 499, # ḛ Ḛ + 0x1e1d, 499, # ḝ Ḝ + 0x1e1f, 499, # ḟ Ḟ + 0x1e21, 499, # ḡ Ḡ + 0x1e23, 499, # ḣ Ḣ + 0x1e25, 499, # ḥ Ḥ + 0x1e27, 499, # ḧ Ḧ + 0x1e29, 499, # ḩ Ḩ + 0x1e2b, 499, # ḫ Ḫ + 0x1e2d, 499, # ḭ Ḭ + 0x1e2f, 499, # ḯ Ḯ + 0x1e31, 499, # ḱ Ḱ + 0x1e33, 499, # ḳ Ḳ + 0x1e35, 499, # ḵ Ḵ + 0x1e37, 499, # ḷ Ḷ + 0x1e39, 499, # ḹ Ḹ + 0x1e3b, 499, # ḻ Ḻ + 0x1e3d, 499, # ḽ Ḽ + 0x1e3f, 499, # ḿ Ḿ + 0x1e41, 499, # ṁ Ṁ + 0x1e43, 499, # ṃ Ṃ + 0x1e45, 499, # ṅ Ṅ + 0x1e47, 499, # ṇ Ṇ + 0x1e49, 499, # ṉ Ṉ + 0x1e4b, 499, # ṋ Ṋ + 0x1e4d, 499, # ṍ Ṍ + 0x1e4f, 499, # ṏ Ṏ + 0x1e51, 499, # ṑ Ṑ + 0x1e53, 499, # ṓ Ṓ + 0x1e55, 499, # ṕ Ṕ + 0x1e57, 499, # ṗ Ṗ + 0x1e59, 499, # ṙ Ṙ + 0x1e5b, 499, # ṛ Ṛ + 0x1e5d, 499, # ṝ Ṝ + 0x1e5f, 499, # ṟ Ṟ + 0x1e61, 499, # ṡ Ṡ + 0x1e63, 499, # ṣ Ṣ + 0x1e65, 499, # ṥ Ṥ + 0x1e67, 499, # ṧ Ṧ + 0x1e69, 499, # ṩ Ṩ + 0x1e6b, 499, # ṫ Ṫ + 0x1e6d, 499, # ṭ Ṭ + 0x1e6f, 499, # ṯ Ṯ + 0x1e71, 499, # ṱ Ṱ + 0x1e73, 499, # ṳ Ṳ + 0x1e75, 499, # ṵ Ṵ + 0x1e77, 499, # ṷ Ṷ + 0x1e79, 499, # ṹ Ṹ + 0x1e7b, 499, # ṻ Ṻ + 0x1e7d, 499, # ṽ Ṽ + 0x1e7f, 499, # ṿ Ṿ + 0x1e81, 499, # ẁ Ẁ + 0x1e83, 499, # ẃ Ẃ + 0x1e85, 499, # ẅ Ẅ + 0x1e87, 499, # ẇ Ẇ + 0x1e89, 499, # ẉ Ẉ + 0x1e8b, 499, # ẋ Ẋ + 0x1e8d, 499, # ẍ Ẍ + 0x1e8f, 499, # ẏ Ẏ + 0x1e91, 499, # ẑ Ẑ + 0x1e93, 499, # ẓ Ẓ + 0x1e95, 499, # ẕ Ẕ + 0x1ea1, 499, # ạ Ạ + 0x1ea3, 499, # ả Ả + 0x1ea5, 499, # ấ Ấ + 0x1ea7, 499, # ầ Ầ + 0x1ea9, 499, # ẩ Ẩ + 0x1eab, 499, # ẫ Ẫ + 0x1ead, 499, # ậ Ậ + 0x1eaf, 499, # ắ Ắ + 0x1eb1, 499, # ằ Ằ + 0x1eb3, 499, # ẳ Ẳ + 0x1eb5, 499, # ẵ Ẵ + 0x1eb7, 499, # ặ Ặ + 0x1eb9, 499, # ẹ Ẹ + 0x1ebb, 499, # ẻ Ẻ + 0x1ebd, 499, # ẽ Ẽ + 0x1ebf, 499, # ế Ế + 0x1ec1, 499, # ề Ề + 0x1ec3, 499, # ể Ể + 0x1ec5, 499, # ễ Ễ + 0x1ec7, 499, # ệ Ệ + 0x1ec9, 499, # ỉ Ỉ + 0x1ecb, 499, # ị Ị + 0x1ecd, 499, # ọ Ọ + 0x1ecf, 499, # ỏ Ỏ + 0x1ed1, 499, # ố Ố + 0x1ed3, 499, # ồ Ồ + 0x1ed5, 499, # ổ Ổ + 0x1ed7, 499, # ỗ Ỗ + 0x1ed9, 499, # ộ Ộ + 0x1edb, 499, # ớ Ớ + 0x1edd, 499, # ờ Ờ + 0x1edf, 499, # ở Ở + 0x1ee1, 499, # ỡ Ỡ + 0x1ee3, 499, # ợ Ợ + 0x1ee5, 499, # ụ Ụ + 0x1ee7, 499, # ủ Ủ + 0x1ee9, 499, # ứ Ứ + 0x1eeb, 499, # ừ Ừ + 0x1eed, 499, # ử Ử + 0x1eef, 499, # ữ Ữ + 0x1ef1, 499, # ự Ự + 0x1ef3, 499, # ỳ Ỳ + 0x1ef5, 499, # ỵ Ỵ + 0x1ef7, 499, # ỷ Ỷ + 0x1ef9, 499, # ỹ Ỹ + 0x1f51, 508, # ὑ Ὑ + 0x1f53, 508, # ὓ Ὓ + 0x1f55, 508, # ὕ Ὕ + 0x1f57, 508, # ὗ Ὗ + 0x1fb3, 509, # ᾳ ᾼ + 0x1fc3, 509, # ῃ ῌ + 0x1fe5, 507, # ῥ Ῥ + 0x1ff3, 509] # ῳ ῼ + + tolowerRanges = [ + 0x0041, 0x005a, 532, # A-Z a-z + 0x00c0, 0x00d6, 532, # À-Ö à-ö + 0x00d8, 0x00de, 532, # Ø-Þ ø-þ + 0x0189, 0x018a, 705, # Ɖ-Ɗ ɖ-ɗ + 0x018e, 0x018f, 702, # Ǝ-Ə ɘ-ə + 0x01b1, 0x01b2, 717, # Ʊ-Ʋ ʊ-ʋ + 0x0388, 0x038a, 537, # Έ-Ί έ-ί + 0x038e, 0x038f, 563, # Ύ-Ώ ύ-ώ + 0x0391, 0x03a1, 532, # Α-Ρ α-ρ + 0x03a3, 0x03ab, 532, # Σ-Ϋ σ-ϋ + 0x0401, 0x040c, 580, # Ё-Ќ ё-ќ + 0x040e, 0x040f, 580, # Ў-Џ ў-џ + 0x0410, 0x042f, 532, # А-Я а-я + 0x0531, 0x0556, 548, # Ա-Ֆ ա-ֆ + 0x10a0, 0x10c5, 548, # Ⴀ-Ⴥ ა-ჵ + 0x1f08, 0x1f0f, 492, # Ἀ-Ἇ ἀ-ἇ + 0x1f18, 0x1f1d, 492, # Ἐ-Ἕ ἐ-ἕ + 0x1f28, 0x1f2f, 492, # Ἠ-Ἧ ἠ-ἧ + 0x1f38, 0x1f3f, 492, # Ἰ-Ἷ ἰ-ἷ + 0x1f48, 0x1f4d, 492, # Ὀ-Ὅ ὀ-ὅ + 0x1f68, 0x1f6f, 492, # Ὠ-Ὧ ὠ-ὧ + 0x1f88, 0x1f8f, 492, # ᾈ-ᾏ ᾀ-ᾇ + 0x1f98, 0x1f9f, 492, # ᾘ-ᾟ ᾐ-ᾗ + 0x1fa8, 0x1faf, 492, # ᾨ-ᾯ ᾠ-ᾧ + 0x1fb8, 0x1fb9, 492, # Ᾰ-Ᾱ ᾰ-ᾱ + 0x1fba, 0x1fbb, 426, # Ὰ-Ά ὰ-ά + 0x1fc8, 0x1fcb, 414, # Ὲ-Ή ὲ-ή + 0x1fd8, 0x1fd9, 492, # Ῐ-Ῑ ῐ-ῑ + 0x1fda, 0x1fdb, 400, # Ὶ-Ί ὶ-ί + 0x1fe8, 0x1fe9, 492, # Ῠ-Ῡ ῠ-ῡ + 0x1fea, 0x1feb, 388, # Ὺ-Ύ ὺ-ύ + 0x1ff8, 0x1ff9, 372, # Ὸ-Ό ὸ-ό + 0x1ffa, 0x1ffb, 374, # Ὼ-Ώ ὼ-ώ + 0x2160, 0x216f, 516, # Ⅰ-Ⅿ ⅰ-ⅿ + 0x24b6, 0x24cf, 526, # Ⓐ-Ⓩ ⓐ-ⓩ + 0xff21, 0xff3a, 532] # A-Z a-z + + tolowerSinglets = [ + 0x0100, 501, # Ā ā + 0x0102, 501, # Ă ă + 0x0104, 501, # Ą ą + 0x0106, 501, # Ć ć + 0x0108, 501, # Ĉ ĉ + 0x010a, 501, # Ċ ċ + 0x010c, 501, # Č č + 0x010e, 501, # Ď ď + 0x0110, 501, # Đ đ + 0x0112, 501, # Ē ē + 0x0114, 501, # Ĕ ĕ + 0x0116, 501, # Ė ė + 0x0118, 501, # Ę ę + 0x011a, 501, # Ě ě + 0x011c, 501, # Ĝ ĝ + 0x011e, 501, # Ğ ğ + 0x0120, 501, # Ġ ġ + 0x0122, 501, # Ģ ģ + 0x0124, 501, # Ĥ ĥ + 0x0126, 501, # Ħ ħ + 0x0128, 501, # Ĩ ĩ + 0x012a, 501, # Ī ī + 0x012c, 501, # Ĭ ĭ + 0x012e, 501, # Į į + 0x0130, 301, # İ i + 0x0132, 501, # IJ ij + 0x0134, 501, # Ĵ ĵ + 0x0136, 501, # Ķ ķ + 0x0139, 501, # Ĺ ĺ + 0x013b, 501, # Ļ ļ + 0x013d, 501, # Ľ ľ + 0x013f, 501, # Ŀ ŀ + 0x0141, 501, # Ł ł + 0x0143, 501, # Ń ń + 0x0145, 501, # Ņ ņ + 0x0147, 501, # Ň ň + 0x014a, 501, # Ŋ ŋ + 0x014c, 501, # Ō ō + 0x014e, 501, # Ŏ ŏ + 0x0150, 501, # Ő ő + 0x0152, 501, # Œ œ + 0x0154, 501, # Ŕ ŕ + 0x0156, 501, # Ŗ ŗ + 0x0158, 501, # Ř ř + 0x015a, 501, # Ś ś + 0x015c, 501, # Ŝ ŝ + 0x015e, 501, # Ş ş + 0x0160, 501, # Š š + 0x0162, 501, # Ţ ţ + 0x0164, 501, # Ť ť + 0x0166, 501, # Ŧ ŧ + 0x0168, 501, # Ũ ũ + 0x016a, 501, # Ū ū + 0x016c, 501, # Ŭ ŭ + 0x016e, 501, # Ů ů + 0x0170, 501, # Ű ű + 0x0172, 501, # Ų ų + 0x0174, 501, # Ŵ ŵ + 0x0176, 501, # Ŷ ŷ + 0x0178, 379, # Ÿ ÿ + 0x0179, 501, # Ź ź + 0x017b, 501, # Ż ż + 0x017d, 501, # Ž ž + 0x0181, 710, # Ɓ ɓ + 0x0182, 501, # Ƃ ƃ + 0x0184, 501, # Ƅ ƅ + 0x0186, 706, # Ɔ ɔ + 0x0187, 501, # Ƈ ƈ + 0x018b, 501, # Ƌ ƌ + 0x0190, 703, # Ɛ ɛ + 0x0191, 501, # Ƒ ƒ + 0x0193, 705, # Ɠ ɠ + 0x0194, 707, # Ɣ ɣ + 0x0196, 711, # Ɩ ɩ + 0x0197, 709, # Ɨ ɨ + 0x0198, 501, # Ƙ ƙ + 0x019c, 711, # Ɯ ɯ + 0x019d, 713, # Ɲ ɲ + 0x01a0, 501, # Ơ ơ + 0x01a2, 501, # Ƣ ƣ + 0x01a4, 501, # Ƥ ƥ + 0x01a7, 501, # Ƨ ƨ + 0x01a9, 718, # Ʃ ʃ + 0x01ac, 501, # Ƭ ƭ + 0x01ae, 718, # Ʈ ʈ + 0x01af, 501, # Ư ư + 0x01b3, 501, # Ƴ ƴ + 0x01b5, 501, # Ƶ ƶ + 0x01b7, 719, # Ʒ ʒ + 0x01b8, 501, # Ƹ ƹ + 0x01bc, 501, # Ƽ ƽ + 0x01c4, 502, # DŽ dž + 0x01c5, 501, # Dž dž + 0x01c7, 502, # LJ lj + 0x01c8, 501, # Lj lj + 0x01ca, 502, # NJ nj + 0x01cb, 501, # Nj nj + 0x01cd, 501, # Ǎ ǎ + 0x01cf, 501, # Ǐ ǐ + 0x01d1, 501, # Ǒ ǒ + 0x01d3, 501, # Ǔ ǔ + 0x01d5, 501, # Ǖ ǖ + 0x01d7, 501, # Ǘ ǘ + 0x01d9, 501, # Ǚ ǚ + 0x01db, 501, # Ǜ ǜ + 0x01de, 501, # Ǟ ǟ + 0x01e0, 501, # Ǡ ǡ + 0x01e2, 501, # Ǣ ǣ + 0x01e4, 501, # Ǥ ǥ + 0x01e6, 501, # Ǧ ǧ + 0x01e8, 501, # Ǩ ǩ + 0x01ea, 501, # Ǫ ǫ + 0x01ec, 501, # Ǭ ǭ + 0x01ee, 501, # Ǯ ǯ + 0x01f1, 502, # DZ dz + 0x01f2, 501, # Dz dz + 0x01f4, 501, # Ǵ ǵ + 0x01fa, 501, # Ǻ ǻ + 0x01fc, 501, # Ǽ ǽ + 0x01fe, 501, # Ǿ ǿ + 0x0200, 501, # Ȁ ȁ + 0x0202, 501, # Ȃ ȃ + 0x0204, 501, # Ȅ ȅ + 0x0206, 501, # Ȇ ȇ + 0x0208, 501, # Ȉ ȉ + 0x020a, 501, # Ȋ ȋ + 0x020c, 501, # Ȍ ȍ + 0x020e, 501, # Ȏ ȏ + 0x0210, 501, # Ȑ ȑ + 0x0212, 501, # Ȓ ȓ + 0x0214, 501, # Ȕ ȕ + 0x0216, 501, # Ȗ ȗ + 0x0386, 538, # Ά ά + 0x038c, 564, # Ό ό + 0x03e2, 501, # Ϣ ϣ + 0x03e4, 501, # Ϥ ϥ + 0x03e6, 501, # Ϧ ϧ + 0x03e8, 501, # Ϩ ϩ + 0x03ea, 501, # Ϫ ϫ + 0x03ec, 501, # Ϭ ϭ + 0x03ee, 501, # Ϯ ϯ + 0x0460, 501, # Ѡ ѡ + 0x0462, 501, # Ѣ ѣ + 0x0464, 501, # Ѥ ѥ + 0x0466, 501, # Ѧ ѧ + 0x0468, 501, # Ѩ ѩ + 0x046a, 501, # Ѫ ѫ + 0x046c, 501, # Ѭ ѭ + 0x046e, 501, # Ѯ ѯ + 0x0470, 501, # Ѱ ѱ + 0x0472, 501, # Ѳ ѳ + 0x0474, 501, # Ѵ ѵ + 0x0476, 501, # Ѷ ѷ + 0x0478, 501, # Ѹ ѹ + 0x047a, 501, # Ѻ ѻ + 0x047c, 501, # Ѽ ѽ + 0x047e, 501, # Ѿ ѿ + 0x0480, 501, # Ҁ ҁ + 0x0490, 501, # Ґ ґ + 0x0492, 501, # Ғ ғ + 0x0494, 501, # Ҕ ҕ + 0x0496, 501, # Җ җ + 0x0498, 501, # Ҙ ҙ + 0x049a, 501, # Қ қ + 0x049c, 501, # Ҝ ҝ + 0x049e, 501, # Ҟ ҟ + 0x04a0, 501, # Ҡ ҡ + 0x04a2, 501, # Ң ң + 0x04a4, 501, # Ҥ ҥ + 0x04a6, 501, # Ҧ ҧ + 0x04a8, 501, # Ҩ ҩ + 0x04aa, 501, # Ҫ ҫ + 0x04ac, 501, # Ҭ ҭ + 0x04ae, 501, # Ү ү + 0x04b0, 501, # Ұ ұ + 0x04b2, 501, # Ҳ ҳ + 0x04b4, 501, # Ҵ ҵ + 0x04b6, 501, # Ҷ ҷ + 0x04b8, 501, # Ҹ ҹ + 0x04ba, 501, # Һ һ + 0x04bc, 501, # Ҽ ҽ + 0x04be, 501, # Ҿ ҿ + 0x04c1, 501, # Ӂ ӂ + 0x04c3, 501, # Ӄ ӄ + 0x04c7, 501, # Ӈ ӈ + 0x04cb, 501, # Ӌ ӌ + 0x04d0, 501, # Ӑ ӑ + 0x04d2, 501, # Ӓ ӓ + 0x04d4, 501, # Ӕ ӕ + 0x04d6, 501, # Ӗ ӗ + 0x04d8, 501, # Ә ә + 0x04da, 501, # Ӛ ӛ + 0x04dc, 501, # Ӝ ӝ + 0x04de, 501, # Ӟ ӟ + 0x04e0, 501, # Ӡ ӡ + 0x04e2, 501, # Ӣ ӣ + 0x04e4, 501, # Ӥ ӥ + 0x04e6, 501, # Ӧ ӧ + 0x04e8, 501, # Ө ө + 0x04ea, 501, # Ӫ ӫ + 0x04ee, 501, # Ӯ ӯ + 0x04f0, 501, # Ӱ ӱ + 0x04f2, 501, # Ӳ ӳ + 0x04f4, 501, # Ӵ ӵ + 0x04f8, 501, # Ӹ ӹ + 0x1e00, 501, # Ḁ ḁ + 0x1e02, 501, # Ḃ ḃ + 0x1e04, 501, # Ḅ ḅ + 0x1e06, 501, # Ḇ ḇ + 0x1e08, 501, # Ḉ ḉ + 0x1e0a, 501, # Ḋ ḋ + 0x1e0c, 501, # Ḍ ḍ + 0x1e0e, 501, # Ḏ ḏ + 0x1e10, 501, # Ḑ ḑ + 0x1e12, 501, # Ḓ ḓ + 0x1e14, 501, # Ḕ ḕ + 0x1e16, 501, # Ḗ ḗ + 0x1e18, 501, # Ḙ ḙ + 0x1e1a, 501, # Ḛ ḛ + 0x1e1c, 501, # Ḝ ḝ + 0x1e1e, 501, # Ḟ ḟ + 0x1e20, 501, # Ḡ ḡ + 0x1e22, 501, # Ḣ ḣ + 0x1e24, 501, # Ḥ ḥ + 0x1e26, 501, # Ḧ ḧ + 0x1e28, 501, # Ḩ ḩ + 0x1e2a, 501, # Ḫ ḫ + 0x1e2c, 501, # Ḭ ḭ + 0x1e2e, 501, # Ḯ ḯ + 0x1e30, 501, # Ḱ ḱ + 0x1e32, 501, # Ḳ ḳ + 0x1e34, 501, # Ḵ ḵ + 0x1e36, 501, # Ḷ ḷ + 0x1e38, 501, # Ḹ ḹ + 0x1e3a, 501, # Ḻ ḻ + 0x1e3c, 501, # Ḽ ḽ + 0x1e3e, 501, # Ḿ ḿ + 0x1e40, 501, # Ṁ ṁ + 0x1e42, 501, # Ṃ ṃ + 0x1e44, 501, # Ṅ ṅ + 0x1e46, 501, # Ṇ ṇ + 0x1e48, 501, # Ṉ ṉ + 0x1e4a, 501, # Ṋ ṋ + 0x1e4c, 501, # Ṍ ṍ + 0x1e4e, 501, # Ṏ ṏ + 0x1e50, 501, # Ṑ ṑ + 0x1e52, 501, # Ṓ ṓ + 0x1e54, 501, # Ṕ ṕ + 0x1e56, 501, # Ṗ ṗ + 0x1e58, 501, # Ṙ ṙ + 0x1e5a, 501, # Ṛ ṛ + 0x1e5c, 501, # Ṝ ṝ + 0x1e5e, 501, # Ṟ ṟ + 0x1e60, 501, # Ṡ ṡ + 0x1e62, 501, # Ṣ ṣ + 0x1e64, 501, # Ṥ ṥ + 0x1e66, 501, # Ṧ ṧ + 0x1e68, 501, # Ṩ ṩ + 0x1e6a, 501, # Ṫ ṫ + 0x1e6c, 501, # Ṭ ṭ + 0x1e6e, 501, # Ṯ ṯ + 0x1e70, 501, # Ṱ ṱ + 0x1e72, 501, # Ṳ ṳ + 0x1e74, 501, # Ṵ ṵ + 0x1e76, 501, # Ṷ ṷ + 0x1e78, 501, # Ṹ ṹ + 0x1e7a, 501, # Ṻ ṻ + 0x1e7c, 501, # Ṽ ṽ + 0x1e7e, 501, # Ṿ ṿ + 0x1e80, 501, # Ẁ ẁ + 0x1e82, 501, # Ẃ ẃ + 0x1e84, 501, # Ẅ ẅ + 0x1e86, 501, # Ẇ ẇ + 0x1e88, 501, # Ẉ ẉ + 0x1e8a, 501, # Ẋ ẋ + 0x1e8c, 501, # Ẍ ẍ + 0x1e8e, 501, # Ẏ ẏ + 0x1e90, 501, # Ẑ ẑ + 0x1e92, 501, # Ẓ ẓ + 0x1e94, 501, # Ẕ ẕ + 0x1ea0, 501, # Ạ ạ + 0x1ea2, 501, # Ả ả + 0x1ea4, 501, # Ấ ấ + 0x1ea6, 501, # Ầ ầ + 0x1ea8, 501, # Ẩ ẩ + 0x1eaa, 501, # Ẫ ẫ + 0x1eac, 501, # Ậ ậ + 0x1eae, 501, # Ắ ắ + 0x1eb0, 501, # Ằ ằ + 0x1eb2, 501, # Ẳ ẳ + 0x1eb4, 501, # Ẵ ẵ + 0x1eb6, 501, # Ặ ặ + 0x1eb8, 501, # Ẹ ẹ + 0x1eba, 501, # Ẻ ẻ + 0x1ebc, 501, # Ẽ ẽ + 0x1ebe, 501, # Ế ế + 0x1ec0, 501, # Ề ề + 0x1ec2, 501, # Ể ể + 0x1ec4, 501, # Ễ ễ + 0x1ec6, 501, # Ệ ệ + 0x1ec8, 501, # Ỉ ỉ + 0x1eca, 501, # Ị ị + 0x1ecc, 501, # Ọ ọ + 0x1ece, 501, # Ỏ ỏ + 0x1ed0, 501, # Ố ố + 0x1ed2, 501, # Ồ ồ + 0x1ed4, 501, # Ổ ổ + 0x1ed6, 501, # Ỗ ỗ + 0x1ed8, 501, # Ộ ộ + 0x1eda, 501, # Ớ ớ + 0x1edc, 501, # Ờ ờ + 0x1ede, 501, # Ở ở + 0x1ee0, 501, # Ỡ ỡ + 0x1ee2, 501, # Ợ ợ + 0x1ee4, 501, # Ụ ụ + 0x1ee6, 501, # Ủ ủ + 0x1ee8, 501, # Ứ ứ + 0x1eea, 501, # Ừ ừ + 0x1eec, 501, # Ử ử + 0x1eee, 501, # Ữ ữ + 0x1ef0, 501, # Ự ự + 0x1ef2, 501, # Ỳ ỳ + 0x1ef4, 501, # Ỵ ỵ + 0x1ef6, 501, # Ỷ ỷ + 0x1ef8, 501, # Ỹ ỹ + 0x1f59, 492, # Ὑ ὑ + 0x1f5b, 492, # Ὓ ὓ + 0x1f5d, 492, # Ὕ ὕ + 0x1f5f, 492, # Ὗ ὗ + 0x1fbc, 491, # ᾼ ᾳ + 0x1fcc, 491, # ῌ ῃ + 0x1fec, 493, # Ῥ ῥ + 0x1ffc, 491] # ῼ ῳ + + toTitleSinglets = [ + 0x01c4, 501, # DŽ Dž + 0x01c6, 499, # dž Dž + 0x01c7, 501, # LJ Lj + 0x01c9, 499, # lj Lj + 0x01ca, 501, # NJ Nj + 0x01cc, 499, # nj Nj + 0x01f1, 501, # DZ Dz + 0x01f3, 499] # dz Dz + +proc binarySearch(c: TRune, tab: openArray[TRune], len, stride: int): int = + var n = len + var t = 0 + while n > 1: + var m = n div 2 + var p = t + m*stride + if c >= tab[p]: + t = p + n = n-m else: - result = searchTable(cs8859_2toUnicode, u) +% 0xA1'8 + n = m + if n != 0 and c >= tab[t]: + return t + return -1 + +proc toLower*(c: TRune): TRune = + ## Converts `c` into lower case. This works for any Unicode character. + var p = binarySearch(c, tolowerRanges, len(toLowerRanges) div 3, 3) + if p >= 0 and c >= tolowerRanges[p] and c <= tolowerRanges[p+1]: + return c + tolowerRanges[p+2] - 500 + p = binarySearch(c, toLowerSinglets, len(toLowerSinglets) div 2, 2) + if p >= 0 and c == toLowerSinglets[p]: + return c + toLowerSinglets[p+1] - 500 + return c + +proc toUpper*(c: TRune): TRune = + ## Converts `c` into upper case. This works for any Unicode character. + var p = binarySearch(c, toUpperRanges, len(toUpperRanges) div 3, 3) + if p >= 0 and c >= toUpperRanges[p] and c <= toUpperRanges[p+1]: + return c + toUpperRanges[p+2] - 500 + p = binarySearch(c, toUpperSinglets, len(toUpperSinglets) div 2, 2) + if p >= 0 and c == toUpperSinglets[p]: + return c + toUpperSinglets[p+1] - 500 + return c -proc utf8toLocale*(s: string): string -proc localeToUtf8*(s: string): string +proc toTitle*(c: TRune): TRune = + var p = binarySearch(c, toTitleSinglets, len(toTitleSinglets) div 2, 2) + if p >= 0 and c == toTitleSinglets[p]: + return c + toTitleSinglets[p+1] - 500 + return c -proc utf8toUtf16*(s: string): seq[TUniChar16] -proc utf8toUcs4*(s: string): seq[TUniChar] = - result = [] - for u in unichars(s): +proc isLower*(c: TRune): bool = + ## returns true iff `c` is a lower case Unicode character + # Note: toUpperRanges is correct here! + var p = binarySearch(c, toUpperRanges, len(toUpperRanges) div 3, 3) + if p >= 0 and c >= toUpperRanges[p] and c <= toUpperRanges[p+1]: + return true + p = binarySearch(c, toUpperSinglets, len(toUpperSinglets) div 2, 2) + if p >= 0 and c == toUpperSinglets[p]: + return true -proc ucs4ToUtf8(s: seq[TUnichar]): string -proc utf16ToUtf8(s: seq[TUnichar16]): string -proc ucs4toUft16(s: seq[TUnichar]): seq[TUnichar16] -proc uft16toUcs4(s: seq[Tunichar16]): seq[TUnichar] +proc isUpper*(c: TRune): bool = + ## returns true iff `c` is a upper case Unicode character + # Note: toLowerRanges is correct here! + var p = binarySearch(c, toLowerRanges, len(toLowerRanges) div 3, 3) + if p >= 0 and c >= toLowerRanges[p] and c <= toLowerRanges[p+1]: + return true + p = binarySearch(c, toLowerSinglets, len(toLowerSinglets) div 2, 2) + if p >= 0 and c == toLowerSinglets[p]: + return true -proc cmpUnicode*(a, b: string): int = - ## treats `a` and `b` as UTF-8 strings and compares them. Returns: +proc isAlpha*(c: TRune): bool = + ## returns true iff `c` is an *alpha* Unicode character (i.e. a letter) + if isUpper(c) or isLower(c): + return true + var p = binarySearch(c, alphaRanges, len(alphaRanges) div 2, 2) + if p >= 0 and c >= alphaRanges[p] and c <= alphaRanges[p+1]: + return true + p = binarySearch(c, alphaSinglets, len(alphaSinglets), 1) + if p >= 0 and c == alphaSinglets[p]: + return true + +proc isTitle*(c: TRune): bool = + return isUpper(c) and isLower(c) + +proc isWhiteSpace*(c: TRune): bool = + ## returns true iff `c` is a Unicode whitespace character + var p = binarySearch(c, spaceRanges, len(spaceRanges) div 2, 2) + if p >= 0 and c >= spaceRanges[p] and c <= spaceRanges[p+1]: + return true + +iterator runes*(s: string): TRune = + ## iterates over any unicode character of the string `s`. + var + i = 0 + result: TRune + while i < len(s): + fastRuneAt(s, i, result) + yield result + +proc cmpRunesIgnoreCase*(a, b: string): int = + ## compares two UTF8 strings and ignores the case. Returns: + ## + ## | 0 iff a == b ## | < 0 iff a < b ## | > 0 iff a > b - ## | == 0 iff a == b - ## This routine is useful for sorting UTF-8 strings. - return -1 - + var i = 0 + var j = 0 + var ar, br: TRune + while i < a.len and j < b.len: + # slow path: + fastRuneAt(a, i, ar) + fastRuneAt(b, j, br) + result = toLower(ar) - toLower(br) + if result != 0: return + result = a.len - b.len + diff --git a/lib/windows/windows.nim b/lib/windows/windows.nim index 2ac5fd7b6..ea650e80a 100644 --- a/lib/windows/windows.nim +++ b/lib/windows/windows.nim @@ -10,6 +10,8 @@ ## Define ``winUnicode`` before importing this module for the ## unicode version. +{.deadCodeElim: on.} + type ATOM* = int16 TAtom* = ATOM diff --git a/makefile b/makefile index 75ac2d09b..75507969c 100644 --- a/makefile +++ b/makefile @@ -7,7 +7,7 @@ all: .PHONY : install install: - sh install.sh /usr/bin + sh build.sh .PHONY : clean clean: diff --git a/nim/ast.pas b/nim/ast.pas index be967a568..c22385805 100644 --- a/nim/ast.pas +++ b/nim/ast.pas @@ -65,148 +65,148 @@ for key, val in enums.items(): cog.out(a) cog.out(b) ]]]*) -type - TTypeFlag = ( - tfVarargs, tfFinal, tfAcyclic, tfEnumHasWholes); - TTypeFlags = set of TTypeFlag; -const - TypeFlagToStr: array [TTypeFlag] of string = ( - 'tfVarargs', 'tfFinal', 'tfAcyclic', 'tfEnumHasWholes'); -type - TTypeKind = ( - tyNone, tyBool, tyChar, tyEmpty, - tyArrayConstr, tyNil, tyGeneric, tyGenericInst, - tyGenericParam, tyEnum, tyAnyEnum, tyArray, - tyObject, tyTuple, tySet, tyRange, - tyPtr, tyRef, tyVar, tySequence, - tyProc, tyPointer, tyOpenArray, tyString, - tyCString, tyForward, tyInt, tyInt8, - tyInt16, tyInt32, tyInt64, tyFloat, - tyFloat32, tyFloat64, tyFloat128); - TTypeKinds = set of TTypeKind; -const - TypeKindToStr: array [TTypeKind] of string = ( - 'tyNone', 'tyBool', 'tyChar', 'tyEmpty', - 'tyArrayConstr', 'tyNil', 'tyGeneric', 'tyGenericInst', - 'tyGenericParam', 'tyEnum', 'tyAnyEnum', 'tyArray', - 'tyObject', 'tyTuple', 'tySet', 'tyRange', - 'tyPtr', 'tyRef', 'tyVar', 'tySequence', - 'tyProc', 'tyPointer', 'tyOpenArray', 'tyString', - 'tyCString', 'tyForward', 'tyInt', 'tyInt8', - 'tyInt16', 'tyInt32', 'tyInt64', 'tyFloat', - 'tyFloat32', 'tyFloat64', 'tyFloat128'); -type - TSymFlag = ( - sfUsed, sfStar, sfMinus, sfInInterface, - sfFromGeneric, sfGlobal, sfForward, sfImportc, - sfExportc, sfVolatile, sfRegister, sfPure, - sfResult, sfNoSideEffect, sfMainModule, sfSystemModule, - sfNoReturn, sfAddrTaken, sfCompilerProc, sfCppMethod, - sfDiscriminant, sfDeprecated, sfInClosure, sfTypeCheck, - sfCompileTime, sfThreadVar, sfMerge); - TSymFlags = set of TSymFlag; -const - SymFlagToStr: array [TSymFlag] of string = ( - 'sfUsed', 'sfStar', 'sfMinus', 'sfInInterface', - 'sfFromGeneric', 'sfGlobal', 'sfForward', 'sfImportc', - 'sfExportc', 'sfVolatile', 'sfRegister', 'sfPure', - 'sfResult', 'sfNoSideEffect', 'sfMainModule', 'sfSystemModule', - 'sfNoReturn', 'sfAddrTaken', 'sfCompilerProc', 'sfCppMethod', - 'sfDiscriminant', 'sfDeprecated', 'sfInClosure', 'sfTypeCheck', - 'sfCompileTime', 'sfThreadVar', 'sfMerge'); -type - TNodeFlag = ( - nfNone, nfBase2, nfBase8, nfBase16, - nfAllConst, nfTransf, nfSem); - TNodeFlags = set of TNodeFlag; -const - NodeFlagToStr: array [TNodeFlag] of string = ( - 'nfNone', 'nfBase2', 'nfBase8', 'nfBase16', - 'nfAllConst', 'nfTransf', 'nfSem'); -type - TSymKind = ( - skUnknownSym, skConditional, skDynLib, skParam, - skTypeParam, skTemp, skType, skConst, - skVar, skProc, skIterator, skConverter, - skMacro, skTemplate, skField, skEnumField, - skForVar, skModule, skLabel, skStub); - TSymKinds = set of TSymKind; -const - SymKindToStr: array [TSymKind] of string = ( - 'skUnknownSym', 'skConditional', 'skDynLib', 'skParam', - 'skTypeParam', 'skTemp', 'skType', 'skConst', - 'skVar', 'skProc', 'skIterator', 'skConverter', - 'skMacro', 'skTemplate', 'skField', 'skEnumField', - 'skForVar', 'skModule', 'skLabel', 'skStub'); -type - TNodeKind = ( - nkNone, nkEmpty, nkIdent, nkSym, - nkType, nkCharLit, nkIntLit, nkInt8Lit, - nkInt16Lit, nkInt32Lit, nkInt64Lit, nkFloatLit, - nkFloat32Lit, nkFloat64Lit, nkStrLit, nkRStrLit, - nkTripleStrLit, nkMetaNode, nkNilLit, nkDotCall, - nkCommand, nkCall, nkGenericCall, nkExplicitTypeListCall, - nkExprEqExpr, nkExprColonExpr, nkIdentDefs, nkInfix, - nkPrefix, nkPostfix, nkPar, nkCurly, - nkBracket, nkBracketExpr, nkPragmaExpr, nkRange, - nkDotExpr, nkCheckedFieldExpr, nkDerefExpr, nkIfExpr, - nkElifExpr, nkElseExpr, nkLambda, nkAccQuoted, - nkHeaderQuoted, nkTableConstr, nkQualified, nkHiddenStdConv, - nkHiddenSubConv, nkHiddenCallConv, nkConv, nkCast, - nkAddr, nkHiddenAddr, nkHiddenDeref, nkObjDownConv, - nkObjUpConv, nkChckRangeF, nkChckRange64, nkChckRange, - nkStringToCString, nkCStringToString, nkPassAsOpenArray, nkAsgn, - nkDefaultTypeParam, nkGenericParams, nkFormalParams, nkOfInherit, - nkModule, nkProcDef, nkConverterDef, nkMacroDef, - nkTemplateDef, nkIteratorDef, nkOfBranch, nkElifBranch, - nkExceptBranch, nkElse, nkMacroStmt, nkAsmStmt, - nkPragma, nkIfStmt, nkWhenStmt, nkForStmt, - nkWhileStmt, nkCaseStmt, nkVarSection, nkConstSection, - nkConstDef, nkTypeSection, nkTypeDef, nkYieldStmt, - nkTryStmt, nkFinally, nkRaiseStmt, nkReturnStmt, - nkBreakStmt, nkContinueStmt, nkBlockStmt, nkDiscardStmt, - nkStmtList, nkImportStmt, nkFromStmt, nkImportAs, - nkIncludeStmt, nkAccessStmt, nkCommentStmt, nkStmtListExpr, - nkBlockExpr, nkStmtListType, nkBlockType, nkVm, - nkTypeOfExpr, nkObjectTy, nkTupleTy, nkRecList, - nkRecCase, nkRecWhen, nkRefTy, nkPtrTy, - nkVarTy, nkProcTy, nkEnumTy, nkEnumFieldDef, - nkReturnToken); - TNodeKinds = set of TNodeKind; -const - NodeKindToStr: array [TNodeKind] of string = ( - 'nkNone', 'nkEmpty', 'nkIdent', 'nkSym', - 'nkType', 'nkCharLit', 'nkIntLit', 'nkInt8Lit', - 'nkInt16Lit', 'nkInt32Lit', 'nkInt64Lit', 'nkFloatLit', - 'nkFloat32Lit', 'nkFloat64Lit', 'nkStrLit', 'nkRStrLit', - 'nkTripleStrLit', 'nkMetaNode', 'nkNilLit', 'nkDotCall', - 'nkCommand', 'nkCall', 'nkGenericCall', 'nkExplicitTypeListCall', - 'nkExprEqExpr', 'nkExprColonExpr', 'nkIdentDefs', 'nkInfix', - 'nkPrefix', 'nkPostfix', 'nkPar', 'nkCurly', - 'nkBracket', 'nkBracketExpr', 'nkPragmaExpr', 'nkRange', - 'nkDotExpr', 'nkCheckedFieldExpr', 'nkDerefExpr', 'nkIfExpr', - 'nkElifExpr', 'nkElseExpr', 'nkLambda', 'nkAccQuoted', - 'nkHeaderQuoted', 'nkTableConstr', 'nkQualified', 'nkHiddenStdConv', - 'nkHiddenSubConv', 'nkHiddenCallConv', 'nkConv', 'nkCast', - 'nkAddr', 'nkHiddenAddr', 'nkHiddenDeref', 'nkObjDownConv', - 'nkObjUpConv', 'nkChckRangeF', 'nkChckRange64', 'nkChckRange', - 'nkStringToCString', 'nkCStringToString', 'nkPassAsOpenArray', 'nkAsgn', - 'nkDefaultTypeParam', 'nkGenericParams', 'nkFormalParams', 'nkOfInherit', - 'nkModule', 'nkProcDef', 'nkConverterDef', 'nkMacroDef', - 'nkTemplateDef', 'nkIteratorDef', 'nkOfBranch', 'nkElifBranch', - 'nkExceptBranch', 'nkElse', 'nkMacroStmt', 'nkAsmStmt', - 'nkPragma', 'nkIfStmt', 'nkWhenStmt', 'nkForStmt', - 'nkWhileStmt', 'nkCaseStmt', 'nkVarSection', 'nkConstSection', - 'nkConstDef', 'nkTypeSection', 'nkTypeDef', 'nkYieldStmt', - 'nkTryStmt', 'nkFinally', 'nkRaiseStmt', 'nkReturnStmt', - 'nkBreakStmt', 'nkContinueStmt', 'nkBlockStmt', 'nkDiscardStmt', - 'nkStmtList', 'nkImportStmt', 'nkFromStmt', 'nkImportAs', - 'nkIncludeStmt', 'nkAccessStmt', 'nkCommentStmt', 'nkStmtListExpr', - 'nkBlockExpr', 'nkStmtListType', 'nkBlockType', 'nkVm', - 'nkTypeOfExpr', 'nkObjectTy', 'nkTupleTy', 'nkRecList', - 'nkRecCase', 'nkRecWhen', 'nkRefTy', 'nkPtrTy', - 'nkVarTy', 'nkProcTy', 'nkEnumTy', 'nkEnumFieldDef', - 'nkReturnToken'); +type + TNodeKind = ( + nkNone, nkEmpty, nkIdent, nkSym, + nkType, nkCharLit, nkIntLit, nkInt8Lit, + nkInt16Lit, nkInt32Lit, nkInt64Lit, nkFloatLit, + nkFloat32Lit, nkFloat64Lit, nkStrLit, nkRStrLit, + nkTripleStrLit, nkMetaNode, nkNilLit, nkDotCall, + nkCommand, nkCall, nkGenericCall, nkExplicitTypeListCall, + nkExprEqExpr, nkExprColonExpr, nkIdentDefs, nkVarTuple, + nkInfix, nkPrefix, nkPostfix, nkPar, + nkCurly, nkBracket, nkBracketExpr, nkPragmaExpr, + nkRange, nkDotExpr, nkCheckedFieldExpr, nkDerefExpr, + nkIfExpr, nkElifExpr, nkElseExpr, nkLambda, + nkAccQuoted, nkHeaderQuoted, nkTableConstr, nkQualified, + nkHiddenStdConv, nkHiddenSubConv, nkHiddenCallConv, nkConv, + nkCast, nkAddr, nkHiddenAddr, nkHiddenDeref, + nkObjDownConv, nkObjUpConv, nkChckRangeF, nkChckRange64, + nkChckRange, nkStringToCString, nkCStringToString, nkPassAsOpenArray, + nkAsgn, nkFastAsgn, nkDefaultTypeParam, nkGenericParams, + nkFormalParams, nkOfInherit, nkModule, nkProcDef, + nkConverterDef, nkMacroDef, nkTemplateDef, nkIteratorDef, + nkOfBranch, nkElifBranch, nkExceptBranch, nkElse, + nkMacroStmt, nkAsmStmt, nkPragma, nkIfStmt, + nkWhenStmt, nkForStmt, nkWhileStmt, nkCaseStmt, + nkVarSection, nkConstSection, nkConstDef, nkTypeSection, + nkTypeDef, nkYieldStmt, nkTryStmt, nkFinally, + nkRaiseStmt, nkReturnStmt, nkBreakStmt, nkContinueStmt, + nkBlockStmt, nkDiscardStmt, nkStmtList, nkImportStmt, + nkFromStmt, nkImportAs, nkIncludeStmt, nkAccessStmt, + nkCommentStmt, nkStmtListExpr, nkBlockExpr, nkStmtListType, + nkBlockType, nkVm, nkTypeOfExpr, nkObjectTy, + nkTupleTy, nkRecList, nkRecCase, nkRecWhen, + nkRefTy, nkPtrTy, nkVarTy, nkProcTy, + nkEnumTy, nkEnumFieldDef, nkReturnToken); + TNodeKinds = set of TNodeKind; +const + NodeKindToStr: array [TNodeKind] of string = ( + 'nkNone', 'nkEmpty', 'nkIdent', 'nkSym', + 'nkType', 'nkCharLit', 'nkIntLit', 'nkInt8Lit', + 'nkInt16Lit', 'nkInt32Lit', 'nkInt64Lit', 'nkFloatLit', + 'nkFloat32Lit', 'nkFloat64Lit', 'nkStrLit', 'nkRStrLit', + 'nkTripleStrLit', 'nkMetaNode', 'nkNilLit', 'nkDotCall', + 'nkCommand', 'nkCall', 'nkGenericCall', 'nkExplicitTypeListCall', + 'nkExprEqExpr', 'nkExprColonExpr', 'nkIdentDefs', 'nkVarTuple', + 'nkInfix', 'nkPrefix', 'nkPostfix', 'nkPar', + 'nkCurly', 'nkBracket', 'nkBracketExpr', 'nkPragmaExpr', + 'nkRange', 'nkDotExpr', 'nkCheckedFieldExpr', 'nkDerefExpr', + 'nkIfExpr', 'nkElifExpr', 'nkElseExpr', 'nkLambda', + 'nkAccQuoted', 'nkHeaderQuoted', 'nkTableConstr', 'nkQualified', + 'nkHiddenStdConv', 'nkHiddenSubConv', 'nkHiddenCallConv', 'nkConv', + 'nkCast', 'nkAddr', 'nkHiddenAddr', 'nkHiddenDeref', + 'nkObjDownConv', 'nkObjUpConv', 'nkChckRangeF', 'nkChckRange64', + 'nkChckRange', 'nkStringToCString', 'nkCStringToString', 'nkPassAsOpenArray', + 'nkAsgn', 'nkFastAsgn', 'nkDefaultTypeParam', 'nkGenericParams', + 'nkFormalParams', 'nkOfInherit', 'nkModule', 'nkProcDef', + 'nkConverterDef', 'nkMacroDef', 'nkTemplateDef', 'nkIteratorDef', + 'nkOfBranch', 'nkElifBranch', 'nkExceptBranch', 'nkElse', + 'nkMacroStmt', 'nkAsmStmt', 'nkPragma', 'nkIfStmt', + 'nkWhenStmt', 'nkForStmt', 'nkWhileStmt', 'nkCaseStmt', + 'nkVarSection', 'nkConstSection', 'nkConstDef', 'nkTypeSection', + 'nkTypeDef', 'nkYieldStmt', 'nkTryStmt', 'nkFinally', + 'nkRaiseStmt', 'nkReturnStmt', 'nkBreakStmt', 'nkContinueStmt', + 'nkBlockStmt', 'nkDiscardStmt', 'nkStmtList', 'nkImportStmt', + 'nkFromStmt', 'nkImportAs', 'nkIncludeStmt', 'nkAccessStmt', + 'nkCommentStmt', 'nkStmtListExpr', 'nkBlockExpr', 'nkStmtListType', + 'nkBlockType', 'nkVm', 'nkTypeOfExpr', 'nkObjectTy', + 'nkTupleTy', 'nkRecList', 'nkRecCase', 'nkRecWhen', + 'nkRefTy', 'nkPtrTy', 'nkVarTy', 'nkProcTy', + 'nkEnumTy', 'nkEnumFieldDef', 'nkReturnToken'); +type + TSymFlag = ( + sfUsed, sfStar, sfMinus, sfInInterface, + sfFromGeneric, sfGlobal, sfForward, sfImportc, + sfExportc, sfVolatile, sfRegister, sfPure, + sfResult, sfNoSideEffect, sfMainModule, sfSystemModule, + sfNoReturn, sfAddrTaken, sfCompilerProc, sfCppMethod, + sfDiscriminant, sfDeprecated, sfInClosure, sfTypeCheck, + sfCompileTime, sfThreadVar, sfMerge, sfDeadCodeElim); + TSymFlags = set of TSymFlag; +const + SymFlagToStr: array [TSymFlag] of string = ( + 'sfUsed', 'sfStar', 'sfMinus', 'sfInInterface', + 'sfFromGeneric', 'sfGlobal', 'sfForward', 'sfImportc', + 'sfExportc', 'sfVolatile', 'sfRegister', 'sfPure', + 'sfResult', 'sfNoSideEffect', 'sfMainModule', 'sfSystemModule', + 'sfNoReturn', 'sfAddrTaken', 'sfCompilerProc', 'sfCppMethod', + 'sfDiscriminant', 'sfDeprecated', 'sfInClosure', 'sfTypeCheck', + 'sfCompileTime', 'sfThreadVar', 'sfMerge', 'sfDeadCodeElim'); +type + TTypeKind = ( + tyNone, tyBool, tyChar, tyEmpty, + tyArrayConstr, tyNil, tyGeneric, tyGenericInst, + tyGenericParam, tyEnum, tyAnyEnum, tyArray, + tyObject, tyTuple, tySet, tyRange, + tyPtr, tyRef, tyVar, tySequence, + tyProc, tyPointer, tyOpenArray, tyString, + tyCString, tyForward, tyInt, tyInt8, + tyInt16, tyInt32, tyInt64, tyFloat, + tyFloat32, tyFloat64, tyFloat128); + TTypeKinds = set of TTypeKind; +const + TypeKindToStr: array [TTypeKind] of string = ( + 'tyNone', 'tyBool', 'tyChar', 'tyEmpty', + 'tyArrayConstr', 'tyNil', 'tyGeneric', 'tyGenericInst', + 'tyGenericParam', 'tyEnum', 'tyAnyEnum', 'tyArray', + 'tyObject', 'tyTuple', 'tySet', 'tyRange', + 'tyPtr', 'tyRef', 'tyVar', 'tySequence', + 'tyProc', 'tyPointer', 'tyOpenArray', 'tyString', + 'tyCString', 'tyForward', 'tyInt', 'tyInt8', + 'tyInt16', 'tyInt32', 'tyInt64', 'tyFloat', + 'tyFloat32', 'tyFloat64', 'tyFloat128'); +type + TNodeFlag = ( + nfNone, nfBase2, nfBase8, nfBase16, + nfAllConst, nfTransf, nfSem); + TNodeFlags = set of TNodeFlag; +const + NodeFlagToStr: array [TNodeFlag] of string = ( + 'nfNone', 'nfBase2', 'nfBase8', 'nfBase16', + 'nfAllConst', 'nfTransf', 'nfSem'); +type + TTypeFlag = ( + tfVarargs, tfFinal, tfAcyclic, tfEnumHasWholes); + TTypeFlags = set of TTypeFlag; +const + TypeFlagToStr: array [TTypeFlag] of string = ( + 'tfVarargs', 'tfFinal', 'tfAcyclic', 'tfEnumHasWholes'); +type + TSymKind = ( + skUnknownSym, skConditional, skDynLib, skParam, + skTypeParam, skTemp, skType, skConst, + skVar, skProc, skIterator, skConverter, + skMacro, skTemplate, skField, skEnumField, + skForVar, skModule, skLabel, skStub); + TSymKinds = set of TSymKind; +const + SymKindToStr: array [TSymKind] of string = ( + 'skUnknownSym', 'skConditional', 'skDynLib', 'skParam', + 'skTypeParam', 'skTemp', 'skType', 'skConst', + 'skVar', 'skProc', 'skIterator', 'skConverter', + 'skMacro', 'skTemplate', 'skField', 'skEnumField', + 'skForVar', 'skModule', 'skLabel', 'skStub'); {[[[end]]]} type @@ -219,43 +219,44 @@ type // if (i+1) % 6 == 0: cog.outl("") //cog.outl("m" + magics[-1]) //]]] - mNone, mDefined, mLow, mHigh, mSizeOf, mIs, - mSucc, mPred, mInc, mDec, mOrd, mNew, - mNewFinalize, mNewSeq, mRegisterFinalizer, mLengthOpenArray, mLengthStr, mLengthArray, - mLengthSeq, mIncl, mExcl, mCard, mChr, mGCref, - mGCunref, mAddI, mSubI, mMulI, mDivI, mModI, - mAddI64, mSubI64, mMulI64, mDivI64, mModI64, mShrI, - mShlI, mBitandI, mBitorI, mBitxorI, mMinI, mMaxI, - mShrI64, mShlI64, mBitandI64, mBitorI64, mBitxorI64, mMinI64, - mMaxI64, mAddF64, mSubF64, mMulF64, mDivF64, mMinF64, - mMaxF64, mAddU, mSubU, mMulU, mDivU, mModU, - mAddU64, mSubU64, mMulU64, mDivU64, mModU64, mEqI, - mLeI, mLtI, mEqI64, mLeI64, mLtI64, mEqF64, - mLeF64, mLtF64, mLeU, mLtU, mLeU64, mLtU64, - mEqEnum, mLeEnum, mLtEnum, mEqCh, mLeCh, mLtCh, - mEqB, mLeB, mLtB, mEqRef, mEqProc, mEqUntracedRef, - mLePtr, mLtPtr, mEqCString, mXor, mUnaryMinusI, mUnaryMinusI64, - mAbsI, mAbsI64, mNot, mUnaryPlusI, mBitnotI, mUnaryPlusI64, - mBitnotI64, mUnaryPlusF64, mUnaryMinusF64, mAbsF64, mZe8ToI, mZe8ToI64, - mZe16ToI, mZe16ToI64, mZe32ToI64, mZeIToI64, mToU8, mToU16, - mToU32, mToFloat, mToBiggestFloat, mToInt, mToBiggestInt, mCharToStr, - mBoolToStr, mIntToStr, mInt64ToStr, mFloatToStr, mCStrToStr, mStrToStr, - mAnd, mOr, mEqStr, mLeStr, mLtStr, mEqSet, - mLeSet, mLtSet, mMulSet, mPlusSet, mMinusSet, mSymDiffSet, - mConStrStr, mConArrArr, mConArrT, mConTArr, mConTT, mSlice, - mAppendStrCh, mAppendStrStr, mAppendSeqElem, mAppendSeqSeq, mInRange, mInSet, - mAsgn, mRepr, mExit, mSetLengthStr, mSetLengthSeq, mAssert, - mSwap, mIsNil, mArrToSeq, mArray, mOpenArray, mRange, - mSet, mSeq, mInt, mInt8, mInt16, mInt32, - mInt64, mFloat, mFloat32, mFloat64, mBool, mChar, - mString, mCstring, mPointer, mAnyEnum, mEmptySet, mIntSetBaseType, - mNil, mIsMainModule, mCompileDate, mCompileTime, mNimrodVersion, mNimrodMajor, - mNimrodMinor, mNimrodPatch, mCpuEndian, mNaN, mInf, mNegInf, - mNLen, mNChild, mNSetChild, mNAdd, mNAddMultiple, mNDel, - mNKind, mNIntVal, mNFloatVal, mNSymbol, mNIdent, mNGetType, - mNStrVal, mNSetIntVal, mNSetFloatVal, mNSetSymbol, mNSetIdent, mNSetType, - mNSetStrVal, mNNewNimNode, mNCopyNimNode, mNCopyNimTree, mStrToIdent, mIdentToStr, - mEqIdent, mNHint, mNWarning, mNError + mNone, mDefined, mLow, mHigh, mSizeOf, mIs, + mSucc, mPred, mInc, mDec, mOrd, mNew, + mNewFinalize, mNewSeq, mRegisterFinalizer, mLengthOpenArray, mLengthStr, mLengthArray, + mLengthSeq, mIncl, mExcl, mCard, mChr, mGCref, + mGCunref, mAddI, mSubI, mMulI, mDivI, mModI, + mAddI64, mSubI64, mMulI64, mDivI64, mModI64, mShrI, + mShlI, mBitandI, mBitorI, mBitxorI, mMinI, mMaxI, + mShrI64, mShlI64, mBitandI64, mBitorI64, mBitxorI64, mMinI64, + mMaxI64, mAddF64, mSubF64, mMulF64, mDivF64, mMinF64, + mMaxF64, mAddU, mSubU, mMulU, mDivU, mModU, + mAddU64, mSubU64, mMulU64, mDivU64, mModU64, mEqI, + mLeI, mLtI, mEqI64, mLeI64, mLtI64, mEqF64, + mLeF64, mLtF64, mLeU, mLtU, mLeU64, mLtU64, + mEqEnum, mLeEnum, mLtEnum, mEqCh, mLeCh, mLtCh, + mEqB, mLeB, mLtB, mEqRef, mEqProc, mEqUntracedRef, + mLePtr, mLtPtr, mEqCString, mXor, mUnaryMinusI, mUnaryMinusI64, + mAbsI, mAbsI64, mNot, mUnaryPlusI, mBitnotI, mUnaryPlusI64, + mBitnotI64, mUnaryPlusF64, mUnaryMinusF64, mAbsF64, mZe8ToI, mZe8ToI64, + mZe16ToI, mZe16ToI64, mZe32ToI64, mZeIToI64, mToU8, mToU16, + mToU32, mToFloat, mToBiggestFloat, mToInt, mToBiggestInt, mCharToStr, + mBoolToStr, mIntToStr, mInt64ToStr, mFloatToStr, mCStrToStr, mStrToStr, + mEnumToStr, mAnd, mOr, mEqStr, mLeStr, mLtStr, + mEqSet, mLeSet, mLtSet, mMulSet, mPlusSet, mMinusSet, + mSymDiffSet, mConStrStr, mConArrArr, mConArrT, mConTArr, mConTT, + mSlice, mAppendStrCh, mAppendStrStr, mAppendSeqElem, mAppendSeqSeq, mInRange, + mInSet, mAsgn, mRepr, mExit, mSetLengthStr, mSetLengthSeq, + mAssert, mSwap, mIsNil, mArrToSeq, mArray, mOpenArray, + mRange, mSet, mSeq, mInt, mInt8, mInt16, + mInt32, mInt64, mFloat, mFloat32, mFloat64, mBool, + mChar, mString, mCstring, mPointer, mAnyEnum, mEmptySet, + mIntSetBaseType, mNil, mIsMainModule, mCompileDate, mCompileTime, mNimrodVersion, + mNimrodMajor, mNimrodMinor, mNimrodPatch, mCpuEndian, mHostOS, mHostCPU, + mNaN, mInf, mNegInf, mNLen, mNChild, mNSetChild, + mNAdd, mNAddMultiple, mNDel, mNKind, mNIntVal, mNFloatVal, + mNSymbol, mNIdent, mNGetType, mNStrVal, mNSetIntVal, mNSetFloatVal, + mNSetSymbol, mNSetIdent, mNSetType, mNSetStrVal, mNNewNimNode, mNCopyNimNode, + mNCopyNimTree, mStrToIdent, mIdentToStr, mEqIdent, mNHint, mNWarning, + mNError //[[[end]]] ); @@ -322,7 +323,6 @@ type locProc, // location is a proc (an address of a procedure) locData, // location is a constant locCall, // location is a call expression - locImmediate, // location is an immediate value locOther // location is something other ); @@ -477,43 +477,44 @@ const // "MagicToStr" array: // if (i+1) % 6 == 0: cog.outl("") //cog.outl("'%s'" % magics[-1]) //]]] - 'None', 'Defined', 'Low', 'High', 'SizeOf', 'Is', - 'Succ', 'Pred', 'Inc', 'Dec', 'Ord', 'New', - 'NewFinalize', 'NewSeq', 'RegisterFinalizer', 'LengthOpenArray', 'LengthStr', 'LengthArray', - 'LengthSeq', 'Incl', 'Excl', 'Card', 'Chr', 'GCref', - 'GCunref', 'AddI', 'SubI', 'MulI', 'DivI', 'ModI', - 'AddI64', 'SubI64', 'MulI64', 'DivI64', 'ModI64', 'ShrI', - 'ShlI', 'BitandI', 'BitorI', 'BitxorI', 'MinI', 'MaxI', - 'ShrI64', 'ShlI64', 'BitandI64', 'BitorI64', 'BitxorI64', 'MinI64', - 'MaxI64', 'AddF64', 'SubF64', 'MulF64', 'DivF64', 'MinF64', - 'MaxF64', 'AddU', 'SubU', 'MulU', 'DivU', 'ModU', - 'AddU64', 'SubU64', 'MulU64', 'DivU64', 'ModU64', 'EqI', - 'LeI', 'LtI', 'EqI64', 'LeI64', 'LtI64', 'EqF64', - 'LeF64', 'LtF64', 'LeU', 'LtU', 'LeU64', 'LtU64', - 'EqEnum', 'LeEnum', 'LtEnum', 'EqCh', 'LeCh', 'LtCh', - 'EqB', 'LeB', 'LtB', 'EqRef', 'EqProc', 'EqUntracedRef', - 'LePtr', 'LtPtr', 'EqCString', 'Xor', 'UnaryMinusI', 'UnaryMinusI64', - 'AbsI', 'AbsI64', 'Not', 'UnaryPlusI', 'BitnotI', 'UnaryPlusI64', - 'BitnotI64', 'UnaryPlusF64', 'UnaryMinusF64', 'AbsF64', 'Ze8ToI', 'Ze8ToI64', - 'Ze16ToI', 'Ze16ToI64', 'Ze32ToI64', 'ZeIToI64', 'ToU8', 'ToU16', - 'ToU32', 'ToFloat', 'ToBiggestFloat', 'ToInt', 'ToBiggestInt', 'CharToStr', - 'BoolToStr', 'IntToStr', 'Int64ToStr', 'FloatToStr', 'CStrToStr', 'StrToStr', - 'And', 'Or', 'EqStr', 'LeStr', 'LtStr', 'EqSet', - 'LeSet', 'LtSet', 'MulSet', 'PlusSet', 'MinusSet', 'SymDiffSet', - 'ConStrStr', 'ConArrArr', 'ConArrT', 'ConTArr', 'ConTT', 'Slice', - 'AppendStrCh', 'AppendStrStr', 'AppendSeqElem', 'AppendSeqSeq', 'InRange', 'InSet', - 'Asgn', 'Repr', 'Exit', 'SetLengthStr', 'SetLengthSeq', 'Assert', - 'Swap', 'IsNil', 'ArrToSeq', 'Array', 'OpenArray', 'Range', - 'Set', 'Seq', 'Int', 'Int8', 'Int16', 'Int32', - 'Int64', 'Float', 'Float32', 'Float64', 'Bool', 'Char', - 'String', 'Cstring', 'Pointer', 'AnyEnum', 'EmptySet', 'IntSetBaseType', - 'Nil', 'IsMainModule', 'CompileDate', 'CompileTime', 'NimrodVersion', 'NimrodMajor', - 'NimrodMinor', 'NimrodPatch', 'CpuEndian', 'NaN', 'Inf', 'NegInf', - 'NLen', 'NChild', 'NSetChild', 'NAdd', 'NAddMultiple', 'NDel', - 'NKind', 'NIntVal', 'NFloatVal', 'NSymbol', 'NIdent', 'NGetType', - 'NStrVal', 'NSetIntVal', 'NSetFloatVal', 'NSetSymbol', 'NSetIdent', 'NSetType', - 'NSetStrVal', 'NNewNimNode', 'NCopyNimNode', 'NCopyNimTree', 'StrToIdent', 'IdentToStr', - 'EqIdent', 'NHint', 'NWarning', 'NError' + 'None', 'Defined', 'Low', 'High', 'SizeOf', 'Is', + 'Succ', 'Pred', 'Inc', 'Dec', 'Ord', 'New', + 'NewFinalize', 'NewSeq', 'RegisterFinalizer', 'LengthOpenArray', 'LengthStr', 'LengthArray', + 'LengthSeq', 'Incl', 'Excl', 'Card', 'Chr', 'GCref', + 'GCunref', 'AddI', 'SubI', 'MulI', 'DivI', 'ModI', + 'AddI64', 'SubI64', 'MulI64', 'DivI64', 'ModI64', 'ShrI', + 'ShlI', 'BitandI', 'BitorI', 'BitxorI', 'MinI', 'MaxI', + 'ShrI64', 'ShlI64', 'BitandI64', 'BitorI64', 'BitxorI64', 'MinI64', + 'MaxI64', 'AddF64', 'SubF64', 'MulF64', 'DivF64', 'MinF64', + 'MaxF64', 'AddU', 'SubU', 'MulU', 'DivU', 'ModU', + 'AddU64', 'SubU64', 'MulU64', 'DivU64', 'ModU64', 'EqI', + 'LeI', 'LtI', 'EqI64', 'LeI64', 'LtI64', 'EqF64', + 'LeF64', 'LtF64', 'LeU', 'LtU', 'LeU64', 'LtU64', + 'EqEnum', 'LeEnum', 'LtEnum', 'EqCh', 'LeCh', 'LtCh', + 'EqB', 'LeB', 'LtB', 'EqRef', 'EqProc', 'EqUntracedRef', + 'LePtr', 'LtPtr', 'EqCString', 'Xor', 'UnaryMinusI', 'UnaryMinusI64', + 'AbsI', 'AbsI64', 'Not', 'UnaryPlusI', 'BitnotI', 'UnaryPlusI64', + 'BitnotI64', 'UnaryPlusF64', 'UnaryMinusF64', 'AbsF64', 'Ze8ToI', 'Ze8ToI64', + 'Ze16ToI', 'Ze16ToI64', 'Ze32ToI64', 'ZeIToI64', 'ToU8', 'ToU16', + 'ToU32', 'ToFloat', 'ToBiggestFloat', 'ToInt', 'ToBiggestInt', 'CharToStr', + 'BoolToStr', 'IntToStr', 'Int64ToStr', 'FloatToStr', 'CStrToStr', 'StrToStr', + 'EnumToStr', 'And', 'Or', 'EqStr', 'LeStr', 'LtStr', + 'EqSet', 'LeSet', 'LtSet', 'MulSet', 'PlusSet', 'MinusSet', + 'SymDiffSet', 'ConStrStr', 'ConArrArr', 'ConArrT', 'ConTArr', 'ConTT', + 'Slice', 'AppendStrCh', 'AppendStrStr', 'AppendSeqElem', 'AppendSeqSeq', 'InRange', + 'InSet', 'Asgn', 'Repr', 'Exit', 'SetLengthStr', 'SetLengthSeq', + 'Assert', 'Swap', 'IsNil', 'ArrToSeq', 'Array', 'OpenArray', + 'Range', 'Set', 'Seq', 'Int', 'Int8', 'Int16', + 'Int32', 'Int64', 'Float', 'Float32', 'Float64', 'Bool', + 'Char', 'String', 'Cstring', 'Pointer', 'AnyEnum', 'EmptySet', + 'IntSetBaseType', 'Nil', 'IsMainModule', 'CompileDate', 'CompileTime', 'NimrodVersion', + 'NimrodMajor', 'NimrodMinor', 'NimrodPatch', 'CpuEndian', 'HostOS', 'HostCPU', + 'NaN', 'Inf', 'NegInf', 'NLen', 'NChild', 'NSetChild', + 'NAdd', 'NAddMultiple', 'NDel', 'NKind', 'NIntVal', 'NFloatVal', + 'NSymbol', 'NIdent', 'NGetType', 'NStrVal', 'NSetIntVal', 'NSetFloatVal', + 'NSetSymbol', 'NSetIdent', 'NSetType', 'NSetStrVal', 'NNewNimNode', 'NCopyNimNode', + 'NCopyNimTree', 'StrToIdent', 'IdentToStr', 'EqIdent', 'NHint', 'NWarning', + 'NError' //[[[end]]] ); @@ -1342,13 +1343,13 @@ end; function IntSetContains(const s: TIntSet; key: int): bool; var - u: int; + u: TBitScalar; t: PTrunk; begin - t := IntSetGet(s, key shr TrunkShift); + t := IntSetGet(s, shru(key, TrunkShift)); if t <> nil then begin u := key and TrunkMask; - result := (t.bits[u shr IntShift] and (1 shl (u and IntMask))) <> 0 + result := (t.bits[shru(u, IntShift)] and shlu(1, u and IntMask)) <> 0 end else result := false @@ -1356,27 +1357,27 @@ end; procedure IntSetIncl(var s: TIntSet; key: int); var - u: int; + u: TBitScalar; t: PTrunk; begin - t := IntSetPut(s, key shr TrunkShift); + t := IntSetPut(s, shru(key, TrunkShift)); u := key and TrunkMask; - t.bits[u shr IntShift] := t.bits[u shr IntShift] - or (1 shl (u and IntMask)); + t.bits[shru(u, IntShift)] := t.bits[shru(u, IntShift)] + or shlu(1, u and IntMask); end; function IntSetContainsOrIncl(var s: TIntSet; key: int): bool; var - u: int; + u: TBitScalar; t: PTrunk; begin - t := IntSetGet(s, key shr TrunkShift); + t := IntSetGet(s, shru(key, TrunkShift)); if t <> nil then begin u := key and TrunkMask; - result := (t.bits[u shr IntShift] and (1 shl (u and IntMask))) <> 0; + result := (t.bits[shru(u, IntShift)] and shlu(1, u and IntMask)) <> 0; if not result then - t.bits[u shr IntShift] := t.bits[u shr IntShift] - or (1 shl (u and IntMask)); + t.bits[shru(u, IntShift)] := t.bits[shru(u, IntShift)] + or shlu(1, u and IntMask); end else begin IntSetIncl(s, key); diff --git a/nim/astalgo.pas b/nim/astalgo.pas index 0e31f4ac7..f7b6f651d 100644 --- a/nim/astalgo.pas +++ b/nim/astalgo.pas @@ -450,29 +450,27 @@ begin else begin istr := spaces(indent+2); result := ropef('{$n$1"kind": $2', - [istr, makeYamlString(nodeKindToStr[n.kind])]); + [istr, makeYamlString(nodeKindToStr[n.kind])]); if maxRecDepth <> 0 then begin appf(result, ',$n$1"info": $2', [istr, lineInfoToStr(n.info)]); case n.kind of nkCharLit..nkInt64Lit: - appf(result, '$n$1"intVal": $2', [istr, toRope(n.intVal)]); + appf(result, ',$n$1"intVal": $2', [istr, toRope(n.intVal)]); nkFloatLit, nkFloat32Lit, nkFloat64Lit: - appf(result, '$n$1"floatVal": $2', - [istr, toRopeF(n.floatVal)]); + appf(result, ',$n$1"floatVal": $2', [istr, toRopeF(n.floatVal)]); nkStrLit..nkTripleStrLit: - appf(result, '$n$1"strVal": $2', - [istr, makeYamlString(n.strVal)]); + appf(result, ',$n$1"strVal": $2', [istr, makeYamlString(n.strVal)]); nkSym: appf(result, ',$n$1"sym": $2', [istr, symToYamlAux(n.sym, marker, indent+2, maxRecDepth)]); nkIdent: begin if n.ident <> nil then - appf(result, '$n$1"ident": $2', + appf(result, ',$n$1"ident": $2', [istr, makeYamlString(n.ident.s)]) else - appf(result, '$n$1"ident": null', [istr]) + appf(result, ',$n$1"ident": null', [istr]) end else begin if sonsLen(n) > 0 then begin @@ -552,12 +550,12 @@ begin if maxRecDepth <> 0 then begin case n.kind of nkCharLit..nkInt64Lit: - appf(result, '$n$1"intVal": $2', [istr, toRope(n.intVal)]); + appf(result, ',$n$1"intVal": $2', [istr, toRope(n.intVal)]); nkFloatLit, nkFloat32Lit, nkFloat64Lit: - appf(result, '$n$1"floatVal": $2', + appf(result, ',$n$1"floatVal": $2', [istr, toRopeF(n.floatVal)]); nkStrLit..nkTripleStrLit: - appf(result, '$n$1"strVal": $2', + appf(result, ',$n$1"strVal": $2', [istr, makeYamlString(n.strVal)]); nkSym: appf(result, ',$n$1"sym": $2_$3', @@ -565,10 +563,10 @@ begin nkIdent: begin if n.ident <> nil then - appf(result, '$n$1"ident": $2', + appf(result, ',$n$1"ident": $2', [istr, makeYamlString(n.ident.s)]) else - appf(result, '$n$1"ident": null', [istr]) + appf(result, ',$n$1"ident": null', [istr]) end else begin if sonsLen(n) > 0 then begin diff --git a/nim/ccgexprs.pas b/nim/ccgexprs.pas index f94cff3a4..161804208 100644 --- a/nim/ccgexprs.pas +++ b/nim/ccgexprs.pas @@ -126,7 +126,7 @@ var j: int; begin result := 0; - if CPU[hostCPU].endian = CPU[targetCPU].endian then begin + if CPU[platform.hostCPU].endian = CPU[targetCPU].endian then begin for j := 0 to size-1 do if j < length(s) then result := result or shlu(Ze64(s[j]), j * 8) @@ -773,6 +773,34 @@ begin putIntoDest(p, d, field.typ, r); end; +procedure genTupleElem(p: BProc; e: PNode; var d: TLoc); +var + a: TLoc; + field: PSym; + ty: PType; + r: PRope; + i: int; +begin + initLocExpr(p, e.sons[0], a); + if d.k = locNone then d.s := a.s; + {@discard} getTypeDesc(p.module, a.t); // fill the record's fields.loc + ty := getUniqueType(a.t); + r := rdLoc(a); + case e.sons[1].kind of + nkIntLit..nkInt64Lit: i := int(e.sons[1].intVal); + else internalError(e.info, 'genTupleElem'); + end; + if ty.n <> nil then begin + field := ty.n.sons[i].sym; + if field = nil then InternalError(e.info, 'genTupleElem'); + if field.loc.r = nil then InternalError(e.info, 'genTupleElem'); + appf(r, '.$1', [field.loc.r]); + end + else + appf(r, '.Field$1', [toRope(i)]); + putIntoDest(p, d, ty.sons[i], r); +end; + procedure genInExprAux(p: BProc; e: PNode; var a, b, d: TLoc); forward; procedure genCheckedRecordField(p: BProc; e: PNode; var d: TLoc); @@ -848,10 +876,11 @@ begin first := intLiteral(firstOrd(ty)); // emit range check: if (optBoundsCheck in p.options) then begin - if b.k <> locImmediate then begin // semantic pass has already checked: + if not isConstExpr(e.sons[1]) then begin + // semantic pass has already checked for const index expressions useMagic(p.module, 'raiseIndexError'); if firstOrd(ty) = 0 then begin - if lastOrd(b.t) > lastOrd(ty) then + if (firstOrd(b.t) < firstOrd(ty)) or (lastOrd(b.t) > lastOrd(ty)) then appf(p.s[cpsStmts], 'if ((NU)($1) > (NU)($2)) raiseIndexError();$n', [rdCharLoc(b), intLiteral(lastOrd(ty))]) @@ -1289,14 +1318,22 @@ var a, b, f: TLoc; refType, bt: PType; ti: PRope; + oldModule: BModule; begin useMagic(p.module, 'newObj'); refType := skipVarGenericRange(e.sons[1].typ); InitLocExpr(p, e.sons[1], a); + + // This is a little hack: + oldModule := p.module; + p.module := gmti; InitLocExpr(p, e.sons[2], f); + p.module := oldModule; + initLoc(b, locExpr, a.t, OnHeap); ti := genTypeInfo(p.module, refType); - appf(p.module.s[cfsTypeInit3], '$1->finalizer = (void*)$2;$n', [ + + appf(gmti.s[cfsTypeInit3], '$1->finalizer = (void*)$2;$n', [ ti, rdLoc(f)]); b.r := ropef('($1) newObj($2, sizeof($3))', [getTypeDesc(p.module, refType), ti, @@ -1331,7 +1368,7 @@ begin UseMagic(p.module, 'reprChar'); putIntoDest(p, d, e.typ, ropef('reprChar($1)', [rdLoc(a)])) end; - tyEnum: begin + tyEnum, tyAnyEnum: begin UseMagic(p.module, 'reprEnum'); putIntoDest(p, d, e.typ, ropef('reprEnum($1, $2)', [rdLoc(a), genTypeInfo(p.module, t)])) @@ -1853,6 +1890,7 @@ begin mFloatToStr: genDollar(p, e, d, 'nimFloatToStr', 'nimFloatToStr($1)'); mCStrToStr: genDollar(p, e, d, 'cstrToNimstr', 'cstrToNimstr($1)'); mStrToStr: expr(p, e.sons[1], d); + mEnumToStr: genRepr(p, e, d); mAssert: begin if (optAssert in p.Options) then begin useMagic(p.module, 'internalAssert'); @@ -1996,23 +2034,31 @@ var it: PNode; t: PType; begin - // the code generator assumes that there are only tuple constructors with - // field names! if not handleConstExpr(p, n, d) then begin t := getUniqueType(n.typ); {@discard} getTypeDesc(p.module, t); // so that any fields are initialized if d.k = locNone then getTemp(p, t, d); - if t.n = nil then InternalError(n.info, 'genTupleConstr'); - if sonsLen(t.n) <> sonsLen(n) then - InternalError(n.info, 'genTupleConstr'); for i := 0 to sonsLen(n)-1 do begin it := n.sons[i]; - if it.kind <> nkExprColonExpr then InternalError(n.info, 'genTupleConstr'); - initLoc(rec, locExpr, it.sons[1].typ, d.s); - if (t.n.sons[i].kind <> nkSym) then - InternalError(n.info, 'genTupleConstr'); - rec.r := ropef('$1.$2', [rdLoc(d), mangleRecFieldName(t.n.sons[i].sym, t)]); - expr(p, it.sons[1], rec); + if it.kind = nkExprColonExpr then begin + initLoc(rec, locExpr, it.sons[1].typ, d.s); + if (t.n.sons[i].kind <> nkSym) then + InternalError(n.info, 'genTupleConstr'); + rec.r := ropef('$1.$2', [rdLoc(d), mangleRecFieldName(t.n.sons[i].sym, t)]); + expr(p, it.sons[1], rec); + end + else if t.n = nil then begin + initLoc(rec, locExpr, it.typ, d.s); + rec.r := ropef('$1.Field$2', [rdLoc(d), toRope(i)]); + expr(p, it, rec); + end + else begin + initLoc(rec, locExpr, it.typ, d.s); + if (t.n.sons[i].kind <> nkSym) then + InternalError(n.info, 'genTupleConstr: 2'); + rec.r := ropef('$1.$2', [rdLoc(d), mangleRecFieldName(t.n.sons[i].sym, t)]); + expr(p, it, rec); + end end end end; @@ -2123,11 +2169,10 @@ begin sym := e.sym; case sym.Kind of skProc, skConverter: begin - // generate prototype if not already declared in this translation unit - genProcPrototype(p.module, sym); + genProc(p.module, sym); if ((sym.loc.r = nil) or (sym.loc.t = nil)) then InternalError(e.info, 'expr: proc not init ' + sym.name.s); - putLocIntoDest(p, d, sym.loc) + putLocIntoDest(p, d, sym.loc); end; skConst: if isSimpleConst(sym.typ) then @@ -2160,8 +2205,6 @@ begin nkStrLit..nkTripleStrLit, nkIntLit..nkInt64Lit, nkFloatLit..nkFloat64Lit, nkNilLit, nkCharLit: begin putIntoDest(p, d, e.typ, genLiteral(p, e)); - if d.k in [locNone, locExpr] then - d.k := locImmediate // for removal of index checks end; nkCall, nkHiddenCallConv, nkInfix, nkPrefix, nkPostfix, nkCommand: begin if (e.sons[0].kind = nkSym) and @@ -2189,6 +2232,7 @@ begin tyOpenArray: genOpenArrayElem(p, e, d); tySequence, tyString: genSeqElem(p, e, d); tyCString: genCStringElem(p, e, d); + tyTuple: genTupleElem(p, e, d); else InternalError(e.info, 'expr(nkBracketExpr, ' + typeKindToStr[ty.kind] + ')'); end diff --git a/nim/ccgstmts.pas b/nim/ccgstmts.pas index 0e93d6b0f..e611bbeea 100644 --- a/nim/ccgstmts.pas +++ b/nim/ccgstmts.pas @@ -801,9 +801,16 @@ begin assert(key.kind = nkIdent); case whichKeyword(key.ident) of wBreakpoint: genBreakPoint(p, it); + wDeadCodeElim: begin + if not (optDeadCodeElim in gGlobalOptions) then begin + // we need to keep track of ``deadCodeElim`` pragma + if (sfDeadCodeElim in p.module.module.flags) then + addPendingModule(p.module) + end + end else begin end end - end + end; end; procedure genAsgn(p: BProc; e: PNode); @@ -816,6 +823,17 @@ begin expr(p, e.sons[1], a); end; +procedure genFastAsgn(p: BProc; e: PNode); +var + a: TLoc; +begin + genLineDir(p, e); // BUGFIX + InitLocExpr(p, e.sons[0], a); + include(a.flags, lfNoDeepCopy); + assert(a.t <> nil); + expr(p, e.sons[1], a); +end; + procedure genStmts(p: BProc; t: PNode); var a: TLoc; @@ -844,6 +862,7 @@ begin initLocExpr(p, t, a); end; nkAsgn: genAsgn(p, t); + nkFastAsgn: genFastAsgn(p, t); nkDiscardStmt: begin genLineDir(p, t); initLocExpr(p, t.sons[0], a); @@ -865,17 +884,13 @@ begin nkProcDef, nkConverterDef: begin if (t.sons[genericParamsPos] = nil) then begin prc := t.sons[namePos].sym; - if (t.sons[codePos] <> nil) - or (lfDynamicLib in prc.loc.flags) then begin // BUGFIX - if IntSetContainsOrIncl(p.module.debugDeclared, prc.id) then begin - internalError(t.info, 'genStmts(): ' + toString(prc.id)); - // XXX: remove this check! - end; - //if IntSetContains(p.module.debugDeclared, 2642) then - // InternalError(t.info, 'this sucks ' + toString(prc.id)); - genProc(p.module, prc) + if not (optDeadCodeElim in gGlobalOptions) and + not (sfDeadCodeElim in getModule(prc).flags) + or ([sfExportc, sfCompilerProc] * prc.flags = [sfExportc]) then begin + if (t.sons[codePos] <> nil) or (lfDynamicLib in prc.loc.flags) then begin + genProc(p.module, prc) + end end - //else if sfCompilerProc in prc.flags then genProcPrototype(prc); end end; else diff --git a/nim/ccgtypes.pas b/nim/ccgtypes.pas index 5f4def667..f6eb64c08 100644 --- a/nim/ccgtypes.pas +++ b/nim/ccgtypes.pas @@ -8,7 +8,7 @@ // //var -// newDummyVar: int; // just to check the rodgen mechanism +// newDummyVar: int; // just to check the symbol file mechanism // ------------------------- Name Mangling -------------------------------- @@ -461,6 +461,22 @@ begin app(result, '};' + tnl); end; +function getTupleDesc(m: BModule; typ: PType; name: PRope; + var check: TIntSet): PRope; +var + desc: PRope; + i: int; +begin + result := ropef('struct $1 {$n', [name]); + desc := nil; + for i := 0 to sonsLen(typ)-1 do + appf(desc, '$1 Field$2;$n', + [getTypeDescAux(m, typ.sons[i], check), toRope(i)]); + if (desc = nil) then app(result, 'char dummy;' + tnl) + else app(result, desc); + app(result, '};' + tnl); +end; + procedure pushType(m: BModule; typ: PType); var L: int; @@ -571,13 +587,15 @@ begin if result = nil then begin result := getTypeName(t); if not isImportedType(t) then - appf(m.s[cfsForwardTypes], - getForwardStructFormat(), [result]); + appf(m.s[cfsForwardTypes], getForwardStructFormat(), [result]); IdTablePut(m.forwTypeCache, t, result) end; IdTablePut(m.typeCache, t, result); // always call for sideeffects: - recdesc := getRecordDesc(m, t, result, check); + if t.n <> nil then + recdesc := getRecordDesc(m, t, result, check) + else + recdesc := getTupleDesc(m, t, result, check); if not isImportedType(t) then app(m.s[cfsTypes], recdesc); end; tySet: begin @@ -735,9 +753,11 @@ begin assert(n.sons[0].kind = nkSym); field := n.sons[0].sym; tmp := getTempName(); + useMagic(m, 'chckNil'); appf(m.s[cfsTypeInit3], '$1.kind = 3;$n' + '$1.offset = offsetof($2, $3);$n' + '$1.typ = $4;$n' + + 'chckNil($1.typ);$n' + '$1.name = $5;$n' + '$1.sons = &$6[0];$n' + '$1.len = $7;$n', @@ -746,7 +766,7 @@ begin makeCString(field.name.s), tmp, toRope(lengthOrd(field.typ))]); appf(m.s[cfsTypeInit1], 'static TNimNode* $1[$2];$n', - [tmp, toRope(lengthOrd(field.typ)+1)]); + [tmp, toRope(lengthOrd(field.typ)+1)]); for i := 1 to len-1 do begin b := n.sons[i]; // branch tmp2 := getNimNode(m); @@ -761,18 +781,18 @@ begin y := int(getOrdValue(b.sons[j].sons[1])); while x <= y do begin appf(m.s[cfsTypeInit3], '$1[$2] = &$3;$n', - [tmp, toRope(x), tmp2]); + [tmp, toRope(x), tmp2]); inc(x); end; end else appf(m.s[cfsTypeInit3], '$1[$2] = &$3;$n', - [tmp, toRope(getOrdValue(b.sons[j])), tmp2]) + [tmp, toRope(getOrdValue(b.sons[j])), tmp2]) end end; nkElse: begin appf(m.s[cfsTypeInit3], '$1[$2] = &$3;$n', - [tmp, toRope(lengthOrd(field.typ)), tmp2]); + [tmp, toRope(lengthOrd(field.typ)), tmp2]); end else internalError(n.info, 'genObjectFields(nkRecCase)'); @@ -781,9 +801,11 @@ begin end; nkSym: begin field := n.sym; + useMagic(m, 'chckNil'); appf(m.s[cfsTypeInit3], '$1.kind = 1;$n' + '$1.offset = offsetof($2, $3);$n' + '$1.typ = $4;$n' + + 'chckNil($1.typ);$n' + '$1.name = $5;$n', [expr, getTypeDesc(m, typ), field.loc.r, genTypeInfo(m, field.typ), @@ -804,6 +826,41 @@ begin appf(m.s[cfsTypeInit3], '$1->node = &$2;$n', [name, tmp]); end; +procedure genTupleInfo(m: BModule; typ: PType; name: PRope); +var + tmp, expr, tmp2: PRope; + i, len: int; + a: PType; +begin + genTypeInfoAuxBase(m, typ, name, toRope('0'+'')); + expr := getNimNode(m); + len := sonsLen(typ); + if len > 0 then begin + tmp := getTempName(); + appf(m.s[cfsTypeInit1], 'static TNimNode* $1[$2];$n', [tmp, toRope(len)]); + for i := 0 to len-1 do begin + a := typ.sons[i]; + tmp2 := getNimNode(m); + appf(m.s[cfsTypeInit3], '$1[$2] = &$3;$n', [tmp, toRope(i), tmp2]); + useMagic(m, 'chckNil'); + appf(m.s[cfsTypeInit3], '$1.kind = 1;$n' + + '$1.offset = offsetof($2, Field$3);$n' + + '$1.typ = $4;$n' + + 'chckNil($1.typ);$n' + + '$1.name = "Field$3";$n', + [tmp2, getTypeDesc(m, typ), toRope(i), + genTypeInfo(m, a)]); + end; + appf(m.s[cfsTypeInit3], + '$1.len = $2; $1.kind = 2; $1.sons = &$3[0];$n', [ + expr, toRope(len), tmp]); + end + else + appf(m.s[cfsTypeInit3], + '$1.len = $2; $1.kind = 2;$n', [expr, toRope(len)]); + appf(m.s[cfsTypeInit3], '$1->node = &$2;$n', [name, tmp]); +end; + procedure genEnumInfo(m: BModule; typ: PType; name: PRope); var nodePtrs, elemNode, enumNames, enumArray, counter, specialCases: PRope; @@ -817,7 +874,8 @@ begin genTypeInfoAux(m, typ, name); nodePtrs := getTempName(); len := sonsLen(typ.n); - appf(m.s[cfsTypeInit1], 'static TNimNode* $1[$2];$n', [nodePtrs, toRope(len)]); + appf(m.s[cfsTypeInit1], 'static TNimNode* $1[$2];$n', + [nodePtrs, toRope(len)]); enumNames := nil; specialCases := nil; firstNimNode := m.typeNodes; @@ -879,83 +937,79 @@ function genTypeInfo(m: BModule; typ: PType): PRope; var t: PType; id: int; - dataGen: bool; + dataGenerated: bool; begin t := getUniqueType(typ); id := IiTableGet(gToTypeInfoId, t.id); if id = invalidKey then begin - dataGen := false; - case t.kind of - tyEnum, tyBool: begin - id := t.id; - dataGen := true - end; - tyObject: begin - if isPureObject(t) then - id := getID() - else begin - id := t.id; - dataGen := true - end - end - else - id := getID(); - end; + dataGenerated := false; + id := t.id; // getID(); IiTablePut(gToTypeInfoId, t.id, id); end else - dataGen := true; + dataGenerated := true; result := ropef('NTI$1', [toRope(id)]); - if not IntSetContainsOrIncl(m.typeInfoMarker, t.id) then begin + if not IntSetContainsOrIncl(m.typeInfoMarker, id) then begin // declare type information structures: useMagic(m, 'TNimType'); useMagic(m, 'TNimNode'); - if dataGen then - appf(m.s[cfsVars], 'extern TNimType* $1; /* $2 */$n', - [result, toRope(typeToString(t))]); + appf(m.s[cfsVars], 'extern TNimType* $1; /* $2 */$n', + [result, toRope(typeToString(t))]); end; - if dataGen then exit; + if dataGenerated then exit; case t.kind of tyPointer, tyProc, tyBool, tyChar, tyCString, tyString, tyInt..tyFloat128, tyVar: - genTypeInfoAuxBase(m, t, result, toRope('0'+'')); - tyRef, tyPtr, tySequence, tyRange: genTypeInfoAux(m, t, result); - tyArrayConstr, tyArray: genArrayInfo(m, t, result); - tySet: genSetInfo(m, t, result); - tyEnum: genEnumInfo(m, t, result); - tyObject, tyTuple: genObjectInfo(m, t, result); + genTypeInfoAuxBase(gmti, t, result, toRope('0'+'')); + tyRef, tyPtr, tySequence, tyRange: genTypeInfoAux(gmti, t, result); + tyArrayConstr, tyArray: genArrayInfo(gmti, t, result); + tySet: genSetInfo(gmti, t, result); + tyEnum: genEnumInfo(gmti, t, result); + tyObject: genObjectInfo(gmti, t, result); + tyTuple: begin + if t.n <> nil then genObjectInfo(gmti, t, result) + else genTupleInfo(gmti, t, result); + end; else InternalError('genTypeInfo(' + typekindToStr[t.kind] + ')'); end end; procedure genTypeSection(m: BModule; n: PNode); +begin +end; + +(* +procedure genTypeSection(m: BModule; n: PNode); var i: int; a: PNode; t: PType; begin - for i := 0 to sonsLen(n)-1 do begin - a := n.sons[i]; - if a.kind = nkCommentStmt then continue; - if (a.sons[0].kind <> nkSym) then InternalError(a.info, 'genTypeSection'); - t := a.sons[0].sym.typ; - if (a.sons[2] = nil) - or not (a.sons[2].kind in [nkSym, nkIdent, nkAccQuoted]) then - if t <> nil then - case t.kind of - tyEnum, tyBool: begin - useMagic(m, 'TNimType'); - useMagic(m, 'TNimNode'); - genEnumInfo(m, t, ropef('NTI$1', [toRope(t.id)])); - end; - tyObject: begin - if not isPureObject(t) then begin + if not (optDeadCodeElim in gGlobalOptions) then begin + for i := 0 to sonsLen(n)-1 do begin + a := n.sons[i]; + if a.kind = nkCommentStmt then continue; + if (a.sons[0].kind <> nkSym) then InternalError(a.info, 'genTypeSection'); + t := a.sons[0].sym.typ; + if (a.sons[2] = nil) + or not (a.sons[2].kind in [nkSym, nkIdent, nkAccQuoted]) then + if t <> nil then + case t.kind of + tyEnum, tyBool: begin useMagic(m, 'TNimType'); useMagic(m, 'TNimNode'); - genObjectInfo(m, t, ropef('NTI$1', [toRope(t.id)])); + genEnumInfo(m, t, ropef('NTI$1', [toRope(t.id)])); + end; + tyObject: begin + if not isPureObject(t) then begin + useMagic(m, 'TNimType'); + useMagic(m, 'TNimNode'); + genObjectInfo(m, t, ropef('NTI$1', [toRope(t.id)])); + end end + else begin end end - else begin end - end + end end end; +*) \ No newline at end of file diff --git a/nim/ccgutils.pas b/nim/ccgutils.pas index 05f2ea828..97ef65f70 100644 --- a/nim/ccgutils.pas +++ b/nim/ccgutils.pas @@ -27,16 +27,48 @@ function GetUniqueType(key: PType): PType; implementation var - gTypeTable: TIdTable; + gTypeTable: array [TTypeKind] of TIdTable; + +procedure initTypeTables(); +var + i: TTypeKind; +begin + for i := low(TTypeKind) to high(TTypeKind) do + InitIdTable(gTypeTable[i]); +end; function GetUniqueType(key: PType): PType; var t: PType; h: THash; + k: TTypeKind; begin - // this was a hotspot in the compiler! + // this is a hotspot in the compiler! result := key; if key = nil then exit; + k := key.kind; + case k of + tyObject, tyEnum: begin + result := PType(IdTableGet(gTypeTable[k], key)); + if result = nil then begin + IdTablePut(gTypeTable[k], key, key); + result := key; + end + end; + tyGenericInst: result := GetUniqueType(lastSon(key)); + tyProc: begin end; + else begin + // we have to do a slow linear search because types may need + // to be compared by their structure: + if IdTableHasObjectAsKey(gTypeTable[k], key) then exit; + for h := 0 to high(gTypeTable[k].data) do begin + t := PType(gTypeTable[k].data[h].key); + if (t <> nil) and sameType(t, key) then begin result := t; exit end + end; + IdTablePut(gTypeTable[k], key, key); + end; + end; + (* case key.Kind of tyEmpty, tyChar, tyBool, tyNil, tyPointer, tyString, tyCString, tyInt..tyFloat128, tyProc, tyAnyEnum: begin end; @@ -62,7 +94,7 @@ begin end end; tyGenericInst: result := GetUniqueType(lastSon(key)); - end; + end; *) end; function TableGetType(const tab: TIdTable; key: PType): PObject; @@ -122,6 +154,6 @@ begin app(result, toRope(res)); end; -initialization - InitIdTable(gTypeTable); +begin + InitTypeTables(); end. diff --git a/nim/cgen.pas b/nim/cgen.pas index 736d4b796..02713f902 100644 --- a/nim/cgen.pas +++ b/nim/cgen.pas @@ -73,7 +73,6 @@ type cpsStmts // section of local statements for C proc ); - TCProcSections = array [TCProcSection] of PRope; // TCProcSections represents a generated C proc @@ -112,21 +111,64 @@ type typeCache: TIdTable; // cache the generated types forwTypeCache: TIdTable; // cache for forward declarations of types declaredThings: TIntSet; // things we have declared in this .c file - debugDeclared: TIntSet; // for debugging purposes + declaredProtos: TIntSet; // prototypes we have declared in this .c file headerFiles: TLinkedList; // needed headers to include typeInfoMarker: TIntSet; // needed for generating type information initProc: BProc; // code for init procedure typeStack: TTypeSeq; // used for type generation dataCache: TNodeTable; + forwardedProcs: TSymSeq; // keep forwarded procs here typeNodes, nimTypes: int;// used for type info generation - typeNodesName, nimTypesName: PRope; // used for type info generation + typeNodesName, nimTypesName: PRope; // used for type info generation end; var mainModProcs, mainModInit: PRope; // parts of the main module gMapping: PRope; // the generated mapping file (if requested) gProcProfile: Natural; // proc profile counter + gGeneratedSyms: TIntSet; // set of ID's of generated symbols + gPendingModules: array of BModule = {@ignore} nil {@emit @[]}; + // list of modules that are not finished with code generation + gForwardedProcsCounter: int = 0; + gmti: BModule; // generated type info: no need to initialize: defaults fit + +procedure addForwardedProc(m: BModule; prc: PSym); +var + L: int; +begin + L := length(m.forwardedProcs); + setLength(m.forwardedProcs, L+1); + m.forwardedProcs[L] := prc; + inc(gForwardedProcsCounter); +end; + +procedure addPendingModule(m: BModule); +var + L, i: int; +begin + for i := 0 to high(gPendingModules) do + if gPendingModules[i] = m then + InternalError('module already pending: ' + m.module.name.s); + L := length(gPendingModules); + setLength(gPendingModules, L+1); + gPendingModules[L] := m; +end; +function findPendingModule(m: BModule; s: PSym): BModule; +var + ms: PSym; + i: int; +begin + ms := getModule(s); + if ms.id = m.module.id then begin + result := m; exit + end; + for i := 0 to high(gPendingModules) do begin + result := gPendingModules[i]; + if result.module.id = ms.id then exit; + end; + InternalError(s.info, 'no pending module found for: ' + s.name.s); +end; procedure initLoc(var result: TLoc; k: TLocKind; typ: PType; s: TStorageLoc); begin @@ -209,26 +251,13 @@ end; // -------------------------- Variable manager ---------------------------- -procedure declareGlobalVar(m: BModule; s: PSym); -begin - if not IntSetContainsOrIncl(m.declaredThings, s.id) then begin - app(m.s[cfsVars], getTypeDesc(m, s.loc.t)); - if sfRegister in s.flags then - app(m.s[cfsVars], ' register'); - if sfVolatile in s.flags then - app(m.s[cfsVars], ' volatile'); - if sfThreadVar in s.flags then - app(m.s[cfsVars], ' NIM_THREADVAR'); - appf(m.s[cfsVars], ' $1;$n', [s.loc.r]) - end -end; - procedure assignLocalVar(p: BProc; s: PSym); begin //assert(s.loc.k == locNone) // not yet assigned // this need not be fullfilled for inline procs; they are regenerated // for each module that uses them! - fillLoc(s.loc, locLocalVar, s.typ, mangleName(s), OnStack); + if s.loc.k = locNone then + fillLoc(s.loc, locLocalVar, s.typ, mangleName(s), OnStack); app(p.s[cpsLocals], getTypeDesc(p.module, s.loc.t)); if sfRegister in s.flags then app(p.s[cpsLocals], ' register'); @@ -248,11 +277,19 @@ end; procedure assignGlobalVar(m: BModule; s: PSym); begin - fillLoc(s.loc, locGlobalVar, s.typ, mangleName(s), OnHeap); + if s.loc.k = locNone then + fillLoc(s.loc, locGlobalVar, s.typ, mangleName(s), OnHeap); useHeader(m, s); if lfNoDecl in s.loc.flags then exit; if sfImportc in s.flags then app(m.s[cfsVars], 'extern '); - declareGlobalVar(m, s); + app(m.s[cfsVars], getTypeDesc(m, s.loc.t)); + if sfRegister in s.flags then + app(m.s[cfsVars], ' register'); + if sfVolatile in s.flags then + app(m.s[cfsVars], ' volatile'); + if sfThreadVar in s.flags then + app(m.s[cfsVars], ' NIM_THREADVAR'); + appf(m.s[cfsVars], ' $1;$n', [s.loc.r]); if [optStackTrace, optEndb] * m.module.options = [optStackTrace, optEndb] then begin useMagic(m, 'dbgRegisterGlobal'); @@ -282,6 +319,12 @@ begin end end; +procedure fillProcLoc(sym: PSym); +begin + if sym.loc.k = locNone then + fillLoc(sym.loc, locProc, sym.typ, mangleName(sym), OnStack); +end; + // -------------------------- label manager ------------------------------- // note that a label is a location too @@ -296,11 +339,11 @@ begin appf(p.s[cpsStmts], '$1: ;$n', [labl]) end; -procedure genProcPrototype(m: BModule; sym: PSym); forward; procedure genVarPrototype(m: BModule; sym: PSym); forward; procedure genConstPrototype(m: BModule; sym: PSym); forward; procedure genProc(m: BModule; prc: PSym); forward; procedure genStmts(p: BProc; t: PNode); forward; +procedure genProcPrototype(m: BModule; sym: PSym); forward; {$include 'ccgexprs.pas'} {$include 'ccgstmts.pas'} @@ -343,11 +386,11 @@ begin tmp := ropef('Dl_$1', [toRope(sym.id)]); sym.loc.r := tmp; // from now on we only need the internal name sym.typ.sym := nil; // generate a new name - appf(m.s[cfsDynLibInit], - '$1 = ($2) nimGetProcAddr($3, $4);$n', - [tmp, getTypeDesc(m, sym.typ), lib.name, - makeCString(ropeToStr(extname))]); - declareGlobalVar(m, sym) + appf(m.s[cfsDynLibInit], '$1 = ($2) nimGetProcAddr($3, $4);$n', + [tmp, getTypeDesc(m, sym.typ), lib.name, makeCString(ropeToStr(extname))]); + + app(m.s[cfsVars], getTypeDesc(m, sym.loc.t)); + appf(m.s[cfsVars], ' $1;$n', [sym.loc.r]); end; // ----------------------------- sections --------------------------------- @@ -356,16 +399,16 @@ procedure UseMagic(m: BModule; const name: string); var sym: PSym; begin - if (sfSystemModule in m.module.flags) then exit; - // we don't know the magic symbols in the system module, but they will be - // there anyway, because that is the way the code generator works sym := magicsys.getCompilerProc(name); - case sym.kind of - skProc, skConverter: genProcPrototype(m, sym); - skVar: genVarPrototype(m, sym); - skType: {@discard} getTypeDesc(m, sym.typ); - else InternalError('useMagic: ' + name) - end + if sym <> nil then + case sym.kind of + skProc, skConverter: genProc(m, sym); + skVar: genVarPrototype(m, sym); + skType: {@discard} getTypeDesc(m, sym.typ); + else InternalError('useMagic: ' + name) + end + else if not (sfSystemModule in m.module.flags) then + rawMessage(errSystemNeeds, name); // don't be too picky here end; procedure generateHeaders(m: BModule); @@ -405,95 +448,131 @@ begin result := (s.typ.sons[0] <> nil) and not isInvalidReturnType(s.typ.sons[0]) end; -procedure genProc(m: BModule; prc: PSym); +procedure genProcAux(m: BModule; prc: PSym); var p: BProc; generatedProc, header, returnStmt: PRope; - i, profileId: int; + i: int; res, param: PSym; begin - useHeader(m, prc); - fillLoc(prc.loc, locProc, prc.typ, mangleName(prc), OnStack); - if (lfNoDecl in prc.loc.Flags) then exit; - if lfDynamicLib in prc.loc.flags then - SymInDynamicLib(m, prc) - else if not (sfImportc in prc.flags) then begin - // we have a real proc here: - p := newProc(prc, m); - header := genProcHeader(m, prc); - if (sfCompilerProc in prc.flags) - and (sfSystemModule in m.module.flags) - and not IntSetContains(m.declaredThings, prc.id) then - appf(m.s[cfsProcHeaders], '$1;$n', [header]); - intSetIncl(m.declaredThings, prc.id); - returnStmt := nil; - assert(prc.ast <> nil); - - if not (sfPure in prc.flags) and (prc.typ.sons[0] <> nil) then begin - res := prc.ast.sons[resultPos].sym; // get result symbol - if not isInvalidReturnType(prc.typ.sons[0]) then begin - // declare the result symbol: - assignLocalVar(p, res); - assert(res.loc.r <> nil); - returnStmt := ropef('return $1;$n', [rdLoc(res.loc)]); - end - else begin - fillResult(res); - assignParam(p, res); - end; - initVariable(p, res); - genObjectInit(p, res.typ, res.loc, true); - end; - for i := 1 to sonsLen(prc.typ.n)-1 do begin - param := prc.typ.n.sons[i].sym; - assignParam(p, param) + p := newProc(prc, m); + header := genProcHeader(m, prc); + returnStmt := nil; + assert(prc.ast <> nil); + + if not (sfPure in prc.flags) and (prc.typ.sons[0] <> nil) then begin + res := prc.ast.sons[resultPos].sym; // get result symbol + if not isInvalidReturnType(prc.typ.sons[0]) then begin + // declare the result symbol: + assignLocalVar(p, res); + assert(res.loc.r <> nil); + returnStmt := ropef('return $1;$n', [rdLoc(res.loc)]); + end + else begin + fillResult(res); + assignParam(p, res); end; + initVariable(p, res); + genObjectInit(p, res.typ, res.loc, true); + end; + for i := 1 to sonsLen(prc.typ.n)-1 do begin + param := prc.typ.n.sons[i].sym; + assignParam(p, param) + end; - genStmts(p, prc.ast.sons[codePos]); // modifies p.locals, p.init, etc. - if sfPure in prc.flags then - generatedProc := ropef('$1 {$n$2$3$4}$n', - [header, p.s[cpsLocals], p.s[cpsInit], p.s[cpsStmts]]) - else begin - generatedProc := con(header, '{' + tnl); - if optStackTrace in prc.options then begin - getFrameDecl(p); - prepend(p.s[cpsInit], ropef( - 'F.procname = $1;$n' + - 'F.prev = framePtr;$n' + - 'F.filename = $2;$n' + - 'F.line = 0;$n' + - 'framePtr = (TFrame*)&F;$n', - [makeCString(prc.owner.name.s +{&} '.' +{&} prc.name.s), - makeCString(toFilename(prc.info))])); - end; - if optProfiler in prc.options then begin - if gProcProfile >= 64*1024 then // XXX: hard coded value! - InternalError(prc.info, 'too many procedures for profiling'); - useMagic(m, 'profileData'); - app(p.s[cpsLocals], 'ticks NIM_profilingStart;'+tnl); - if prc.loc.a < 0 then begin - appf(m.s[cfsDebugInit], 'profileData[$1].procname = $2;$n', - [toRope(gProcProfile), - makeCString(prc.owner.name.s +{&} '.' +{&} prc.name.s)]); - prc.loc.a := gProcProfile; - inc(gProcProfile); - end; - prepend(p.s[cpsInit], toRope('NIM_profilingStart = getticks();' + tnl)); + genStmts(p, prc.ast.sons[codePos]); // modifies p.locals, p.init, etc. + if sfPure in prc.flags then + generatedProc := ropef('$1 {$n$2$3$4}$n', + [header, p.s[cpsLocals], p.s[cpsInit], p.s[cpsStmts]]) + else begin + generatedProc := con(header, '{' + tnl); + if optStackTrace in prc.options then begin + getFrameDecl(p); + prepend(p.s[cpsInit], ropef( + 'F.procname = $1;$n' + + 'F.prev = framePtr;$n' + + 'F.filename = $2;$n' + + 'F.line = 0;$n' + + 'framePtr = (TFrame*)&F;$n', + [makeCString(prc.owner.name.s +{&} '.' +{&} prc.name.s), + makeCString(toFilename(prc.info))])); + end; + if optProfiler in prc.options then begin + if gProcProfile >= 64*1024 then // XXX: hard coded value! + InternalError(prc.info, 'too many procedures for profiling'); + useMagic(m, 'profileData'); + app(p.s[cpsLocals], 'ticks NIM_profilingStart;'+tnl); + if prc.loc.a < 0 then begin + appf(m.s[cfsDebugInit], 'profileData[$1].procname = $2;$n', + [toRope(gProcProfile), + makeCString(prc.owner.name.s +{&} '.' +{&} prc.name.s)]); + prc.loc.a := gProcProfile; + inc(gProcProfile); end; - app(generatedProc, con(p.s)); - if p.beforeRetNeeded then - app(generatedProc, 'BeforeRet: ;' + tnl); - if optStackTrace in prc.options then - app(generatedProc, 'framePtr = framePtr->prev;' + tnl); - if optProfiler in prc.options then - appf(generatedProc, - 'profileData[$1].total += elapsed(getticks(), NIM_profilingStart);$n', - [toRope(prc.loc.a)]); - app(generatedProc, returnStmt); - app(generatedProc, '}' + tnl); + prepend(p.s[cpsInit], toRope('NIM_profilingStart = getticks();' + tnl)); end; - app(m.s[cfsProcs], generatedProc); + app(generatedProc, con(p.s)); + if p.beforeRetNeeded then + app(generatedProc, 'BeforeRet: ;' + tnl); + if optStackTrace in prc.options then + app(generatedProc, 'framePtr = framePtr->prev;' + tnl); + if optProfiler in prc.options then + appf(generatedProc, + 'profileData[$1].total += elapsed(getticks(), NIM_profilingStart);$n', + [toRope(prc.loc.a)]); + app(generatedProc, returnStmt); + app(generatedProc, '}' + tnl); + end; + app(m.s[cfsProcs], generatedProc); +end; + +procedure genProcPrototype(m: BModule; sym: PSym); +begin + useHeader(m, sym); + if (lfNoDecl in sym.loc.Flags) then exit; + if lfDynamicLib in sym.loc.Flags then begin + if (sym.owner.id <> m.module.id) and + not intSetContainsOrIncl(m.declaredThings, sym.id) then begin + appf(m.s[cfsVars], 'extern $1 Dl_$2;$n', + [getTypeDesc(m, sym.loc.t), toRope(sym.id)]) + end + end + else begin + if not IntSetContainsOrIncl(m.declaredProtos, sym.id) then + appf(m.s[cfsProcHeaders], '$1;$n', [genProcHeader(m, sym)]); + end +end; + +procedure genProcNoForward(m: BModule; prc: PSym); +begin + fillProcLoc(prc); + useHeader(m, prc); + genProcPrototype(m, prc); + if (lfNoDecl in prc.loc.Flags) then exit; + if prc.typ.callConv = ccInline then begin + // We add inline procs to the calling module to enable C based inlining. + // This also means that a check with ``gGeneratedSyms`` is wrong, we need + // a check for ``m.declaredThings``. + if not intSetContainsOrIncl(m.declaredThings, prc.id) then + genProcAux(m, prc); end + else if lfDynamicLib in prc.loc.flags then begin + if not IntSetContainsOrIncl(gGeneratedSyms, prc.id) then + SymInDynamicLib(findPendingModule(m, prc), prc); + end + else if not (sfImportc in prc.flags) then begin + if not IntSetContainsOrIncl(gGeneratedSyms, prc.id) then + genProcAux(findPendingModule(m, prc), prc); + end +end; + +procedure genProc(m: BModule; prc: PSym); +begin + fillProcLoc(prc); + if [sfForward, sfFromGeneric] * prc.flags <> [] then + addForwardedProc(m, prc) + else + genProcNoForward(m, prc) end; procedure genVarPrototype(m: BModule; sym: PSym); @@ -522,7 +601,8 @@ end; procedure genConstPrototype(m: BModule; sym: PSym); begin useHeader(m, sym); - fillLoc(sym.loc, locData, sym.typ, mangleName(sym), OnUnknown); + if sym.loc.k = locNone then + fillLoc(sym.loc, locData, sym.typ, mangleName(sym), OnUnknown); if (lfNoDecl in sym.loc.Flags) or intSetContainsOrIncl(m.declaredThings, sym.id) then exit; @@ -535,32 +615,6 @@ begin end end; -procedure genProcPrototype(m: BModule; sym: PSym); -begin - useHeader(m, sym); - fillLoc(sym.loc, locProc, sym.typ, mangleName(sym), OnStack); - if lfDynamicLib in sym.loc.Flags then begin - // it is a proc variable! - if (sym.owner.id <> m.module.id) and - not intSetContainsOrIncl(m.declaredThings, sym.id) then begin - app(m.s[cfsVars], 'extern '); - // BUGFIX: declareGlobalVar() inlined, because of intSetContainsOrIncl - // check - app(m.s[cfsVars], getTypeDesc(m, sym.loc.t)); - appf(m.s[cfsVars], ' $1;$n', [sym.loc.r]) - end - end - else begin - // it is a proc: - if (lfNoDecl in sym.loc.Flags) then exit; - if intSetContainsOrIncl(m.declaredThings, sym.id) then exit; - appf(m.s[cfsProcHeaders], '$1;$n', [genProcHeader(m, sym)]); - if (sym.typ.callConv = ccInline) - and (sym.owner.id <> m.module.id) then - genProc(m, sym) // generate the code again! - end -end; - function getFileHeader(const cfilenoext: string): PRope; begin if optCompileOnly in gGlobalOptions then @@ -593,6 +647,7 @@ procedure genMainProc(m: BModule); const CommonMainBody = ' setStackBottom(dummy);$n' + + ' nim__datInit();$n' + ' systemInit();$n' + '$1' + '$2'; @@ -652,8 +707,7 @@ var initname: PRope; begin initname := getInitName(m); - appf(mainModProcs, 'N_NOINLINE(void, $1)(void);$n', - [initname]); + appf(mainModProcs, 'N_NOINLINE(void, $1)(void);$n', [initname]); if not (sfSystemModule in m.flags) then appf(mainModInit, '$1();$n', [initname]); end; @@ -669,14 +723,18 @@ begin {@discard} lists.IncludeStr(m.headerFiles, '<cycle.h>'); end; initname := getInitName(m.module); - registerModuleToMain(m.module); prc := ropef('N_NOINLINE(void, $1)(void) {$n', [initname]); - if m.typeNodes > 0 then + + if m.typeNodes > 0 then begin + useMagic(m, 'TNimNode'); appf(m.s[cfsTypeInit1], 'static TNimNode $1[$2];$n', - [m.typeNodesName, toRope(m.typeNodes)]); - if m.nimTypes > 0 then + [m.typeNodesName, toRope(m.typeNodes)]); + end; + if m.nimTypes > 0 then begin + useMagic(m, 'TNimType'); appf(m.s[cfsTypeInit1], 'static TNimType $1[$2];$n', [m.nimTypesName, toRope(m.nimTypes)]); + end; if optStackTrace in m.initProc.options then begin getFrameDecl(m.initProc); app(prc, m.initProc.s[cpsLocals]); @@ -716,7 +774,7 @@ begin for i := low(TCFileSection) to cfsProcs do app(result, m.s[i]) end; -function newModule(module: PSym; const filename: string): BModule; +function rawNewModule(module: PSym; const filename: string): BModule; begin new(result); {@ignore} @@ -724,7 +782,7 @@ begin {@emit} InitLinkedList(result.headerFiles); intSetInit(result.declaredThings); - intSetInit(result.debugDeclared); + intSetInit(result.declaredProtos); result.cfilename := filename; result.filename := filename; initIdTable(result.typeCache); @@ -735,12 +793,36 @@ begin result.initProc.options := gOptions; initNodeTable(result.dataCache); {@emit result.typeStack := @[];} +{@emit result.forwardedProcs := @[];} result.typeNodesName := getTempName(); result.nimTypesName := getTempName(); end; +function newModule(module: PSym; const filename: string): BModule; +begin + result := rawNewModule(module, filename); + if (optDeadCodeElim in gGlobalOptions) then begin + if (sfDeadCodeElim in module.flags) then + InternalError('added pending module twice: ' + filename); + addPendingModule(result) + end; +end; + +procedure registerTypeInfoModule(); +const + moduleName = 'nim__dat'; +var + s: PSym; +begin + s := NewSym(skModule, getIdent(moduleName), nil); + gmti := rawNewModule(s, joinPath(options.projectPath, moduleName)+'.nim'); + addPendingModule(gmti); + appf(mainModProcs, 'N_NOINLINE(void, $1)(void);$n', [getInitName(s)]); +end; + function myOpen(module: PSym; const filename: string): PPassContext; begin + if gmti = nil then registerTypeInfoModule(); result := newModule(module, filename); end; @@ -749,6 +831,7 @@ function myOpenCached(module: PSym; const filename: string; var cfile, cfilenoext, objFile: string; begin + if gmti = nil then registerTypeInfoModule(); //MessageOut('cgen.myOpenCached has been called ' + filename); cfile := changeFileExt(completeCFilePath(filename), cExt); cfilenoext := changeFileExt(cfile, ''); @@ -761,6 +844,8 @@ begin end; *) addFileToLink(cfilenoext); registerModuleToMain(module); + // XXX: this cannot be right here, initalization has to be appended during + // the ``myClose`` call result := nil; end; @@ -790,37 +875,80 @@ begin genStmts(m.initProc, n); end; -function myClose(b: PPassContext; n: PNode): PNode; +procedure finishModule(m: BModule); +var + i: int; + prc: PSym; +begin + i := 0; + while i <= high(m.forwardedProcs) do begin + // Note: ``genProc`` may add to ``m.forwardedProcs``, so we cannot use + // a for loop here + prc := m.forwardedProcs[i]; + if sfForward in prc.flags then InternalError(prc.info, 'still forwarded'); + genProcNoForward(m, prc); + inc(i); + end; + assert(gForwardedProcsCounter >= i); + dec(gForwardedProcsCounter, i); + setLength(m.forwardedProcs, 0); +end; + +procedure writeModule(m: BModule); var cfile, cfilenoext: string; - m: BModule; code: PRope; begin - result := n; - if b = nil then exit; - m := BModule(b); - if n <> nil then begin - m.initProc.options := gOptions; - genStmts(m.initProc, n); - end; // generate code for the init statements of the module: genInitCode(m); finishTypeDescriptions(m); + cfile := completeCFilePath(m.cfilename); cfilenoext := changeFileExt(cfile, ''); if sfMainModule in m.module.flags then begin // generate main file: app(m.s[cfsProcHeaders], mainModProcs); - genMainProc(m); end; code := genModule(m, cfilenoext); if shouldRecompile(code, changeFileExt(cfile, cExt), cfilenoext) then begin - addFileToCompile(cfilenoext); // is to compile + addFileToCompile(cfilenoext); end; addFileToLink(cfilenoext); if sfMainModule in m.module.flags then writeMapping(cfile, gMapping); end; +function myClose(b: PPassContext; n: PNode): PNode; +var + m: BModule; + i: int; +begin + result := n; + if b = nil then exit; + m := BModule(b); + if n <> nil then begin + m.initProc.options := gOptions; + genStmts(m.initProc, n); + end; + registerModuleToMain(m.module); + if not (optDeadCodeElim in gGlobalOptions) and + not (sfDeadCodeElim in m.module.flags) then + finishModule(m); + if sfMainModule in m.module.flags then begin + genMainProc(m); + // we need to process the transitive closure because recursive module + // deps are allowed (and the system module is processed in the wrong + // order anyway) + while gForwardedProcsCounter > 0 do + for i := 0 to high(gPendingModules) do + finishModule(gPendingModules[i]); + for i := 0 to high(gPendingModules) do writeModule(gPendingModules[i]); + setLength(gPendingModules, 0); + end; + if not (optDeadCodeElim in gGlobalOptions) and + not (sfDeadCodeElim in m.module.flags) then + writeModule(m); +end; + function cgenPass(): TPass; begin initPass(result); @@ -832,4 +960,5 @@ end; initialization InitIiTable(gToTypeInfoId); + IntSetInit(gGeneratedSyms); end. diff --git a/nim/commands.pas b/nim/commands.pas index be863e917..d87a8f084 100644 --- a/nim/commands.pas +++ b/nim/commands.pas @@ -39,14 +39,14 @@ const {$ifdef fpc} compileDate = {$I %date%}; {$else} - compileDate = '2008-0-0'; + compileDate = '2009-0-0'; {$endif} {@emit} const HelpMessage = 'Nimrod Compiler Version $1 (' +{&} compileDate +{&} ') [$2: $3]' +{&} nl +{&} - 'Copyright (c) 2004-2008 by Andreas Rumpf' +{&} nl; + 'Copyright (c) 2004-2009 by Andreas Rumpf' +{&} nl; const Usage = '' @@ -82,6 +82,7 @@ const +{&} ' --bound_checks:on|off code generation for bound checks ON|OFF' +{&} nl +{&} ' --overflow_checks:on|off code generation for over-/underflow checks ON|OFF' +{&} nl +{&} ' -a, --assertions:on|off code generation for assertions ON|OFF' +{&} nl ++{&} ' --dead_code_elim:on|off whole program dead code elimination ON|OFF' +{&} nl +{&} ' --opt:none|speed|size optimize not at all or for speed|size' +{&} nl +{&} ' --app:console|gui|lib generate a console|GUI application or a shared lib' +{&} nl +{&} ' -r, --run run the compiled program with given arguments' +{&} nl @@ -96,7 +97,7 @@ const // cog.outl(f(line)) //]]] +{&} 'Advanced commands::' +{&} nl -+{&} ' pas convert a Pascal file to Nimrod standard syntax' +{&} nl ++{&} ' pas convert a Pascal file to Nimrod syntax' +{&} nl +{&} ' pretty pretty print the inputfile' +{&} nl +{&} ' gen_depend generate a DOT file containing the' +{&} nl +{&} ' module dependency graph' +{&} nl @@ -135,8 +136,8 @@ const function getCommandLineDesc: string; begin - result := format(HelpMessage, [VersionAsString, platform.os[hostOS].name, - cpu[hostCPU].name]) +{&} Usage + result := format(HelpMessage, [VersionAsString, + platform.os[platform.hostOS].name, cpu[platform.hostCPU].name]) +{&} Usage end; var @@ -157,8 +158,10 @@ procedure writeAdvancedUsage(pass: TCmdLinePass); begin if (pass = passCmd1) and not advHelpWritten then begin // BUGFIX 19 - MessageOut(format(HelpMessage, [VersionAsString, platform.os[hostOS].name, - cpu[hostCPU].name]) +{&} AdvancedUsage); + MessageOut(format(HelpMessage, [VersionAsString, + platform.os[platform.hostOS].name, + cpu[platform.hostCPU].name]) +{&} + AdvancedUsage); advHelpWritten := true; helpWritten := true; halt(0); @@ -170,8 +173,9 @@ begin if (pass = passCmd1) and not versionWritten then begin versionWritten := true; helpWritten := true; - messageOut(format(HelpMessage, [VersionAsString, platform.os[hostOS].name, - cpu[hostCPU].name])) + messageOut(format(HelpMessage, [VersionAsString, + platform.os[platform.hostOS].name, + cpu[platform.hostCPU].name])) end end; @@ -388,6 +392,7 @@ begin wOverflowChecks: ProcessOnOffSwitch({@set}[optOverflowCheck], arg, pass, info); wLineDir: ProcessOnOffSwitch({@set}[optLineDir], arg, pass, info); wAssertions, wA: ProcessOnOffSwitch({@set}[optAssert], arg, pass, info); + wDeadCodeElim: ProcessOnOffSwitchG({@set}[optDeadCodeElim], arg, pass, info); wOpt: begin case whichKeyword(arg) of wSpeed: begin @@ -453,7 +458,7 @@ begin theOS := platform.NameToOS(arg); if theOS = osNone then liMessage(info, errUnknownOS, arg); - if theOS <> hostOS then begin + if theOS <> platform.hostOS then begin setTarget(theOS, targetCPU); include(gGlobalOptions, optCompileOnly); condsyms.InitDefines() @@ -465,7 +470,7 @@ begin cpu := platform.NameToCPU(arg); if cpu = cpuNone then liMessage(info, errUnknownCPU, arg); - if cpu <> hostCPU then begin + if cpu <> platform.hostCPU then begin setTarget(targetOS, cpu); include(gGlobalOptions, optCompileOnly); condsyms.InitDefines() diff --git a/nim/docgen.pas b/nim/docgen.pas index 19dc93a91..bd4613180 100644 --- a/nim/docgen.pas +++ b/nim/docgen.pas @@ -218,8 +218,6 @@ begin end; function nextSplitPoint(const s: string; start: int): int; -var - i: int; begin result := start; while result < length(s)+strStart do begin @@ -227,7 +225,7 @@ begin '_': exit; 'a'..'z': begin if result+1 < length(s)+strStart then - if s[result+1] in ['A'..'Z'] then exit; + if s[result+1] in ['A'..'Z'] then exit; end; else begin end; end; @@ -393,7 +391,8 @@ begin fillChar(r, sizeof(r), 0); {@emit} comm := genRecComment(d, n); // call this here for the side-effect! - initTokRender(r, n, {@set}[renderNoPragmas, renderNoBody]); + initTokRender(r, n, {@set}[renderNoPragmas, renderNoBody, renderNoComments, + renderDocComments]); while true do begin getNextTok(r, kind, literal); case kind of @@ -579,7 +578,7 @@ begin end; rnHyperlink: begin result := ropef('`$1 <$2>`_', [renderRstToRst(d, n.sons[0]), - renderRstToRst(d, n.sons[1])]); + renderRstToRst(d, n.sons[1])]); end; rnGeneralRole: begin result := renderRstToRst(d, n.sons[0]); @@ -661,21 +660,26 @@ begin result := ropef('<ul class="simple">$1</ul>', [result]); end; +function fieldAux(const s: string): PRope; +begin + result := toRope(strip(s)) +end; + function renderImage(d: PDoc; n: PRstNode): PRope; var s: string; begin result := ropef('<img src="$1"', [toRope(getArgument(n))]); s := getFieldValue(n, 'height'); - if s <> '' then appf(result, ' height="$1"', [toRope(s)]); + if s <> '' then appf(result, ' height="$1"', [fieldAux(s)]); s := getFieldValue(n, 'width'); - if s <> '' then appf(result, ' width="$1"', [toRope(s)]); + if s <> '' then appf(result, ' width="$1"', [fieldAux(s)]); s := getFieldValue(n, 'scale'); - if s <> '' then appf(result, ' scale="$1"', [toRope(s)]); + if s <> '' then appf(result, ' scale="$1"', [fieldAux(s)]); s := getFieldValue(n, 'alt'); - if s <> '' then appf(result, ' alt="$1"', [toRope(s)]); + if s <> '' then appf(result, ' alt="$1"', [fieldAux(s)]); s := getFieldValue(n, 'align'); - if s <> '' then appf(result, ' align="$1"', [toRope(s)]); + if s <> '' then appf(result, ' align="$1"', [fieldAux(s)]); app(result, ' />'); if rsonsLen(n) >= 3 then app(result, renderRstToHtml(d, n.sons[2])) end; @@ -863,15 +867,18 @@ begin nkConverterDef: genItem(d, n, n.sons[namePos], skConverter); nkVarSection: begin for i := 0 to sonsLen(n)-1 do - genItem(d, n.sons[i], n.sons[i].sons[0], skVar); + if n.sons[i].kind <> nkCommentStmt then + genItem(d, n.sons[i], n.sons[i].sons[0], skVar); end; nkConstSection: begin for i := 0 to sonsLen(n)-1 do - genItem(d, n.sons[i], n.sons[i].sons[0], skConst); + if n.sons[i].kind <> nkCommentStmt then + genItem(d, n.sons[i], n.sons[i].sons[0], skConst); end; nkTypeSection: begin for i := 0 to sonsLen(n)-1 do - genItem(d, n.sons[i], n.sons[i].sons[0], skType); + if n.sons[i].kind <> nkCommentStmt then + genItem(d, n.sons[i], n.sons[i].sons[0], skType); end; nkStmtList: begin for i := 0 to sonsLen(n)-1 do generateDoc(d, n.sons[i]); diff --git a/nim/ecmasgen.pas b/nim/ecmasgen.pas index d50be9b0c..c9dfcfe25 100644 --- a/nim/ecmasgen.pas +++ b/nim/ecmasgen.pas @@ -896,7 +896,8 @@ begin or (skipGeneric(y.typ).kind in [tyRef, tyPtr, tyVar]) end; -procedure genAsgnAux(var p: TProc; x, y: PNode; var r: TCompRes); +procedure genAsgnAux(var p: TProc; x, y: PNode; var r: TCompRes; + noCopyNeeded: bool); var a, b: TCompRes; begin @@ -906,7 +907,7 @@ begin etyObject: begin if a.com <> nil then appf(r.com, '$1;$n', [a.com]); if b.com <> nil then appf(r.com, '$1;$n', [b.com]); - if needsNoCopy(y) then + if needsNoCopy(y) or noCopyNeeded then appf(r.com, '$1 = $2;$n', [a.res, b.res]) else begin useMagic(p, 'NimCopy'); @@ -930,7 +931,13 @@ end; procedure genAsgn(var p: TProc; n: PNode; var r: TCompRes); begin genLineDir(p, n, r); - genAsgnAux(p, n.sons[0], n.sons[1], r); + genAsgnAux(p, n.sons[0], n.sons[1], r, false); +end; + +procedure genFastAsgn(var p: TProc; n: PNode; var r: TCompRes); +begin + genLineDir(p, n, r); + genAsgnAux(p, n.sons[0], n.sons[1], r, true); end; procedure genSwap(var p: TProc; n: PNode; var r: TCompRes); @@ -1692,6 +1699,7 @@ begin nkReturnStmt: genReturnStmt(p, n, r); nkBreakStmt: genBreakStmt(p, n, r); nkAsgn: genAsgn(p, n, r); + nkFastAsgn: genFastAsgn(p, n, r); nkDiscardStmt: begin genLineDir(p, n, r); gen(p, n.sons[0], r); diff --git a/nim/evals.pas b/nim/evals.pas index bb14f8be9..f9ca85c8f 100644 --- a/nim/evals.pas +++ b/nim/evals.pas @@ -28,7 +28,7 @@ type TStackFrame = record mapping: TIdNodeTable; // mapping from symbols to nodes prc: PSym; // current prc; proc that is evaluated - call: PNode; // current for stmt + call: PNode; next: PStackFrame; // for stacking params: TNodeSeq; // parameters passed to the proc end; @@ -127,7 +127,7 @@ begin inc(i) end; if (i < len) and (sonsLen(n.sons[i]) < 2) then // eval else-part - result := evalAux(c, n.sons[0]) + result := evalAux(c, n.sons[i].sons[0]) else result := emptyNode end; @@ -1227,7 +1227,7 @@ begin nkDerefExpr, nkHiddenDeref: result := evalDeref(c, n); nkAddr, nkHiddenAddr: result := evalAddr(c, n); nkHiddenStdConv, nkHiddenSubConv, nkConv: result := evalConv(c, n); - nkAsgn: result := evalAsgn(c, n); + nkAsgn, nkFastAsgn: result := evalAsgn(c, n); nkWhenStmt, nkIfStmt, nkIfExpr: result := evalIf(c, n); nkWhileStmt: result := evalWhile(c, n); nkCaseStmt: result := evalCase(c, n); @@ -1259,7 +1259,7 @@ begin nkTemplateDef, nkConstSection, nkIteratorDef, nkConverterDef, nkIncludeStmt, nkImportStmt, nkFromStmt: begin end; nkIdentDefs, nkCast, nkYieldStmt, nkAsmStmt, nkForStmt, nkPragmaExpr, - nkQualified, nkLambda, nkContinueStmt: + nkQualified, nkLambda, nkContinueStmt, nkIdent: stackTrace(c, n, errCannotInterpretNodeX, nodeKindToStr[n.kind]); else InternalError(n.info, 'evalAux: ' + nodekindToStr[n.kind]); end; diff --git a/nim/extccomp.pas b/nim/extccomp.pas index 5bc7011c1..51cf009d1 100644 --- a/nim/extccomp.pas +++ b/nim/extccomp.pas @@ -343,17 +343,11 @@ begin result := ccNone end; - -procedure addStr(var dest: string; const src: string); -begin - dest := dest +{&} src; -end; - procedure addOpt(var dest: string; const src: string); begin if (length(dest) = 0) or (dest[length(dest)-1+strStart] <> ' ') then - addStr(dest, ' '+''); - addStr(dest, src); + add(dest, ' '+''); + add(dest, src); end; procedure addCompileOption(const option: string); @@ -473,40 +467,52 @@ begin key := cc[c].name + '.exe'; if existsConfigVar(key) then exe := getConfigVar(key); + if targetOS = osWindows then exe := appendFileExt(exe, 'exe'); if (optGenDynLib in gGlobalOptions) and (ospNeedsPIC in platform.OS[targetOS].props) then - addStr(options, ' ' + cc[c].pic); + add(options, ' ' + cc[c].pic); - if targetOS = hostOS then begin + if targetOS = platform.hostOS then begin // compute include paths: includeCmd := cc[c].includeCmd; // this is more complex than needed, but // a workaround of a FPC bug... - addStr(includeCmd, libpath); - compilePattern := quoteIfSpaceExists(JoinPath(ccompilerpath, exe)); + add(includeCmd, quoteIfContainsWhite(libpath)); + compilePattern := JoinPath(ccompilerpath, exe); end else begin includeCmd := ''; compilePattern := cc[c].compilerExe end; - if targetOS = hostOS then + if targetOS = platform.hostOS then cfile := cfilename else cfile := extractFileName(cfilename); - if not isExternal or (targetOS <> hostOS) then + if not isExternal or (targetOS <> platform.hostOS) then objfile := toObjFile(cfile) else objfile := completeCFilePath(toObjFile(cfile)); - - result := format(compilePattern +{&} ' ' +{&} cc[c].compileTmpl, - ['file', AppendFileExt(cfile, cExt), + cfile := quoteIfContainsWhite(AppendFileExt(cfile, cExt)); + objfile := quoteIfContainsWhite(objfile); + + result := quoteIfContainsWhite(format(compilePattern, + ['file', cfile, 'objfile', objfile, 'options', options, 'include', includeCmd, 'nimrod', getPrefixDir(), 'lib', libpath - ]); + ])); + add(result, ' '); + add(result, format(cc[c].compileTmpl, + ['file', cfile, + 'objfile', objfile, + 'options', options, + 'include', includeCmd, + 'nimrod', quoteIfContainsWhite(getPrefixDir()), + 'lib', quoteIfContainsWhite(libpath) + ])); end; procedure CompileCFile(const list: TLinkedList; @@ -551,11 +557,12 @@ begin // call the linker: linkerExe := getConfigVar(cc[c].name + '.linkerexe'); if length(linkerExe) = 0 then linkerExe := cc[c].linkerExe; + if targetOS = osWindows then linkerExe := appendFileExt(linkerExe, 'exe'); - if (hostOS <> targetOS) then - linkCmd := linkerExe + if (platform.hostOS <> targetOS) then + linkCmd := quoteIfContainsWhite(linkerExe) else - linkCmd := quoteIfSpaceExists(JoinPath(ccompilerpath, linkerExe)); + linkCmd := quoteIfContainsWhite(JoinPath(ccompilerpath, linkerExe)); if optGenDynLib in gGlobalOptions then buildDll := cc[c].buildDll @@ -570,27 +577,29 @@ begin exefile := platform.os[targetOS].dllPrefix else exefile := ''; - if targetOS = hostOS then - addStr(exefile, projectFile) + if targetOS = platform.hostOS then + add(exefile, projectFile) else - addStr(exefile, extractFileName(projectFile)); + add(exefile, extractFileName(projectFile)); if optGenDynLib in gGlobalOptions then - addStr(exefile, platform.os[targetOS].dllExt) + add(exefile, platform.os[targetOS].dllExt) else - addStr(exefile, platform.os[targetOS].exeExt); + add(exefile, platform.os[targetOS].exeExt); + exefile := quoteIfContainsWhite(exefile); it := PStrEntry(toLink.head); objfiles := ''; while it <> nil do begin - addStr(objfiles, ' '+''); - if targetOS = hostOS then - addStr(objfiles, toObjfile(it.data)) + add(objfiles, ' '+''); + if targetOS = platform.hostOS then + add(objfiles, quoteIfContainsWhite(toObjfile(it.data))) else - addStr(objfiles, toObjfile(extractFileName(it.data))); + add(objfiles, quoteIfContainsWhite( + toObjfile(extractFileName(it.data)))); it := PStrEntry(it.next); end; - linkCmd := format(linkCmd +{&} ' ' +{&} cc[c].linkTmpl, [ + linkCmd := quoteIfContainsWhite(format(linkCmd, [ 'builddll', builddll, 'buildgui', buildgui, 'options', linkOptions, @@ -598,7 +607,18 @@ begin 'exefile', exefile, 'nimrod', getPrefixDir(), 'lib', libpath - ]); + ])); + add(linkCmd, ' '); + add(linkCmd, format(cc[c].linkTmpl, [ + 'builddll', builddll, + 'buildgui', buildgui, + 'options', linkOptions, + 'objfiles', objfiles, + 'exefile', exefile, + 'nimrod', quoteIfContainsWhite(getPrefixDir()), + 'lib', quoteIfContainsWhite(libpath) + ])); + if not (optCompileOnly in gGlobalOptions) then execExternalProgram(linkCmd); end // end if not noLinking diff --git a/nim/hashes.pas b/nim/hashes.pas index 1bd3c7d2a..0d7eb205d 100644 --- a/nim/hashes.pas +++ b/nim/hashes.pas @@ -61,7 +61,7 @@ begin result := x -{%} 1; // complicated, to make it a nop if sizeof(int) == 4, // because shifting more than 31 bits is undefined in C - result := result or (result shr ((sizeof(int)-4)* 32)); + result := result or (result shr ((sizeof(int)-4)* 8)); result := result or (result shr 16); result := result or (result shr 8); result := result or (result shr 4); diff --git a/nim/lexbase.pas b/nim/lexbase.pas index 11200f652..2b056c04f 100644 --- a/nim/lexbase.pas +++ b/nim/lexbase.pas @@ -64,7 +64,7 @@ function getCurrentLine(const L: TBaseLexer; marker: boolean = true): string; function getColNumber(const L: TBaseLexer; pos: int): int; function HandleCR(var L: TBaseLexer; pos: int): int; -// Call this if you scanned over CR in the buffer; it returns the the +// Call this if you scanned over CR in the buffer; it returns the // position to continue the scanning from. `pos` must be the position // of the CR. @@ -211,8 +211,7 @@ end; function getColNumber(const L: TBaseLexer; pos: int): int; begin - result := pos - L.lineStart; - assert(result >= 0); + result := abs(pos - L.lineStart); end; function getCurrentLine(const L: TBaseLexer; marker: boolean = true): string; diff --git a/nim/magicsys.pas b/nim/magicsys.pas index 55ec0b002..7a717e61d 100644 --- a/nim/magicsys.pas +++ b/nim/magicsys.pas @@ -96,9 +96,10 @@ begin result := StrTableGet(compilerprocs, ident); if result = nil then begin result := StrTableGet(rodCompilerProcs, ident); - if result = nil then rawMessage(errSystemNeeds, name); - strTableAdd(compilerprocs, result); - if result.kind = skStub then loadStub(result); + if result <> nil then begin + strTableAdd(compilerprocs, result); + if result.kind = skStub then loadStub(result); + end; // A bit hacky that this code is needed here, but it is the easiest // solution in order to avoid special cases for sfCompilerProc in the // rodgen module. Another solution would be to always recompile the system diff --git a/nim/msgs.pas b/nim/msgs.pas index d65a5a1e4..a91c328ef 100644 --- a/nim/msgs.pas +++ b/nim/msgs.pas @@ -173,7 +173,7 @@ type errSelectorMustBeOrdinal, errOrdXMustNotBeNegative, errLenXinvalid, - errWrongNumberOfLoopVariables, + errWrongNumberOfVariables, errExprCannotBeRaised, errBreakOnlyInLoop, errTypeXhasUnknownSize, @@ -431,7 +431,7 @@ const 'selector must be of an ordinal type', 'ord($1) must not be negative', 'len($1) must be less than 32768', - 'wrong number of loop variables', + 'wrong number of variables', 'only objects can be raised', '''break'' only allowed in loop construct', 'type ''$1'' has unknown size', diff --git a/nim/nimrod.pas b/nim/nimrod.pas index d197a3448..99d9a9d0f 100644 --- a/nim/nimrod.pas +++ b/nim/nimrod.pas @@ -93,7 +93,8 @@ begin } end; if optRun in gGlobalOptions then - execExternalProgram(changeFileExt(filename, '') +{&} ' ' +{&} arguments) + execExternalProgram(quoteIfContainsWhite(changeFileExt(filename, '')) +{&} + ' ' +{&} arguments) end end; diff --git a/nim/nos.pas b/nim/nos.pas index 002803b53..73b17ae58 100644 --- a/nim/nos.pas +++ b/nim/nos.pas @@ -35,9 +35,11 @@ const {$ifdef mswindows} dirsep = '\'; // seperator within paths altsep = '/'; + exeExt = 'exe'; {$else} dirsep = '/'; altsep = #0; // work around fpc bug + exeExt = ''; {$endif} pathSep = ';'; // seperator between paths sep = dirsep; // alternative name diff --git a/nim/nsystem.pas b/nim/nsystem.pas index c33236189..f476e09ca 100644 --- a/nim/nsystem.pas +++ b/nim/nsystem.pas @@ -149,8 +149,12 @@ function subU(a, b: biggestInt): biggestInt; function mulU(a, b: biggestInt): biggestInt; function divU(a, b: biggestInt): biggestInt; function modU(a, b: biggestInt): biggestInt; -function shlU(a, b: biggestInt): biggestInt; -function shrU(a, b: biggestInt): biggestInt; +function shlU(a, b: biggestInt): biggestInt; overload; +function shrU(a, b: biggestInt): biggestInt; overload; + +function shlU(a, b: Int32): Int32;overload; +function shrU(a, b: int32): int32;overload; + function ltU(a, b: biggestInt): bool; function leU(a, b: biggestInt): bool; @@ -281,6 +285,16 @@ begin result := biggestInt(biggestUInt(a) shr biggestUInt(b)); end; +function shlU(a, b: Int32): Int32; +begin + result := Int32(UInt32(a) shl UInt32(b)); +end; + +function shrU(a, b: int32): int32; +begin + result := Int32(UInt32(a) shr UInt32(b)); +end; + function ltU(a, b: biggestInt): bool; begin result := biggestUInt(a) < biggestUInt(b); diff --git a/nim/nversion.pas b/nim/nversion.pas index 9629079b2..7d179bb35 100644 --- a/nim/nversion.pas +++ b/nim/nversion.pas @@ -31,10 +31,10 @@ const //cog.outl('VersionMinor = %s;' % ver[1]) //cog.outl('VersionPatch = %s;' % ver[2]) //]]] - VersionAsString = '0.7.2'; + VersionAsString = '0.7.4'; VersionMajor = 0; VersionMinor = 7; - VersionPatch = 2; + VersionPatch = 4; //[[[[end]]]] implementation diff --git a/nim/optast.pas b/nim/optast.pas deleted file mode 100644 index 9f66a53db..000000000 --- a/nim/optast.pas +++ /dev/null @@ -1,34 +0,0 @@ -// -// -// The Nimrod Compiler -// (c) Copyright 2008 Andreas Rumpf -// -// See the file "copying.txt", included in this -// distribution, for details about the copyright. -// - -unit optast; - -// Optimizations that can be done by AST transformations. The code generators -// should work without the optimizer. The optimizer does the following: - -// - cross-module constant merging -// - cross-module generic merging -// - lowers set operations to bit operations -// - inlining of procs -// - ``s == ""`` --> ``len(s) == 0`` -// - optimization of ``&`` string operator - -interface - -{$include 'config.inc'} - -uses - nsystem, ast, astalgo, strutils, hashes, trees, treetab, platform, magicsys, - options, msgs, crc, idents, lists, types, ropes, nmath, wordrecg, rnimsyn; - -implementation - - -end. - diff --git a/nim/options.pas b/nim/options.pas index 9a9eaae36..5bbfbbbee 100644 --- a/nim/options.pas +++ b/nim/options.pas @@ -201,6 +201,12 @@ begin if startsWith(dir, prefix) then begin result := ncopy(dir, length(prefix) + strStart); exit end; + prefix := projectPath +{&} dirSep; + //writeln(output, prefix); + //writeln(output, dir); + if startsWith(dir, prefix) then begin + result := ncopy(dir, length(prefix) + strStart); exit + end; result := dir end; @@ -209,7 +215,7 @@ var head, tail: string; begin splitPath(path, head, tail); - result := joinPath([projectPath, genSubDir, shortenDir(head), + result := joinPath([projectPath, genSubDir, shortenDir(head +{&} dirSep), changeFileExt(tail, ext)]) end; @@ -219,9 +225,11 @@ var head, tail, subdir: string; begin splitPath(f, head, tail); - subdir := joinPath([projectPath, genSubDir, shortenDir(head)]); - if createSubDir then + subdir := joinPath([projectPath, genSubDir, shortenDir(head +{&} dirSep)]); + if createSubDir then begin + //Writeln(output, subdir); createDir(subdir); + end; result := joinPath(subdir, tail) end; diff --git a/nim/parseopt.pas b/nim/parseopt.pas index d543b998e..0ca87bd37 100644 --- a/nim/parseopt.pas +++ b/nim/parseopt.pas @@ -51,7 +51,7 @@ begin else begin result.cmd := ''; for i := 1 to ParamCount() do - result.cmd := result.cmd +{&} quoteIfSpaceExists(paramStr(i)) +{&} ' '; + result.cmd := result.cmd +{&} quoteIfContainsWhite(paramStr(i)) +{&} ' '; {@ignore} result.cmd := result.cmd + #0; {@emit} diff --git a/nim/passaux.pas b/nim/passaux.pas index 6344efb0b..8b052257f 100644 --- a/nim/passaux.pas +++ b/nim/passaux.pas @@ -14,7 +14,7 @@ unit passaux; interface uses - nsystem, strutils, ast, passes, msgs, options; + nsystem, strutils, ast, astalgo, passes, msgs, options; function verbosePass: TPass; function cleanupPass: TPass; @@ -50,6 +50,8 @@ var s: PSym; begin result := n; + // we cannot clean up if dead code elimination is activated + if (optDeadCodeElim in gGlobalOptions) then exit; case n.kind of nkStmtList: begin for i := 0 to sonsLen(n)-1 do {@discard} cleanup(c, n.sons[i]); @@ -57,7 +59,8 @@ begin nkProcDef: begin if (n.sons[namePos].kind = nkSym) then begin s := n.sons[namePos].sym; - if not astNeeded(s) then s.ast.sons[codePos] := nil; // free the memory + if not (sfDeadCodeElim in getModule(s).flags) and + not astNeeded(s) then s.ast.sons[codePos] := nil; // free the memory end end else begin end; diff --git a/nim/platform.pas b/nim/platform.pas index 1c021db86..8bf4f3d9b 100644 --- a/nim/platform.pas +++ b/nim/platform.pas @@ -23,7 +23,7 @@ uses type TSystemOS = ( - // Also add OS for in initialization section and alias conditionals to + // Also add OS in initialization section and alias conditionals to // condsyms (end of module). osNone, osDos, @@ -264,8 +264,8 @@ const curDir: '.'+''; exeExt: ''; extSep: '.'+''; - props: {@set}[ospNeedsPIC, ospPosix]; - ), + props: {@set}[ospNeedsPIC, ospPosix]; + ), ( name: 'PalmOS'; parDir: '..'; diff --git a/nim/pnimsyn.pas b/nim/pnimsyn.pas index 2cb34e708..95d6e64f9 100644 --- a/nim/pnimsyn.pas +++ b/nim/pnimsyn.pas @@ -9,7 +9,7 @@ unit pnimsyn; // This module implements the parser of the standard Nimrod representation. -// The parser is strictly reflects the grammar ("doc/grammar.txt"); however +// The parser strictly reflects the grammar ("doc/grammar.txt"); however // it uses several helper routines to keep the parser small. A special // efficient algorithm is used for the precedence levels. The parser here can // be seen as a refinement of the grammar, as it specifies how the AST is build @@ -98,15 +98,21 @@ end; // ---------------- parser helpers -------------------------------------------- +procedure parMessage(const p: TParser; const msg: TMsgKind; + const arg: string = ''); +begin + lexMessage(p.lex^, msg, arg); +end; + procedure skipComment(var p: TParser; node: PNode); begin if p.tok.tokType = tkComment then begin if node <> nil then begin if node.comment = snil then node.comment := ''; - node.comment := node.comment +{&} p.tok.literal; + add(node.comment, p.tok.literal); end else - assert(false); + parMessage(p, errInternal, 'skipComment'); getTok(p); end end; @@ -116,6 +122,11 @@ begin if p.tok.tokType = tkInd then getTok(p) end; +procedure optSad(var p: TParser); +begin + if p.tok.tokType = tkSad then getTok(p) +end; + procedure optInd(var p: TParser; n: PNode); begin skipComment(p, n); @@ -146,12 +157,6 @@ begin else lexMessage(p.lex^, errTokenExpected, TokTypeToStr[tokType]) end; -procedure parMessage(const p: TParser; const msg: TMsgKind; - const arg: string = ''); -begin - lexMessage(p.lex^, msg, arg); -end; - function parLineInfo(const p: TParser): TLineInfo; begin result := getLineInfo(p.lex^) @@ -385,7 +390,7 @@ begin result := newNodeP(nkExprEqExpr, p); addSon(result, a); getTok(p); - optInd(p, result); + //optInd(p, result); case p.tok.tokType of tkVar, tkRef, tkPtr, tkProc: addSon(result, parseTypeDescK(p)); @@ -413,21 +418,16 @@ begin addSon(result, first); getTok(p); optInd(p, result); - while true do begin - if p.tok.tokType = tkBracketRi then begin - getTok(p); break - end; - if p.tok.tokType = tkEof then begin - parMessage(p, errTokenExpected, TokTypeToStr[tkBracketRi]); break - end; + while (p.tok.tokType <> tkBracketRi) and (p.tok.tokType <> tkEof) + and (p.tok.tokType <> tkSad) do begin a := namedTypeOrExpr(p); - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; + optSad(p); + eat(p, tkBracketRi); end; function exprColonEqExpr(var p: TParser; kind: TNodeKind; @@ -439,7 +439,7 @@ begin if p.tok.tokType = tok then begin result := newNodeP(kind, p); getTok(p); - optInd(p, result); + //optInd(p, result); addSon(result, a); addSon(result, parseExpr(p)); end @@ -454,21 +454,14 @@ var begin getTok(p); optInd(p, result); - while true do begin - if p.tok.tokType = endTok then begin - getTok(p); break - end; - if p.tok.tokType = tkEof then begin - parMessage(p, errTokenExpected, TokTypeToStr[endtok]); break - end; + while (p.tok.tokType <> endTok) and (p.tok.tokType <> tkEof) do begin a := exprColonEqExpr(p, elemKind, sepTok); - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; + eat(p, endTok); end; function qualifiedIdent(var p: TParser): PNode; @@ -476,7 +469,7 @@ var a: PNode; begin result := parseSymbol(p); - optInd(p, result); + //optInd(p, result); if p.tok.tokType = tkDot then begin getTok(p); optInd(p, result); @@ -494,28 +487,41 @@ var begin getTok(p); optInd(p, result); - while true do begin - if p.tok.tokType = endTok then begin - getTok(p); break - end; - if p.tok.tokType = tkEof then begin - parMessage(p, errTokenExpected, TokTypeToStr[endtok]); break - end; + while (p.tok.tokType <> endTok) and (p.tok.tokType <> tkEof) do begin a := qualifiedIdent(p); - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; addSon(result, a); + //optInd(p, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) + end; + eat(p, endTok); +end; + +procedure exprColonEqExprListAux(var p: TParser; elemKind: TNodeKind; + endTok, sepTok: TTokType; result: PNode); +var + a: PNode; +begin + getTok(p); + optInd(p, result); + while (p.tok.tokType <> endTok) and (p.tok.tokType <> tkEof) + and (p.tok.tokType <> tkSad) do begin + a := exprColonEqExpr(p, elemKind, sepTok); + addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; + optSad(p); + eat(p, endTok); end; function exprColonEqExprList(var p: TParser; kind, elemKind: TNodeKind; endTok, sepTok: TTokType): PNode; begin result := newNodeP(kind, p); - exprListAux(p, elemKind, endTok, sepTok, result); + exprColonEqExprListAux(p, elemKind, endTok, sepTok, result); end; function parseCast(var p: TParser): PNode; @@ -525,12 +531,12 @@ begin eat(p, tkBracketLe); optInd(p, result); addSon(result, parseTypeDesc(p)); - optInd(p, result); + optSad(p); eat(p, tkBracketRi); eat(p, tkParLe); optInd(p, result); addSon(result, parseExpr(p)); - optInd(p, result); + optSad(p); eat(p, tkParRi); end; @@ -541,7 +547,7 @@ begin eat(p, tkParLe); optInd(p, result); addSon(result, parseExpr(p)); - optInd(p, result); + optSad(p); eat(p, tkParRi); end; @@ -667,7 +673,7 @@ begin a := result; result := newNodeP(nkCall, p); addSon(result, a); - exprListAux(p, nkExprEqExpr, tkParRi, tkEquals, result); + exprColonEqExprListAux(p, nkExprEqExpr, tkParRi, tkEquals, result); end; tkDot: begin a := result; @@ -709,8 +715,9 @@ begin opNode := newIdentNodeP(op.ident, p); // skip operator: getTok(p); - skipComment(p, opNode); - skipInd(p); + //skipComment(p, opNode); + //skipInd(p); + optInd(p, opNode); // read sub-expression with higher priority nextop := lowestExprAux(p, v2, opPred); @@ -739,12 +746,12 @@ begin while true do begin getTok(p); // skip `if`, `elif` branch := newNodeP(nkElifExpr, p); - optInd(p, branch); + //optInd(p, branch); addSon(branch, parseExpr(p)); eat(p, tkColon); - optInd(p, branch); + //optInd(p, branch); addSon(branch, parseExpr(p)); - optInd(p, branch); + //optInd(p, branch); addSon(result, branch); if p.tok.tokType <> tkElif then break end; @@ -770,31 +777,33 @@ var begin result := newNodeP(nkPragma, p); getTok(p); - while true do begin - skipComment(p, result); - skipInd(p); - case p.tok.TokType of - tkCurlyDotRi, tkCurlyRi: begin - getTok(p); // skip } or .} - break - end; - tkEof: begin - parMessage(p, errTokenExpected, '.}'); - break - end - else begin - a := exprColonEqExpr(p, nkExprColonExpr, tkColon); - addSon(result, a); - if p.tok.tokType = tkComma then begin - getTok(p); - skipComment(p, a) - end - end + optInd(p, result); + while (p.tok.tokType <> tkCurlyDotRi) and (p.tok.tokType <> tkCurlyRi) + and (p.tok.tokType <> tkEof) and (p.tok.tokType <> tkSad) do begin + a := exprColonEqExpr(p, nkExprColonExpr, tkColon); + addSon(result, a); + if p.tok.tokType = tkComma then begin + getTok(p); + optInd(p, a) end - end + end; + optSad(p); + if (p.tok.tokType = tkCurlyDotRi) or (p.tok.tokType = tkCurlyRi) then + getTok(p) + else + parMessage(p, errTokenExpected, '.}'); end; // ---------------------- statement parser ------------------------------------ +function isExprStart(const p: TParser): bool; +begin + case p.tok.tokType of + tkSymbol, tkAccent, tkOpr, tkNot, tkNil, tkCast, tkIf, tkLambda, + tkParLe, tkBracketLe, tkCurlyLe, tkIntLit..tkCharLit: result := true; + else result := false; + end; +end; + function parseExprStmt(var p: TParser): PNode; var a, b, e: PNode; @@ -813,16 +822,16 @@ begin result.info := a.info; addSon(result, a); while true do begin - case p.tok.tokType of + (*case p.tok.tokType of tkColon, tkInd, tkSad, tkDed, tkEof, tkComment: break; else begin end - end; + end;*) + if not isExprStart(p) then break; e := parseExpr(p); - if p.tok.tokType = tkComma then begin - getTok(p); - skipComment(p, e) - end; addSon(result, e); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a); end; if sonsLen(result) <= 1 then result := a else a := result; @@ -897,7 +906,7 @@ begin break end; end; - optInd(p, a); + //optInd(p, a); if p.tok.tokType = tkAs then begin getTok(p); optInd(p, a); @@ -906,11 +915,10 @@ begin addSon(a, b); addSon(a, parseSymbol(p)); end; - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; end; @@ -942,12 +950,11 @@ begin break end; end; - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; addSon(result, a); + //optInd(p, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; end; @@ -977,7 +984,7 @@ begin end end; addSon(result, a); - optInd(p, a); + //optInd(p, a); eat(p, tkImport); optInd(p, result); while true do begin @@ -989,12 +996,11 @@ begin break end; end; - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; + //optInd(p, a); addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; end; @@ -1074,6 +1080,7 @@ begin result := newNodeP(nkCaseStmt, p); getTok(p); addSon(result, parseExpr(p)); + if p.tok.tokType = tkColon then getTok(p); skipComment(p, result); inElif := false; while true do begin @@ -1145,22 +1152,15 @@ begin result := newNodeP(nkForStmt, p); getTok(p); optInd(p, result); - while true do begin - if p.tok.tokType = tkIn then begin - getTok(p); break - end; - if p.tok.tokType = tkEof then begin - parMessage(p, errTokenExpected, TokTypeToStr[tkIn]); break - end; - - a := parseSymbol(p); - if a = nil then break; + a := parseSymbol(p); + addSon(result, a); + while p.tok.tokType = tkComma do begin + getTok(p); optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); optInd(p, a) - end; - addSon(result, a); + a := parseSymbol(p); + addSon(result, a); end; + eat(p, tkIn); addSon(result, exprColonEqExpr(p, nkRange, tkDotDot)); eat(p, tkColon); skipComment(p, result); @@ -1246,12 +1246,11 @@ begin if a = nil then exit; end end; - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); - optInd(p, a) - end; addSon(result, a); + //optInd(p, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; if p.tok.tokType = tkColon then begin getTok(p); optInd(p, result); @@ -1282,15 +1281,17 @@ begin while true do begin case p.tok.tokType of tkSymbol, tkAccent: a := parseIdentColonEquals(p, false); - tkParRi: begin getTok(p); break end; + tkParRi: break; else begin parMessage(p, errTokenExpected, ')'+''); break; end; end; - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); optInd(p, a) - end; + //optInd(p, a); addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; + optSad(p); + eat(p, tkParRi); end; if p.tok.tokType = tkColon then begin getTok(p); @@ -1336,18 +1337,15 @@ begin getTok(p); eat(p, tkBracketLe); optInd(p, result); - while true do begin - case p.tok.tokType of - tkSymbol, tkAccent: a := parseIdentColonEquals(p, false); - tkBracketRi: begin getTok(p); break end; - else begin parMessage(p, errTokenExpected, ']'+''); break; end; - end; - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); optInd(p, a) - end; - addSon(result, a); + while (p.tok.tokType = tkSymbol) or (p.tok.tokType = tkAccent) do begin + a := parseIdentColonEquals(p, false); + addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; + optSad(p); + eat(p, tkBracketRi); end; else begin InternalError(parLineInfo(p), 'pnimsyn.parseTypeDescK'); @@ -1389,18 +1387,15 @@ begin result := newNodeP(nkGenericParams, p); getTok(p); optInd(p, result); - while true do begin - case p.tok.tokType of - tkSymbol, tkAccent: a := parseGenericParam(p); - tkBracketRi: begin getTok(p); break end; - else begin parMessage(p, errTokenExpected, ']'+''); break; end; - end; - optInd(p, a); - if p.tok.tokType = tkComma then begin - getTok(p); optInd(p, a) - end; + while (p.tok.tokType = tkSymbol) or (p.tok.tokType = tkAccent) do begin + a := parseGenericParam(p); addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) end; + optSad(p); + eat(p, tkBracketRi); end; function parseRoutine(var p: TParser; kind: TNodeKind): PNode; @@ -1484,7 +1479,8 @@ begin break end end - end + end; + popInd(p.lex^); end; tkSymbol, tkAccent: addSon(result, defparser(p)); else parMessage(p, errIdentifierExpected, tokToStr(p.tok)); @@ -1628,7 +1624,8 @@ begin break end end - end + end; + popInd(p.lex^); end; tkWhen: result := parseRecordWhen(p); tkCase: result := parseRecordCase(p); @@ -1688,9 +1685,34 @@ begin indAndComment(p, result); // special extension! end; +function parseVarTuple(var p: TParser): PNode; +var + a: PNode; +begin + result := newNodeP(nkVarTuple, p); + getTok(p); // skip '(' + optInd(p, result); + while (p.tok.tokType = tkSymbol) or (p.tok.tokType = tkAccent) do begin + a := identWithPragma(p); + addSon(result, a); + if p.tok.tokType <> tkComma then break; + getTok(p); + optInd(p, a) + end; + addSon(result, nil); // no type desc + optSad(p); + eat(p, tkParRi); + eat(p, tkEquals); + optInd(p, result); + addSon(result, parseExpr(p)); +end; + function parseVariable(var p: TParser): PNode; begin - result := parseIdentColonEquals(p, true); + if p.tok.tokType = tkParLe then + result := parseVarTuple(p) + else + result := parseIdentColonEquals(p, true); indAndComment(p, result); // special extension! end; @@ -1708,10 +1730,15 @@ begin tkFrom: result := parseFromStmt(p); tkInclude: result := parseIncludeStmt(p); tkComment: result := newCommentStmt(p); - //tkSad, tkInd, tkDed: assert(false); - else result := parseExprStmt(p) + else begin + if isExprStart(p) then + result := parseExprStmt(p) + else + result := nil; + end end; - skipComment(p, result); + if result <> nil then + skipComment(p, result); end; function complexOrSimpleStmt(var p: TParser): PNode; @@ -1738,6 +1765,8 @@ begin end; function parseStmt(var p: TParser): PNode; +var + a: PNode; begin if p.tok.tokType = tkInd then begin result := newNodeP(nkStmtList, p); @@ -1748,9 +1777,14 @@ begin tkSad: getTok(p); tkEof: break; tkDed: begin getTok(p); break end; - else addSon(result, complexOrSimpleStmt(p)); - end; - end + else begin + a := complexOrSimpleStmt(p); + if a = nil then break; + addSon(result, a); + end + end + end; + popInd(p.lex^); end else begin // the case statement is only needed for better error messages: @@ -1762,7 +1796,7 @@ begin end else begin result := simpleStmt(p); - skipComment(p, result); + if result = nil then parMessage(p, errExprExpected, tokToStr(p.tok)); if p.tok.tokType = tkSad then getTok(p); end end @@ -1770,6 +1804,8 @@ begin end; function parseModule(var p: TParser): PNode; +var + a: PNode; begin result := newNodeP(nkStmtList, p); while true do begin @@ -1777,7 +1813,11 @@ begin tkSad: getTok(p); tkDed, tkInd: parMessage(p, errInvalidIndentation); tkEof: break; - else addSon(result, complexOrSimpleStmt(p)); + else begin + a := complexOrSimpleStmt(p); + if a = nil then parMessage(p, errExprExpected, tokToStr(p.tok)); + addSon(result, a); + end end end end; @@ -1795,6 +1835,7 @@ begin tkEof: break; else begin result := complexOrSimpleStmt(p); + if result = nil then parMessage(p, errExprExpected, tokToStr(p.tok)); break end end diff --git a/nim/pragmas.pas b/nim/pragmas.pas index 68bc366f1..636a1198a 100644 --- a/nim/pragmas.pas +++ b/nim/pragmas.pas @@ -135,8 +135,8 @@ var v: string; m: TMagic; begin - if not (sfSystemModule in c.module.flags) then - liMessage(n.info, errMagicOnlyInSystem); + //if not (sfSystemModule in c.module.flags) then + // liMessage(n.info, errMagicOnlyInSystem); if n.kind <> nkExprColonExpr then liMessage(n.info, errStringLiteralExpected); if n.sons[1].kind = nkIdent then v := n.sons[1].ident.s @@ -172,6 +172,19 @@ begin liMessage(n.info, errOnOrOffExpected) end; +procedure pragmaDeadCodeElim(c: PContext; n: PNode); +begin + if (n.kind = nkExprColonExpr) and (n.sons[1].kind = nkIdent) then begin + case whichKeyword(n.sons[1].ident) of + wOn: include(c.module.flags, sfDeadCodeElim); + wOff: exclude(c.module.flags, sfDeadCodeElim); + else liMessage(n.info, errOnOrOffExpected) + end + end + else + liMessage(n.info, errOnOrOffExpected) +end; + procedure processCallConv(c: PContext; n: PNode); var sw: TSpecialWord; @@ -466,6 +479,7 @@ begin wVolatile: begin noVal(it); Include(sym.flags, sfVolatile); end; wRegister: begin noVal(it); include(sym.flags, sfRegister); end; wThreadVar: begin noVal(it); include(sym.flags, sfThreadVar); end; + wDeadCodeElim: pragmaDeadCodeElim(c, it); wMagic: processMagic(c, it, sym); wCompileTime: begin noVal(it); @@ -612,7 +626,7 @@ begin wHint, wWarning, wError, wFatal, wDefine, wUndef, wCompile, wLink, wLinkSys, wPure, wPush, wPop, wFixupSystem, wBreakpoint, wCheckpoint, - wPassL, wPassC]); + wPassL, wPassC, wDeadCodeElim]); end; procedure pragmaLambda(c: PContext; s: PSym; n: PNode); diff --git a/nim/rnimsyn.pas b/nim/rnimsyn.pas index 6b8e3b3cb..6cb78efcf 100644 --- a/nim/rnimsyn.pas +++ b/nim/rnimsyn.pas @@ -21,7 +21,7 @@ uses type TRenderFlag = (renderNone, renderNoBody, renderNoComments, - renderNoPragmas, renderIds); + renderDocComments, renderNoPragmas, renderIds); TRenderFlags = set of TRenderFlag; TRenderTok = record @@ -354,12 +354,20 @@ end; const Space = ' '+''; +function shouldRenderComment(var g: TSrcGen; n: PNode): bool; +begin + result := false; + if n.comment <> snil then + result := not (renderNoComments in g.flags) or + (renderDocComments in g.flags) and startsWith(n.comment, '##'); +end; + procedure gcom(var g: TSrcGen; n: PNode); var ml: int; begin assert(n <> nil); - if (n.comment <> snil) and not (renderNoComments in g.flags) then begin + if shouldRenderComment(g, n) then begin if (g.pendingNL < 0) and (length(g.buf) > 0) and (g.buf[length(g.buf)] <> ' ') then put(g, tkSpaces, Space); @@ -488,7 +496,7 @@ begin nkAddr: result := lsub(n.sons[0])+length('addr()'); nkHiddenAddr, nkHiddenDeref: result := lsub(n.sons[0]); nkCommand: result := lsub(n.sons[0])+lcomma(n, 1)+1; - nkExprEqExpr, nkDefaultTypeParam, nkAsgn: result := lsons(n)+3; + nkExprEqExpr, nkDefaultTypeParam, nkAsgn, nkFastAsgn: result := lsons(n)+3; nkPar, nkCurly, nkBracket: result := lcomma(n)+2; nkTupleTy: result := lcomma(n)+length('tuple[]'); nkQualified, nkDotExpr: result := lsons(n)+1; @@ -502,11 +510,12 @@ begin if n.sons[L-1] <> nil then result := result + lsub(n.sons[L-1]) + 3; end; + nkVarTuple: result := lcomma(n, 0, -3) + length('() = ') + lsub(lastSon(n)); nkChckRangeF: result := length('chckRangeF') + 2 + lcomma(n); nkChckRange64: result := length('chckRange64') + 2 + lcomma(n); nkChckRange: result := length('chckRange') + 2 + lcomma(n); - - nkObjDownConv, nkObjUpConv, + + nkObjDownConv, nkObjUpConv, nkStringToCString, nkCStringToString, nkPassAsOpenArray: begin result := 2; if sonsLen(n) >= 1 then @@ -981,7 +990,7 @@ begin put(g, tkSpaces, space); gcomma(g, n, 1); end; - nkExprEqExpr, nkDefaultTypeParam, nkAsgn: begin + nkExprEqExpr, nkDefaultTypeParam, nkAsgn, nkFastAsgn: begin gsub(g, n.sons[0]); put(g, tkSpaces, Space); putWithSpace(g, tkEquals, '='+''); @@ -997,7 +1006,7 @@ begin put(g, tkSymbol, 'chckRange64'); put(g, tkParLe, '('+''); gcomma(g, n); - put(g, tkParRi, ')'+''); + put(g, tkParRi, ')'+''); end; nkChckRange: begin put(g, tkSymbol, 'chckRange'); @@ -1005,13 +1014,13 @@ begin gcomma(g, n); put(g, tkParRi, ')'+''); end; - nkObjDownConv, nkObjUpConv, + nkObjDownConv, nkObjUpConv, nkStringToCString, nkCStringToString, nkPassAsOpenArray: begin if sonsLen(n) >= 1 then gsub(g, n.sons[0]); put(g, tkParLe, '('+''); gcomma(g, n, 1); - put(g, tkParRi, ')'+''); + put(g, tkParRi, ')'+''); end; nkPar: begin put(g, tkParLe, '('+''); @@ -1056,6 +1065,14 @@ begin gsub(g, n.sons[L-1], c) end; end; + nkVarTuple: begin + put(g, tkParLe, '('+''); + gcomma(g, n, 0, -3); + put(g, tkParRi, ')'+''); + put(g, tkSpaces, Space); + putWithSpace(g, tkEquals, '='+''); + gsub(g, lastSon(n), c); + end; nkExprColonExpr: begin gsub(g, n.sons[0]); putWithSpace(g, tkColon, ':'+''); @@ -1362,11 +1379,11 @@ begin nkTupleTy: begin put(g, tkTuple, 'tuple'); put(g, tkBracketLe, '['+''); - assert(n.sons[0].kind = nkIdentDefs); gcomma(g, n); put(g, tkBracketRi, ']'+''); end; else begin + //nkNone, nkMetaNode, nkTableConstr, nkExplicitTypeListCall: begin InternalError(n.info, 'rnimsyn.gsub(' +{&} nodeKindToStr[n.kind] +{&} ')') end end diff --git a/nim/rodwrite.pas b/nim/rodwrite.pas index 64f3d6733..637f69ff7 100644 --- a/nim/rodwrite.pas +++ b/nim/rodwrite.pas @@ -503,7 +503,7 @@ end; function process(c: PPassContext; n: PNode): PNode; var - i, j: int; + i: int; w: PRodWriter; a: PNode; s: PSym; diff --git a/nim/ropes.pas b/nim/ropes.pas index e82f1e96d..a6ba2a11b 100644 --- a/nim/ropes.pas +++ b/nim/ropes.pas @@ -14,7 +14,7 @@ unit ropes; efficiently; especially concatenation is done in O(1) instead of O(N). Ropes make use a lazy evaluation: They are essentially concatenation trees that are only flattened when converting to a native Nimrod - string or when written to disk. The empty string is represented with a + string or when written to disk. The empty string is represented by a nil pointer. A little picture makes everything clear: @@ -541,7 +541,6 @@ begin if (r.data <> snil) then begin if r.len > bufSize then // A token bigger than 1 KB? - This cannot happen in reality. - // Well, at least I hope so. 1 KB did happen! internalError('ropes: token too long'); readBytes := readBuffer(bin, buf, r.len); result := (readBytes = r.len) // BUGFIX diff --git a/nim/rst.pas b/nim/rst.pas index cc92e41eb..55c2c933a 100644 --- a/nim/rst.pas +++ b/nim/rst.pas @@ -494,7 +494,13 @@ begin if n.kind = rnLeaf then begin for i := strStart to length(n.text)+strStart-1 do begin case n.text[i] of - 'a'..'z', '0'..'9': begin + '0'..'9': begin + if b then begin addChar(r, '-'); b := false; end; + // BUGFIX: HTML id's cannot start with a digit + if length(r) = 0 then addChar(r, 'Z'); + addChar(r, n.text[i]) + end; + 'a'..'z': begin if b then begin addChar(r, '-'); b := false; end; addChar(r, n.text[i]) end; @@ -1235,7 +1241,7 @@ begin result := nil; if (p.tok[p.idx].kind = tkIndent) and (p.tok[p.idx+1].symbol = ':'+'') then begin - col := p.tok[p.idx].col; + col := p.tok[p.idx].ival; // BUGFIX! result := newRstNode(rnFieldList); inc(p.idx); while true do begin @@ -1252,10 +1258,10 @@ var i: int; f: PRstNode; begin - assert(n.kind = rnDirective); result := ''; if n.sons[1] = nil then exit; - assert(n.sons[1].kind = rnFieldList); + if (n.sons[1].kind <> rnFieldList) then + InternalError('getFieldValue (2): ' + rstnodeKindToStr[n.sons[1].kind]); for i := 0 to rsonsLen(n.sons[1])-1 do begin f := n.sons[1].sons[i]; if cmpIgnoreStyle(addNodes(f.sons[0]), fieldname) = 0 then begin diff --git a/nim/scanner.pas b/nim/scanner.pas index 83f5c12b0..a78f9c6ce 100644 --- a/nim/scanner.pas +++ b/nim/scanner.pas @@ -21,9 +21,8 @@ interface {$include 'config.inc'} uses - charsets, nsystem, sysutils, - hashes, options, msgs, strutils, platform, idents, - lexbase, llstream, wordrecg; + charsets, nsystem, sysutils, hashes, options, msgs, strutils, platform, + idents, lexbase, llstream, wordrecg; const MaxLineLength = 80; // lines longer than this lead to a warning @@ -31,7 +30,7 @@ const numChars: TCharSet = ['0'..'9','a'..'z','A'..'Z']; SymChars: TCharSet = ['a'..'z', 'A'..'Z', '0'..'9', #128..#255]; SymStartChars: TCharSet = ['a'..'z', 'A'..'Z', #128..#255]; - OpChars: TCharSet = ['+', '-', '*', '/', '<', '>', '!', '?', '^', '.', + OpChars: TCharSet = ['+', '-', '*', '/', '\', '<', '>', '!', '?', '^', '.', '|', '=', '%', '&', '$', '@', '~', #128..#255]; type @@ -162,6 +161,8 @@ var gLinesCompiled: int; // all lines that have been compiled procedure pushInd(var L: TLexer; indent: int); +procedure popInd(var L: TLexer); + function isKeyword(kind: TTokType): boolean; procedure openLexer(out lex: TLexer; const filename: string; @@ -206,6 +207,14 @@ begin //writeln('push indent ', indent); end; +procedure popInd(var L: TLexer); +var + len: int; +begin + len := length(L.indentStack); + setLength(L.indentStack, len-1); +end; + function findIdent(const L: TLexer; indent: int): boolean; var i: int; @@ -809,13 +818,11 @@ begin end; dec(L.dedent); tok.tokType := tkDed; - if i >= 0 then - setLength(L.indentStack, i+1) // pop indentations - else begin + if i < 0 then begin tok.tokType := tkSad; // for the parser it is better as SAD lexMessage(L, errInvalidIndentation); end - end; + end end; procedure scanComment(var L: TLexer; var tok: TToken); diff --git a/nim/sem.pas b/nim/sem.pas index 59bf29be5..6d97da3e8 100644 --- a/nim/sem.pas +++ b/nim/sem.pas @@ -83,9 +83,32 @@ begin result := nil; exit end; result := getConstExpr(c.module, e); + if result = nil then + liMessage(n.info, errConstExprExpected); +end; + +function semAndEvalConstExpr(c: PContext; n: PNode): PNode; +var + e: PNode; + p: PEvalContext; + s: PStackFrame; +begin + e := semExprWithType(c, n); + if e = nil then begin + liMessage(n.info, errConstExprExpected); + result := nil; exit + end; + result := getConstExpr(c.module, e); if result = nil then begin //writeln(output, renderTree(n)); - liMessage(n.info, errConstExprExpected); + p := newEvalContext(c.module, ''); + s := newStackFrame(); + s.call := e; + pushStackFrame(p, s); + result := eval(p, e); + popStackFrame(p); + if (result = nil) or (result.kind = nkEmpty) then + liMessage(n.info, errConstExprExpected); end end; diff --git a/nim/semdata.pas b/nim/semdata.pas index f920fae2a..9ffd41eac 100644 --- a/nim/semdata.pas +++ b/nim/semdata.pas @@ -43,6 +43,7 @@ type PContext = ^TContext; TContext = object(TPassContext) // a context represents a module module: PSym; // the module sym belonging to the context + filename: string; // the module's filename tab: TSymTab; // each module has its own symbol table AmbigiousSymbols: TIntSet; // contains ids of all ambigious symbols (cannot // store this info in the syms themselves!) @@ -160,6 +161,7 @@ begin result.module := module; result.generics := newNode(nkStmtList); {@emit result.converters := @[];} + result.filename := nimfile; end; procedure addConverter(c: PContext; conv: PSym); diff --git a/nim/semexprs.pas b/nim/semexprs.pas index 2c5672f7f..3e95e3457 100644 --- a/nim/semexprs.pas +++ b/nim/semexprs.pas @@ -36,9 +36,9 @@ var diff: int; begin diff := inheritanceDiff(castDest, src); - if diff = 0 then - liMessage(info, hintConvToBaseNotNeeded) - else if diff = high(int) then + //if diff = 0 then + // liMessage(info, hintConvToBaseNotNeeded) + if diff = high(int) then liMessage(info, errGenerated, format(MsgKindToString(errIllegalConvFromXtoY), [typeToString(src), typeToString(castDest)])); @@ -466,11 +466,11 @@ begin if m.state <> csMatch then begin msg := msgKindToString(errTypeMismatch); for i := 1 to sonsLen(n)-1 do begin - msg := msg +{&} typeToString(n.sons[i].typ); - if i <> sonsLen(n)-1 then msg := msg + ', '; + add(msg, typeToString(n.sons[i].typ)); + if i <> sonsLen(n)-1 then add(msg, ', '); end; - msg := msg +{&} ')' +{&} nl +{&} msgKindToString(errButExpected) +{&} - nl +{&} typeToString(n.sons[0].typ); + add(msg, ')' +{&} nl +{&} msgKindToString(errButExpected) +{&} + nl +{&} typeToString(n.sons[0].typ)); liMessage(n.Info, errGenerated, msg); result := nil end @@ -1117,7 +1117,7 @@ begin if s <> nil then result := semSym(c, n, s, flags) else - // test! + // this is a test comment; please don't touch it result := semFieldAccess(c, n, flags); end; diff --git a/nim/semfold.pas b/nim/semfold.pas index fa2e97635..422ddbd01 100644 --- a/nim/semfold.pas +++ b/nim/semfold.pas @@ -94,6 +94,25 @@ begin end end; +function enumValToString(a: PNode): string; +var + n: PNode; + field: PSym; + x: biggestInt; + i: int; +begin + x := getInt(a); + n := a.typ.n; + for i := 0 to sonsLen(n)-1 do begin + if n.sons[i].kind <> nkSym then InternalError(a.info, 'enumValToString'); + field := n.sons[i].sym; + if field.position = x then begin + result := field.name.s; exit + end; + end; + InternalError(a.info, 'no symbol for ordinal value: ' + toString(x)); +end; + function evalOp(m: TMagic; n, a, b: PNode): PNode; // if this is an unary operation, b is nil begin @@ -246,11 +265,18 @@ begin // available for interpretation. I don't know how to fix this. //result := newStrNodeT(renderTree(a, {@set}[renderNoComments]), n); end; - mIntToStr, mInt64ToStr, mBoolToStr, mCharToStr: + mIntToStr, mInt64ToStr: result := newStrNodeT(toString(getOrdValue(a)), n); + mBoolToStr: begin + if getOrdValue(a) = 0 then + result := newStrNodeT('false', n) + else + result := newStrNodeT('true', n) + end; mFloatToStr: result := newStrNodeT(toStringF(getFloat(a)), n); - mCStrToStr: result := newStrNodeT(getStrOrChar(a), n); + mCStrToStr, mCharToStr: result := newStrNodeT(getStrOrChar(a), n); mStrToStr: result := a; + mEnumToStr: result := newStrNodeT(enumValToString(a), n); mArrToSeq: begin result := copyTree(a); result.typ := n.typ; @@ -370,6 +396,10 @@ begin mNimrodMinor: result := newIntNodeT(VersionMinor, n); mNimrodPatch: result := newIntNodeT(VersionPatch, n); mCpuEndian: result := newIntNodeT(ord(CPU[targetCPU].endian), n); + mHostOS: + result := newStrNodeT(toLower(platform.OS[targetOS].name), n); + mHostCPU: + result := newStrNodeT(toLower(platform.CPU[targetCPU].name),n); mNaN: result := newFloatNodeT(NaN, n); mInf: result := newFloatNodeT(Inf, n); mNegInf: result := newFloatNodeT(NegInf, n); diff --git a/nim/semstmts.pas b/nim/semstmts.pas index 7d6403db4..098b95072 100644 --- a/nim/semstmts.pas +++ b/nim/semstmts.pas @@ -324,7 +324,7 @@ begin a := newNodeI(nkAsgn, n.sons[0].info); n.sons[0] := fitNode(c, restype, n.sons[0]); - // optimize away ``return result``, because it would be transferred + // optimize away ``return result``, because it would be transformed // to ``result = result; return``: if (n.sons[0].kind = nkSym) and (sfResult in n.sons[0].sym.flags) then begin @@ -378,14 +378,14 @@ function semVar(c: PContext; n: PNode): PNode; var i, j, len: int; a, b, def: PNode; - typ: PType; + typ, tup: PType; v: PSym; begin result := copyNode(n); for i := 0 to sonsLen(n)-1 do begin a := n.sons[i]; if a.kind = nkCommentStmt then continue; - if (a.kind <> nkIdentDefs) then IllFormedAst(a); + if (a.kind <> nkIdentDefs) and (a.kind <> nkVarTuple) then IllFormedAst(a); checkMinSonsLen(a, 3); len := sonsLen(a); if a.sons[len-2] <> nil then @@ -401,14 +401,21 @@ begin end else def := nil; + tup := skipGeneric(typ); + if a.kind = nkVarTuple then begin + if tup.kind <> tyTuple then liMessage(a.info, errXExpected, 'tuple'); + if len-2 <> sonsLen(tup) then + liMessage(a.info, errWrongNumberOfVariables); + end; for j := 0 to len-3 do begin - if (c.p.owner = nil) then begin + if c.p.owner = nil then begin v := semIdentWithPragma(c, skVar, a.sons[j], {@set}[sfStar, sfMinus]); include(v.flags, sfGlobal); end else v := semIdentWithPragma(c, skVar, a.sons[j], {@set}[]); - v.typ := typ; + if a.kind <> nkVarTuple then v.typ := typ + else v.typ := tup.sons[j]; if v.flags * [sfStar, sfMinus] <> {@set}[] then include(v.flags, sfInInterface); addInterfaceDecl(c, v); @@ -443,7 +450,7 @@ begin if a.sons[1] <> nil then typ := semTypeNode(c, a.sons[1], nil) else typ := nil; - def := semConstExpr(c, a.sons[2]); + def := semAndEvalConstExpr(c, a.sons[2]); // check type compability between def.typ and typ: if (typ <> nil) then begin def := fitRemoveHiddenConv(c, typ, def); @@ -495,7 +502,7 @@ begin iter := skipGeneric(n.sons[len-2].typ); openScope(c.tab); if iter.kind <> tyTuple then begin - if len <> 3 then liMessage(n.info, errWrongNumberOfLoopVariables); + if len <> 3 then liMessage(n.info, errWrongNumberOfVariables); v := newSymS(skForVar, n.sons[0], c); v.typ := iter; n.sons[0] := newSymNode(v); @@ -503,7 +510,7 @@ begin end else begin if len-2 <> sonsLen(iter) then - liMessage(n.info, errWrongNumberOfLoopVariables); + liMessage(n.info, errWrongNumberOfVariables); for i := 0 to len-3 do begin v := newSymS(skForVar, n.sons[i], c); v.typ := iter.sons[i]; @@ -840,6 +847,7 @@ begin closeScope(c.tab); // close scope for parameters popOwner(); c.p := oldP; // restore + result.typ := s.typ; end; function semProcAux(c: PContext; n: PNode; kind: TSymKind): PNode; diff --git a/nim/semtypes.pas b/nim/semtypes.pas index 5d9bd626a..37958c4d0 100644 --- a/nim/semtypes.pas +++ b/nim/semtypes.pas @@ -256,8 +256,8 @@ begin if templ = nil then begin result := nil; exit end; case templ.kind of nkSym: begin - if (templ.sym.kind = skTypeParam) - and (templ.sym.owner.id = sym.id) then + if (templ.sym.kind = skTypeParam) then + //and (templ.sym.owner.id = sym.id) then result := copyTree(actual.sons[templ.sym.position+1]) else result := copyNode(templ) @@ -285,15 +285,18 @@ begin result.containerID := s.typ.containerID; // ... but the same containerID result.sym := s; if (s.typ.containerID = 0) then - InternalError(n.info, 'semGeneric'); + InternalError(n.info, 'semtypes.semGeneric'); for i := 1 to sonsLen(n)-1 do begin elem := semTypeNode(c, n.sons[i], nil); - if elem.kind = tyGenericParam then result.kind := tyGeneric; + if elem.kind = tyGenericParam then + result.kind := tyGeneric; // prevend type from instantiation addSon(result, elem); end; if s.ast <> nil then begin - inst := instGenericAux(c, s.ast.sons[2], n, s); - if result.kind = tyGenericInst then begin + if (result.kind = tyGenericInst) then begin + inst := instGenericAux(c, s.ast.sons[2], n, s); + internalError(n.info, 'Generic containers not implemented'); + // XXX: implementation does not work this way // does checking of instantiated type for us: elem := semTypeNode(c, inst, nil); elem.id := result.containerID; @@ -303,7 +306,9 @@ begin addSon(result, nil); end else - liMessage(n.info, errCannotInstantiateX, s.name.s); + liMessage(n.info, errCannotInstantiateX, s.name.s); + (*if computeSize(result) < 0 then + liMessage(s.info, errIllegalRecursionInTypeX, s.name.s);*) end; function semIdentVis(c: PContext; kind: TSymKind; n: PNode; diff --git a/nim/sigmatch.pas b/nim/sigmatch.pas index 741052f05..289a17673 100644 --- a/nim/sigmatch.pas +++ b/nim/sigmatch.pas @@ -80,20 +80,23 @@ var begin result := msgKindToString(errTypeMismatch); for i := 1 to sonsLen(n)-1 do begin - result := result +{&} typeToString(n.sons[i].typ); - if i <> sonsLen(n)-1 then result := result + ', '; + debug(n.sons[i].typ); + add(result, typeToString(n.sons[i].typ)); + if i <> sonsLen(n)-1 then add(result, ', '); end; addChar(result, ')'); candidates := ''; sym := initOverloadIter(o, c, n.sons[0]); while sym <> nil do begin - if sym.kind in [skProc, skIterator, skConverter] then - candidates := candidates +{&} getProcHeader(sym) +{&} nl; + if sym.kind in [skProc, skIterator, skConverter] then begin + add(candidates, getProcHeader(sym)); + add(candidates, nl) + end; sym := nextOverloadIter(o, c, n.sons[0]); end; if candidates <> '' then - result := result +{&} nl +{&} msgKindToString(errButExpected) +{&} nl - +{&} candidates; + add(result, nl +{&} msgKindToString(errButExpected) +{&} nl + +{&} candidates); end; function typeRel(var mapping: TIdTable; f, a: PType): TTypeRelation; overload; @@ -431,7 +434,7 @@ begin // is a subtype of f? tyAnyEnum: begin case a.kind of tyRange: result := typeRel(mapping, f, base(a)); - tyEnum: result := isEqual; + tyEnum: result := isSubtype; else begin end end end; diff --git a/nim/strtabs.pas b/nim/strtabs.pas index 295c46faa..b07aefab1 100644 --- a/nim/strtabs.pas +++ b/nim/strtabs.pas @@ -8,8 +8,7 @@ // unit strtabs; -// A configuration file parser; the Nimrod version of this file -// will become part of the standard library. +// String tables. interface diff --git a/nim/strutils.pas b/nim/strutils.pas index 3d8f0424b..71a428dbb 100644 --- a/nim/strutils.pas +++ b/nim/strutils.pas @@ -75,13 +75,14 @@ const function strip(const s: string; const chars: TCharSet = WhiteSpace): string; function allCharsInSet(const s: string; const theSet: TCharSet): bool; -function quoteIfSpaceExists(const s: string): string; +function quoteIfContainsWhite(const s: string): string; implementation -function quoteIfSpaceExists(const s: string): string; +function quoteIfContainsWhite(const s: string): string; begin - if (findSubStr(' ', s) >= strStart) and (s[strStart] <> '"') then + if ((findSubStr(' ', s) >= strStart) + or (findSubStr(#9, s) >= strStart)) and (s[strStart] <> '"') then result := '"' +{&} s +{&} '"' else result := s diff --git a/nim/tigen.pas b/nim/tigen.pas new file mode 100644 index 000000000..937883e5e --- /dev/null +++ b/nim/tigen.pas @@ -0,0 +1,47 @@ +// +// +// The Nimrod Compiler +// (c) Copyright 2008 Andreas Rumpf +// +// See the file "copying.txt", included in this +// distribution, for details about the copyright. +// + +unit tigen; + +// Type information generator. It transforms types into the AST of walker +// procs. This is used by the code generators. + +interface + +{$include 'config.inc'} + +uses + nsystem, ast, astalgo, strutils, hashes, trees, treetab, platform, magicsys, + options, msgs, crc, idents, lists, types, rnimsyn; + +function gcWalker(t: PType): PNode; +function initWalker(t: PType): PNode; +function asgnWalker(t: PType): PNode; +function reprWalker(t: PType): PNode; + +implementation + +function gcWalker(t: PType): PNode; +begin +end; + +function initWalker(t: PType): PNode; +begin +end; + +function asgnWalker(t: PType): PNode; +begin +end; + +function reprWalker(t: PType): PNode; +begin +end; + +end. + diff --git a/nim/transf.pas b/nim/transf.pas index d74f2aa83..98d1e89ea 100644 --- a/nim/transf.pas +++ b/nim/transf.pas @@ -22,7 +22,7 @@ interface uses sysutils, nsystem, charsets, strutils, lists, options, ast, astalgo, trees, treetab, - msgs, nos, idents, rnimsyn, types, passes, semfold; + msgs, nos, idents, rnimsyn, types, passes, semfold, magicsys; const genPrefix = ':tmp'; // prefix for generated names @@ -139,7 +139,7 @@ More efficient, but not implementable: function newAsgnStmt(c: PTransf; le, ri: PNode): PNode; begin - result := newNodeI(nkAsgn, ri.info); + result := newNodeI(nkFastAsgn, ri.info); addSon(result, le); addSon(result, ri); end; @@ -224,6 +224,28 @@ begin end end; +function newTupleAccess(tup: PNode; i: int): PNode; +var + lit: PNode; +begin + result := newNodeIT(nkBracketExpr, tup.info, tup.typ.sons[i]); + addSon(result, copyTree(tup)); + lit := newNodeIT(nkIntLit, tup.info, getSysType(tyInt)); + lit.intVal := i; + addSon(result, lit); +end; + +procedure unpackTuple(c: PTransf; n, father: PNode); +var + i: int; +begin + // XXX: BUG: what if `n` is an expression with side-effects? + for i := 0 to sonsLen(n)-1 do begin + addSon(father, newAsgnStmt(c, c.transCon.forStmt.sons[i], + transform(c, newTupleAccess(n, i)))); + end +end; + function transformYield(c: PTransf; n: PNode): PNode; var e: PNode; @@ -239,10 +261,8 @@ begin transform(c, copyTree(e.sons[i])))); end end - else begin - // XXX: tuple unpacking: - internalError(n.info, 'tuple unpacking is not implemented'); - end + else + unpackTuple(c, e, result); end else begin e := transform(c, copyTree(e)); @@ -523,7 +543,7 @@ end; (* # example: proc map(f: proc (x: int): int {.closure}, a: seq[int]): seq[int] = - result = [] + result = @[] for elem in a: add result, f(a) @@ -534,12 +554,12 @@ end; proc map(f: proc(x: int): int, closure: pointer, a: seq[int]): seq[int] = - result = [] + result = @[] for elem in a: add result, f(a, closure) type - PMyClosure = ref record + PMyClosure = ref object y: var int proc myLambda(x: int, closure: pointer) = diff --git a/nim/types.pas b/nim/types.pas index 0686a368f..25ad54b33 100644 --- a/nim/types.pas +++ b/nim/types.pas @@ -638,15 +638,15 @@ begin assert(sonsLen(t.n) = sonsLen(t)); for i := 0 to sonsLen(t.n)-1 do begin assert(t.n.sons[i].kind = nkSym); - result := result +{&} t.n.sons[i].sym.name.s +{&} ': ' - +{&} typeToString(t.sons[i]); - if i < sonsLen(t.n)-1 then result := result +{&} ', '; + add(result, t.n.sons[i].sym.name.s +{&} ': ' + +{&} typeToString(t.sons[i])); + if i < sonsLen(t.n)-1 then add(result, ', '); end end else begin for i := 0 to sonsLen(t)-1 do begin - result := result +{&} typeToString(t.sons[i]); - if i < sonsLen(t)-1 then result := result +{&} ', '; + add(result, typeToString(t.sons[i])); + if i < sonsLen(t)-1 then add(result, ', '); end end; addChar(result, ']') @@ -659,14 +659,14 @@ begin tyProc: begin result := 'proc ('; for i := 1 to sonsLen(t)-1 do begin - result := result +{&} typeToString(t.sons[i]); - if i < sonsLen(t)-1 then result := result +{&} ', '; + add(result, typeToString(t.sons[i])); + if i < sonsLen(t)-1 then add(result, ', '); end; addChar(result, ')'); if t.sons[0] <> nil then - result := result +{&} ': ' +{&} TypeToString(t.sons[0]); + add(result, ': ' +{&} TypeToString(t.sons[0])); if t.callConv <> ccDefault then - result := result +{&} '{.' +{&} CallingConvToStr[t.callConv] +{&} '.}'; + add(result, '{.' +{&} CallingConvToStr[t.callConv] +{&} '.}'); end; else begin result := typeToStr[t.kind] diff --git a/nim/wordrecg.pas b/nim/wordrecg.pas index 309b2f7c1..587005c2a 100644 --- a/nim/wordrecg.pas +++ b/nim/wordrecg.pas @@ -73,7 +73,7 @@ type wOverflowchecks, wNilchecks, wAssertions, wWarnings, wW, wHints, wOptimization, wSpeed, wSize, wNone, wPath, wP, wD, wU, wDebuginfo, wCompileonly, wNolinking, wForcebuild, - wF, wDeadelim, wSafecode, wCompileTime, + wF, wDeadCodeElim, wSafecode, wCompileTime, wGc, wRefc, wBoehm, wA, wOpt, wO, wApp, wConsole, wGui, wPassc, wT, wPassl, wL, wListcmd, wGendoc, wGenmapping, @@ -86,7 +86,7 @@ type // commands: wCompileToC, wCompileToCpp, wCompileToEcmaScript, wPretty, wDoc, wPas, - wGenDepend, wListDef, wCheck, wParse, wScan, wBoot, wDebugTrans, + wGenDepend, wListDef, wCheck, wParse, wScan, wBoot, wLazy, wRst2html, wI, // special for the preprocessor of configuration files: wWrite, wPutEnv, wPrependEnv, wAppendEnv, @@ -147,7 +147,7 @@ const 'overflowchecks', 'nilchecks', 'assertions', 'warnings', 'w'+'', 'hints', 'optimization', 'speed', 'size', 'none', 'path', 'p'+'', 'd'+'', 'u'+'', 'debuginfo', 'compileonly', 'nolinking', 'forcebuild', - 'f'+'', 'deadelim', 'safecode', 'compiletime', + 'f'+'', 'deadcodeelim', 'safecode', 'compiletime', 'gc', 'refc', 'boehm', 'a'+'', 'opt', 'o'+'', 'app', 'console', 'gui', 'passc', 't'+'', 'passl', 'l'+'', 'listcmd', 'gendoc', 'genmapping', @@ -160,7 +160,7 @@ const // commands: 'compiletoc', 'compiletocpp', 'compiletoecmascript', 'pretty', 'doc', 'pas', 'gendepend', 'listdef', 'check', 'parse', - 'scan', 'boot', 'debugtrans', 'rst2html', 'i'+'', + 'scan', 'boot', 'lazy', 'rst2html', 'i'+'', // special for the preprocessor of configuration files: 'write', 'putenv', 'prependenv', 'appendenv', diff --git a/readme.txt b/readme.txt index bfff6217b..963ce8b14 100644 --- a/readme.txt +++ b/readme.txt @@ -1,21 +1,21 @@ -=========================================================== - Nimrod Compiler -=========================================================== - -This is the **Nimrod Compiler**. Nimrod is a new statically typed, imperative -programming language, that supports procedural, functional, object oriented and -generic programming styles while remaining simple and efficient. A special -feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree -(AST) is part of the specification - this allows a powerful macro system which -can be used to create domain specific languages. - -*Nimrod* is a compiled, garbage-collected systems programming language -which has an excellent productivity/performance ratio. Nimrod's design -focuses on the 3E: efficiency, expressiveness, elegance (in the order of -priority). - -See the file ``install.txt`` for installation instructions. See the file -``doc/intern.txt`` for the internal documentation for developers. - -Copyright (c) 2004-2008 Andreas Rumpf. -All rights reserved. +=========================================================== + Nimrod Compiler +=========================================================== + +This is the **Nimrod Compiler**. Nimrod is a new statically typed, imperative +programming language, that supports procedural, functional, object oriented and +generic programming styles while remaining simple and efficient. A special +feature that Nimrod inherited from Lisp is that Nimrod's abstract syntax tree +(AST) is part of the specification - this allows a powerful macro system which +can be used to create domain specific languages. + +*Nimrod* is a compiled, garbage-collected systems programming language +which has an excellent productivity/performance ratio. Nimrod's design +focuses on the 3E: efficiency, expressiveness, elegance (in the order of +priority). + +See the file ``install.txt`` for installation instructions. See the file +``doc/intern.txt`` for the internal documentation for developers. + +Copyright (c) 2004-2009 Andreas Rumpf. +All rights reserved. diff --git a/rod/nimrod.cfg b/rod/nimrod.cfg index 2d742e431..31abf7a2a 100644 --- a/rod/nimrod.cfg +++ b/rod/nimrod.cfg @@ -5,7 +5,7 @@ @if llvm_gcc or gcc: # GCC, LLVM and Visual C++ have a problem to optimize some modules. # This is really strange. - @if windows: + @if windows or macosX: cgen.speed = "-O0" @else: cgen.speed = "-O1 -fno-strict-aliasing" diff --git a/rod/readme.txt b/rod/readme.txt index dbd14d459..6ecc723fb 100644 --- a/rod/readme.txt +++ b/rod/readme.txt @@ -1,3 +1,3 @@ This directory contains the Nimrod version of Nimrod's source code. These files -are generated by the ``boot`` command of nimrodc. DO NOT MODIFY THE FILES HERE! +are generated by the ``boot`` command of nimrod. DO NOT MODIFY THE FILES HERE! Modify the Pascal version. diff --git a/tests/gtk/ex9.nim b/tests/gtk/ex9.nim index 79b335044..ce2f73862 100644 --- a/tests/gtk/ex9.nim +++ b/tests/gtk/ex9.nim @@ -25,9 +25,9 @@ stackbox = gtk_vbox_new(TRUE, 10) button1 = gtk_button_new_with_label("Move mouse over button") buttonstyle = gtk_style_copy(gtk_widget_get_style(Button1)) ButtonStyle.bg[GTK_STATE_PRELIGHT].pixel = 0 -ButtonStyle.bg[GTK_STATE_PRELIGHT].red = 0x0000FFFF -ButtonStyle.bg[GTK_STATE_PRELIGHT].blue = 0 -ButtonStyle.bg[GTK_STATE_PRELIGHT].green = 0 +ButtonStyle.bg[GTK_STATE_PRELIGHT].red = 0x0000FFFF'i16 +ButtonStyle.bg[GTK_STATE_PRELIGHT].blue = 0'i16 +ButtonStyle.bg[GTK_STATE_PRELIGHT].green = 0'i16 gtk_widget_set_style(button1, buttonstyle) button2 = gtk_button_new() ALabel = gtk_label_new(Outside) diff --git a/tests/readme.txt b/tests/readme.txt index c8704f304..c21b04acd 100644 --- a/tests/readme.txt +++ b/tests/readme.txt @@ -1,7 +1,3 @@ -Note: Most test cases are not up to date to the current Nimrod -version. Only ``thallo`` is frequently tested! The best test is -to bootstrap, anyway. - This directory contains the test cases. Each test must have a filename of the form: ``t*.nim`` diff --git a/tests/thallo.nim b/tests/thallo.nim index 47d56724b..f8d3b8a69 100644 --- a/tests/thallo.nim +++ b/tests/thallo.nim @@ -1,7 +1,11 @@ # Hallo import - os + os, strutils, macros + +type + TMyEnum = enum + meA, meB, meC, meD when isMainModule: {.hint: "this is the main file".} @@ -9,7 +13,7 @@ when isMainModule: proc fac[T](x: T): T = # test recursive generic procs if x <= 1: return 1 - else: return x * fac(x-1) + else: return x.`*`(fac(x-1)) macro macrotest(n: expr): stmt = expectKind(n, nnkCall) @@ -35,22 +39,41 @@ echo("This was compiled by Nimrod version " & system.nimrodVersion) writeln(stdout, "Hallo", " World", "!") echo(["a", "b", "c", "d"].len) -for x in items(["What's", "your", "name", "?"]): +for x in items(["What's", "your", "name", "?", ]): echo(x = x) var `name` = readLine(stdin) {.breakpoint.} echo("Hi " & thallo.name & "!\n") debug(name) -var testseq: seq[string] = @[ "a", "b", "c", "d", "e"] +var testseq: seq[string] = @[ + "a", "b", "c", "d", "e" +] echo(repr(testseq)) var dummy = "hallo" echo(copy(dummy, 2, 3)) +echo($meC) + +# test tuples: +for x, y in items([(1, 2), (3, 4), (6, 1), (5, 2)]): + echo x + echo y + +# test constant evaluation: +const + constEval = "abc".contains('b') + constEval2 = fac(7) + +echo(constEval) +echo(constEval2) +echo(1.`+`(2)) + for i in 2..6: for j in countdown(i+4, 2): echo(fac(i * j)) when isMainModule: {.hint: "this is the main file".} + diff --git a/tests/titer.nim b/tests/titer.nim index 3f71ba8d9..19a11dc4e 100644 --- a/tests/titer.nim +++ b/tests/titer.nim @@ -32,3 +32,13 @@ for i in xrange(0, 5): for j in interval(45, 45): write(stdout, "test2!") write(stdout, "test3?") + +for x in items(["hi", "what's", "your", "name"]): + echo(x) + +const + stringArray = ["hi", "what's", "your", "name"] + +for i in 0..len(stringArray)-1: + echo(stringArray[i]) + diff --git a/tests/tlibs.nim b/tests/tlibs.nim index 317430744..2326fba64 100644 --- a/tests/tlibs.nim +++ b/tests/tlibs.nim @@ -1,9 +1,10 @@ # Test wether the bindings at least compile... import + unicode, osproc, zipfiles, sdl, smpeg, sdl_gfx, sdl_net, sdl_mixer, sdl_ttf, - sdl_image, sdl_mixer_nosmpeg + sdl_image, sdl_mixer_nosmpeg, cursorfont, xatom, xf86vmode, xkb, xrandr, xshm, xvlib, keysym, xcms, xi, xkblib, xrender, xutil, x, xf86dga, xinerama, xlib, xresource, xv, gtk2, glib2, pango, gdk2, diff --git a/tests/tnew.nim b/tests/tnew.nim index 813bb9433..6527541a2 100644 --- a/tests/tnew.nim +++ b/tests/tnew.nim @@ -31,7 +31,7 @@ proc main() = n = newNode(i, nil, newNode(i + 10000, nil, nil)) inc(i) - #new(p) + new(p) write(stdout, "Simple tree node allocation worked!\n") i = 0 diff --git a/todo.txt b/todo.txt index 2cd30ceea..44050d637 100644 --- a/todo.txt +++ b/todo.txt @@ -10,8 +10,7 @@ Bugs ---- - BUG: addr/deref may not work when interpreting -- BUG: the parser allows empty statements/object case branches -- BUG: the parser allows to omit commas +- BUG: the parser allows empty object case branches - BUG: when optmizing cgen.c with Visual C++, GCC, LLVM (O3), it breaks. - BUG: ``-cc:bcc`` command line option does not error - BUG: symbol files still do not work @@ -22,12 +21,16 @@ Bugs High priority ------------- -- documentation: var types, ``[]`` overloading, ``cast`` and type convertions, - ``if`` expresssions, (anonymous) procs +- implement tuple unpacking +- implement closures for the C code generator +- implement a better memory manager +- implement stack walking via assembler for horribly advanced optimizers + +- documentation: ``[]`` overloading, type convertions, + anonymous procs, ``len(s) == s.len``, type converters - implement two-phase lookup for generics (this is hard...): This is useful for macros too! Alternative: Explicit early name binding. Both are hard to implement -- implement closures for the C code generator - get rid of ``nkHiddenStdConv`` in several places: this mechanism caused more bugs than it ever solved! @@ -35,7 +38,6 @@ High priority Library ------- - xml, html, url, fastcgi: implement from scratch -- unicode library - socket library (does SDL for us?) - osproc for Windows - bignums @@ -47,7 +49,6 @@ Low priority - use `` notation for identifier concatenation? - Visual C++: emit ``default: __assume(0);`` for optimization -- ``nkTempAsgn``-node as optimization - macros: ``typecheck`` pragma; this is really a good idea! This allows transformations based on types! - make callconv a set @@ -326,7 +327,7 @@ Changelog - BUGFIX: ``genTypeSection`` uses ``isPureObject`` now - BUGFIX: ``GetUniqueType`` was wrong - BUGFIX: count references from untraced heap to traced heap! -- BUGFIX: fixed owner handling bug; only accessible in semantic checking phase +- BUGFIX: fixed owner handling bug; only accessible in semantic checking phase - BUGFIX: ``ParamTypesMatch`` generics resulting in openarray now generate the nkHiddenStdConv tree - BUGFIX: dynamic libraries are reused again -> much smaller C code is produced @@ -342,13 +343,38 @@ Changelog correctly 0.7.2 - small performance improvements for the RST parser +0.7.3 +- (assembler code for GCC, not activated) +- BUGFIX: docgen: take care of nkCommentStmt in sections +- docgen: only documentation comments are rendered +- BUGFIX: rst: getFieldValue(): invalid assertion +- BUGFIX: rst: parseFields(): more than one field is now correctly parsed +- BUGFIX: docgen: renderImage(): strip the arguments +- BUGFIX: ``\`` is allowed for operators like the spec says +- system: added ``hostOS`` and ``hostCPU`` magics +- system: echo now accepts multiple arguments +- added ``nkFastAsgn`` optimization +- BUGFIX: in rare cases, the index check has been optimized away, even though + it would have been necessary +- added dead code elimination +- COMP: renamed ``in_Operator`` to ``contains`` +- COMP: renamed ``quoteIfSpaceExists`` to ``quoteIfContainsWhite`` +- added ``EnumToStr`` magic +0.7.4 +- the parser is now much more picky +- for the closing parenthesis ``SAD`` token may occur +- the parser is now responsible for popping from the indendation stack +- constant evaluation in ``const`` sections +- removed hintConvToBaseNotNeeded: It is often intended for overloading + resolutions +- ``macros`` are no longer part of the ``system`` module, to use macros you + have to import the ``macros`` module For the next versions ===================== - multi-processor support -- tuple assignment - IDE - better support for GDB? - support for generation of dynamic libraries @@ -364,7 +390,6 @@ Further ideas/nice to have - CLR code generator; better use XYZ? --> Version 1.2? - provide an interactive shell: if the user wants his commands to be executed, the command should end with # -- add the built-in 'finalize' - implement packed arrays (bit arrays)/ packed records - implement tables (implement as library? - no! Builtin because of constructor syntax is nice to have) diff --git a/tools/niminst b/tools/niminst index 1eb39a5b6..4f007f577 100644 --- a/tools/niminst +++ b/tools/niminst Binary files differdiff --git a/tools/nimweb.nim b/tools/nimweb.nim index 4835c5f4f..81602549c 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -80,7 +80,7 @@ proc parseCmdLine(c: var TConfigData) = proc walkDirRecursively(s: var seq[string], root, ext: string) = for k, f in walkDir(root): case k - of pcFile, pcLinkToFile: + of pcFile, pcLinkToFile: if cmpIgnoreCase(ext, extractFileExt(f)) == 0: add(s, f) of pcDirectory: walkDirRecursively(s, f, ext) @@ -122,21 +122,21 @@ proc parseIniFile(c: var TConfigData) = of "authors": c.authors = v else: quit(errorStr(p, "unknown variable: " & k.key)) of "var": nil - of "links": add(c.links, (key: k.key, val: v)) - of "tabs": add(c.tabs, (key: k.key, val: v)) + of "links": add(c.links, (k.key, v)) + of "tabs": add(c.tabs, (k.key, v)) of "ticker": c.ticker = v - of "documentation": + of "documentation": case normalize(k.key) - of "doc": addFiles(c.doc, "doc", "txt" splitSeq(v, {';'})) - of "srcdoc": addFiles(c.srcdoc, "lib", "nim", splitSeq(v, {';'})) - of "webdoc": addFiles(c.webdoc, "lib", "nim", splitSeq(v, {';'})) + of "doc": addFiles(c.doc, "doc", ".txt", splitSeq(v, {';'})) + of "srcdoc": addFiles(c.srcdoc, "lib", ".nim", splitSeq(v, {';'})) + of "webdoc": addFiles(c.webdoc, "lib", ".nim", splitSeq(v, {';'})) else: quit(errorStr(p, "unknown variable: " & k.key)) else: nil of cfgOption: quit(errorStr(p, "syntax error")) of cfgError: quit(errorStr(p, k.msg)) close(p) - if c.projectName.len == 0: + if c.projectName.len == 0: c.projectName = changeFileExt(extractFilename(c.infile), "") if c.outdir.len == 0: c.outdir = extractDir(c.infile) @@ -145,33 +145,33 @@ proc parseIniFile(c: var TConfigData) = # ------------------- main ---------------------------------------------------- -proc Exec(cmd: string) = +proc Exec(cmd: string) = echo(cmd) if os.executeShellCommand(cmd) != 0: quit("external program failed") proc buildDoc(c: var TConfigData, destPath: string) = # call nim for the documentation: for d in items(c.doc): - Exec("nimrod rst2html $1 -o:$2 --index=$3/theindex $4" % - [c.nimrodArgs, destPath / changeFileExt(extractFileTrunk(d), "html"), + Exec("nimrod rst2html $1 -o:$2 --index=$3/theindex $4" % + [c.nimrodArgs, destPath / changeFileExt(extractFileTrunk(d), "html"), destpath, d]) for d in items(c.srcdoc): - Exec("nimrod doc $1 -o:$2 --index=$3/theindex $4" % + Exec("nimrod doc $1 -o:$2 --index=$3/theindex $4" % [c.nimrodArgs, destPath / changeFileExt(extractFileTrunk(d), "html"), destpath, d]) - Exec("nimrod rst2html $1 -o:$2/theindex.html $2/theindex" % + Exec("nimrod rst2html $1 -o:$2/theindex.html $2/theindex" % [c.nimrodArgs, destPath]) -proc buildAddDoc(c: var TConfigData, destPath: string) = +proc buildAddDoc(c: var TConfigData, destPath: string) = # build additional documentation (without the index): for d in items(c.webdoc): - Exec("nimrod doc $1 -o:$2 $3" % + Exec("nimrod doc $1 -o:$2 $3" % [c.nimrodArgs, destPath / changeFileExt(extractFileTrunk(d), "html"), d]) -proc main(c: var TConfigData) = +proc main(c: var TConfigData) = const cmd = "nimrod rst2html --compileonly $1 -o:web/$2.temp web/$2.txt" - if c.ticker.len > 0: + if c.ticker.len > 0: Exec(cmd % [c.nimrodArgs, c.ticker]) var temp = "web" / changeFileExt(c.ticker, "temp") c.ticker = readFile(temp) @@ -191,7 +191,7 @@ proc main(c: var TConfigData) = else: quit("[Error] cannot write file: " & outfile) removeFile(temp) - + buildAddDoc(c, "web/upload") buildDoc(c, "web/upload") buildDoc(c, "doc") |