Misc Functions¶
Additional utilities
-
proc
compilerError
(param msg: string ...?n)¶ Generate a compile-time error. The error text is a concatenation of the arguments.
-
proc
compilerError
(param msg: string ...?n, param errorDepth: int) Generate a compile-time error. The error text is a concatenation of the string arguments.
Arguments: errorDepth -- controls the depth of the error stack trace
-
proc
compilerWarning
(param msg: string ...?n)¶ Generate a compile-time warning. The warning text is a concatenation of the arguments.
-
proc
compilerWarning
(param msg: string ...?n, param errorDepth: int) Generate a compile-time warning. The warning text is a concatenation of the string arguments.
Arguments: errorDepth -- controls the depth of the error stack trace
-
proc
compilerAssert
(param test: bool)¶ Generate a compile-time error if the test argument is false.
-
proc
compilerAssert
(param test: bool, param errorDepth: int) Generate a compile-time error if the test argument is false.
Arguments: errorDepth -- controls the depth of the error stack trace
-
proc
compilerAssert
(param test: bool, param msg: string ...?n) Generate a compile-time error if the test argument is false. The warning text is a concatenation of the string arguments.
-
proc
compilerAssert
(param test: bool, param msg: string ...?n, param errorDepth: int) Generate a compile-time error if the test argument is false. The warning text is a concatenation of the string arguments.
Arguments: errorDepth -- controls the depth of the error stack trace
-
proc
min
(x, y ...)¶ Compute the minimum value of 2 or more arguments using the
<
operator for comparison.
-
proc
max
(x, y ...)¶ Compute the maximum value of 2 or more arguments using the
>
operator for comparison.
-
proc
exit
(status: int)¶ Exit the program
Arguments: status -- The exit code for the program