syntax.increment_operator
Variable changed with ++, -- or +=.
Area 3, Logic; not declinable; the next step is usually the agent's.
A var mut changes with =, and a named type converts the result back with its constructor.
type Count = Int { min: 0}function bumped(count: Count) -> Count { var mut next: Count = count next++ return next}
error Jadpo writes next = next + 1, not next++
--> main.jadpo:7:9
|7 | next++ | ^^ write `next = next + 1`
- reason
++,--,+=,-=and*=change a variable in place in JavaScript, Java, C#, Go, Kotlin, Swift and Python; Jadpo assigns avar mutwith=, and a named type converts the result back with its constructor, as incount = Count(count + 1).- next
- Write
next = next + 1(agent) - rule
- syntax.
increment_ operator - help
- https://jadpo.
dev/docs/errors/syntax. increment_ operator
Markdown for agents: /docs/errors/syntax.increment_operator.md.Built from Jadpo main at aee2e8f.