Scol standard library package
0.3.1
Common and usefull functions for all Scol applications
|
Functions | |
pkgs_pkgLoadCode (szCode, iFlag) | |
Load a Scol code string in the current channel. More... | |
pkgs_pkgLoadSafe (fPkg, iFlag) | |
Load a package in the current channel. More... | |
pkgs_pkgLoadSafeP (pPkg, iFlag) | |
Load a package in the current channel. More... | |
pkgs_pkgRemoveNLast (chn, n) | |
Remove the N last loaded packages in a given channel. More... | |
pkgs_pkgRemoveRecursive (chn, cbfun) | |
Remove some last packages in a given channel to apply a callback. More... | |
pkgs_pkgTest (pPkgName, cbfun) | |
Test a package in the current channel next call a function. More... | |
pkgs_pkgTestS (szCode, cbfun) | |
Test a Scol code in the current channel next call a function. More... | |
Package to load : lib/pkgs/pkg.pkg
Dependancies :
pkgs_pkgRemoveNLast | ( | chn | , |
n | |||
) |
Remove the N last loaded packages in a given channel.
Prototype : fun [Chn I] I
Chn | : a channel (like _channel) |
I | : the number of packages to remove |
pkgs_pkgRemoveRecursive | ( | chn | , |
cbfun | |||
) |
Remove some last packages in a given channel to apply a callback.
Only if the callback returns 0, the recursion stops. Else, the recursion continues until all packages are removed.
Prototype : fun [Chn fun [Env S] I] I
Chn | : a channel (like _channel) |
fun | [Env S] I : the callback. It must return an integer (I). Its arguments are :
|
pkgs_pkgTest | ( | pPkgName | , |
cbfun | |||
) |
Test a package in the current channel next call a function.
Prototype : fun [P fun [I P S] u0] u0
P | : a read-file reference |
fun | [I P S] u0 : the function to call. Its arguments are :
|
pkgs_pkgTestS | ( | szCode | , |
cbfun | |||
) |
Test a Scol code in the current channel next call a function.
Prototype : fun [S fun [I S S] u0] u0
S | : a code string |
fun | [I S S] u0 : the function to call. Its arguments are :
|
pkgs_pkgLoadSafe | ( | fPkg | , |
iFlag | |||
) |
Load a package in the current channel.
The loading can be safe : in this case, the package is checked before to be loaded.
Prototype : fun [S I] [I S]
S | : a filename of a package |
I | : a flag : PKGS_PKG_SAFE to have a safe loading, PKGS_PKG_UNSAFE (or any other value) to have an unsafe loading. |
pkgs_pkgLoadSafeP | ( | pPkg | , |
iFlag | |||
) |
Load a package in the current channel.
The loading can be safe : in this case, the package is checked before to be loaded.
Prototype : fun [P I] [I S]
P | : a read package reference |
I | : a flag : PKGS_PKG_SAFE to have a safe loading, PKGS_PKG_UNSAFE (or any other value) to have an unsafe loading. |
pkgs_pkgLoadCode | ( | szCode | , |
iFlag | |||
) |
Load a Scol code string in the current channel.
The loading can be safe : in this case, the code is checked before to be loaded.
Prototype : fun [S I] [I S]
S | : a Scol code |
I | : a flag : PKGS_PKG_SAFE to have a safe loading, PKGS_PKG_UNSAFE (or any other value) to have an unsafe loading. |