Form Programming Language Logo


ormpl

assert.frs

Definitions

let

N/A

def

N/A

alias

N/A


function

assert

definition

bool[1] -> assert
mutable {bool[1], [char][2]} -> assert

desciption

The function throws the null exception if the bool argument passed to the function is false. In the second case the if argument [1] is false then the character list is printed to stderr before throwing the null exception.

parameters

[1] bool signifying if the null exception should be thrown, false signifies that exception will be thrown

[2] character list that will be printed to stderr if the exception is thrown

return

empty structure

example

include "assert" as assert mutable [[char]] -> main -> int : i = 5 k = 10 {i == k, "i != k"} -> assert.assert return +0;

include

"assert.frs"

links

N/A