syntax.for_loop
Loop written in another language's form.
Area 3, Logic; not declinable; the next step is usually the agent's.
A loop is for item in items {, without brackets. A counting loop has no Jadpo form, so its error has no edit.
type Stock = Int { min: 0}type OrderLine = Object { needed: Stock}function stock_total(lines: List<OrderLine>) -> Stock { var mut total: Stock = 0 for (const line of lines) { total = Stock(total + line.needed) } return total}
error Jadpo writes for line in lines, not for (const line of lines)
--> main.jadpo:11:9
|11 | for (const line of lines) { | ^^^^^^^^^^^^^^^^^^^^^ write `for line in lines`
- reason
for (const item of items)walks a list in JavaScript and TypeScript,for (item in items)in Kotlin,for (Type item : items)in Java andforeach (var item in items)in C#; Jadpo writesfor item in items {, without brackets.- next
- Write
for line in lines(agent) - rule
- syntax.
for_ loop - help
- https://jadpo.
dev/docs/errors/syntax. for_ loop
Markdown for agents: /docs/errors/syntax.for_loop.md.Built from Jadpo main at aee2e8f.