Units
Units represent measurable quantities such as length, mass, time, temperature, or currency. In Corca, units are attached directly to numbers, variables, and constants. They behave as structured properties rather than plain text, which allows calculations to preserve and propagate units automatically.
Units remain editable and visible in the right panel.
Creating a value with units
You create a unit simply by typing it next to a number:
Units as variable properties
When a variable is assigned a value with a unit, the unit becomes part of the variable definition:
This means:
The unit is stored with the variable
The unit persists across calculations
The unit updates automatically if the value changes
Editing units
Units can be modified directly. Original:
You can also edit the unit from the right panel.
Prefix and postfix units
Units can appear before or after numbers depending on convention.
Type | Example | Typical use |
|---|---|---|
Postfix | Physical quantities | |
Prefix | Currency | |
Postfix temperature | Temperature | |
Mixed expression | Currency arithmetic |
Both forms are recognized automatically.
Multiple values with units
You can use several values with units in a single expression:
Units are preserved during arithmetic.
Units in calculations
Units propagate through mathematical operations:
The result will be computed automatically:
Units with powers
Units can be attached to values that include exponents:
squared quantities
cubic quantities
scientific notation
Units in hints and results
Units are carried through calculations automatically:
Units in imported content
Units are detected automatically when content is pasted.
10kgThe value becomes:
Previous: Inequalities |