§ I
Veritas v1.5.0 supports compile-time dimensional analysis. You can define base dimensions and units, and then use them as generic type parameters.
Define dimension 'Length'.
Define unit 'meter' for 'Length' with symbol "m".
/* Derived units support arithmetic expressions */
Define unit 'velocity' as 'meter' divided by 'second'.
/* Usage in declarations */
Create 'dist' as a double<meter> with value 100.0.
'kilogram' plus 'meter'.§ II
Close the gap between code and documentation. Export variables to a report manifest using the Export statement.
Create 'result' as a double with value 99.9.
Export 'result' as 'Final Precision' for report.
In your report.vtex (LaTeX) template, use \veritas{Final Precision} to inject the value automatically.
veritas report --template=my_report.vtex
§ III
Include Veritas source files or C headers. Veritas files (.ver) are parsed recursively, while C headers are injected into the generated output.
Include 'units.ver'.
Include the library 'stdio.h'.