Function
precondition(_:_:file:line:)
Checks a necessary condition for making forward progress.
fun precondition(
_ condition: Bool,
_ message: String,
file: String,
line: Int
)
Parameters
condition
message
file
line
The condition to test.
A description of the error to write to the standard error of a hosted environment before terminating the program if the precondition fails. The default is an empty string.
The file name to print with message if the precondition fails. The default is the file where this function is called.
The line number to print along with message if the precondition fails. The default is the line where this function is called.