Temperatures
You can declare thermal instructions in your recipes using the ^ symbol.
Gram supports two formats to accommodate both precise baking requirements and qualitative stovetop cooking: Exact temperatures and Semantic temperatures.
Exact temperatures
Section titled “Exact temperatures”Exact temperatures specify a numeric value accompanied by a recognized unit: C or F, case-insensitive, with or without a degree symbol (°C/°F). The compiler normalizes all valid variations to the canonical °C/°F format in its output.
Just like with ~timers, you can assign an appliance or process name to a temperature to help renderers and tools highlight equipment setup at a glance:
Semantic temperatures
Section titled “Semantic temperatures”For stovetop cooking, searing, or subjective heat levels where exact degree values are impractical, you can write qualitative free-text strings:
Cooking mode and notes
Section titled “Cooking mode and notes”Add a parenthetical note right after the closing brace to specify the oven mode, measurement point, or cooking condition. This works on both exact and semantic temperatures, named or unnamed, just like ingredient preparation notes:
The note is always shown next to the temperature on screen and in print, and is preserved as written in your recipe’s language without being parsed.
As with ingredients and cookware, keep the opening ( attached to } on the same line: with a space (^{350°F} (preheated)), the parentheses remain ordinary step text.
Error handling
Section titled “Error handling”Only Celsius and Fahrenheit temperature scales are supported. The compiler emits structured warnings when encountering malformed temperature values:
MISSING_UNIT: Triggered when a numeric temperature is given without an explicit unit (e.g.^{200}).INVALID_UNIT: Triggered when an unsupported unit is provided (e.g.^{200K}). The compiler preserves the raw input as written.