explicit types for generic routines

This commit is contained in:
Andreas Rumpf 2010-05-28 23:32:46 +02:00
commit 6c20509121
25 changed files with 411 additions and 343 deletions

View file

@ -981,6 +981,9 @@ when not defined(NimrodVM):
proc getCurrentExceptionMsg*(): string {.exportc.}
## retrieves the error message that was attached to the current
## exception; if there is none, "" is returned.
proc getCurrentException*(): ref E_Base
## retrieves the current exception; if there is none, nil is returned.
# new constants:
const
@ -1390,6 +1393,13 @@ when not defined(EcmaScript) and not defined(NimrodVM):
##
## Default mode is readonly. Returns true iff the file could be opened.
proc reopen*(f: TFile, filename: string, mode: TFileMode = fmRead): bool
## reopens the file `f` with given `filename` and `mode`. This
## is often used to redirect the `stdin`, `stdout` or `stderr`
## file variables.
##
## Default mode is readonly. Returns true iff the file could be reopened.
proc CloseFile*(f: TFile) {.importc: "fclose", nodecl, deprecated.}
## Closes the file.
## **Deprecated since version 0.8.0**: Use `close` instead.
@ -1554,6 +1564,7 @@ when not defined(EcmaScript) and not defined(NimrodVM):
else:
result = n.sons[n.len]
include "system/systhread"
include "system/mm"
include "system/sysstr"
include "system/assign"
@ -1564,6 +1575,10 @@ when not defined(EcmaScript) and not defined(NimrodVM):
if excHandler == nil: return ""
return $excHandler.exc.msg
proc getCurrentException(): ref E_Base =
if excHandler != nil:
result = excHandler.exc
{.push stack_trace: off.}
when defined(endb):
include "system/debugger"