R/MRatCalcpowered by RiX

RiX walkthrough 9 f

Diagnostics and tests

Warnings, tracing, and test helpers.

Orientation

Diagnostics turn warnings, stops, traces, and tests into structured values. Start with small test cases before adding tracing to a larger calculation.

Start with a small diagnostic so you can see its result before adding tracing to a larger program.

A worked example

Runnable RiX

The final line is the displayed value; the earlier lines set up the experiment. Keep the setup visible so you can tell whether a name, a cell, or a collection is being reused when the expression changes.

Read the result

Some diagnostic capabilities are best viewed in a script or CLI host; RatCalc keeps their invocation explicit.

Change the diagnostic message and compare its displayed value with an ordinary calculation.

Keep going

Continue with Verified rule for a task that uses diagnostic helpers.