Function parts
In RSL 0.4.2, a file withcomponent: rater states one function. A file that leaves component out does too:
This file is the smallest function that passes the check. It takes a payroll and gives a premium:
minimal/rater.rsl
minimal/rater.rsl
minimal/rater.rsl
Checks
A check is a condition on an input, a list or a record. A call whose input breaks a check gets a refusal in place of a value. This check of a staffing rating function refuses a payroll under $1,000:
The function checks every input before it calculates.
Once each check passes, every calculation gives a value.
A process that calls the function reads a refusal with a code as the
Declined case of the result.
Related
- Records, Steps and calculations and Rules in the language reference give each form.
- Refusals lists the fields of a refusal and the order of the checks.
- Modules shows how a process calls a function.
- Guarantees states what the check proves about a function.