Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsStandard library · rule

syntax.percent_ambiguous

A number, % and a value with no spaces could be a percentage or a remainder.

Area 19, Standard library; not declinable; the next step is usually the agent's.

A number touching % is a percentage, 20%, and the remainder (area 3) is written with spaces, 20 % 3, as the formatter writes every binary operator. With a number or a name touching the % on both sides, either could be meant, so neither is guessed.

example
type BoxCount = Int {}/// The cakes left over when twenty are packed in boxes of three.function twenty_in_threes() -> BoxCount {    return BoxCount(20%3)}
jadpo checkcheck failed: 1 error, 1 file

error 20%3 could be 20% 3 or 20 % 3

--> main.jadpo:5:21

  |5 |     return BoxCount(20%3)  |                     ^^^^ a percentage or a remainder
reason
A number touching % is a percentage, 20%, and the remainder is written with spaces, 20 % 3, as the formatter writes every binary operator; with 3 touching the % too, either could be meant.
next
Write 20 % 3 for the remainder, or put the percentage 20% apart from what follows it (agent)
rule
syntax.percent_ambiguous
help
https://jadpo.dev/docs/errors/syntax.percent_ambiguous

Adding a percentage to money doesn't compile either, by area 3's type.arithmetic_operand, since it could mean the price raised by a fifth or a fifth of something else; the fix writes both:

example
type CakePrice = Money {    currency: Currency.gbp}/// A cake's price with VAT added.function with_vat(price: CakePrice) -> CakePrice {    return CakePrice(price + 20%)}
jadpo checkcheck failed: 1 error, 1 file

error CakePrice and a percentage can't be added: it could mean two things

--> main.jadpo:7:22

  |7 |     return CakePrice(price + 20%)  |                      ^^^^^^^^^^^ an amount and a percentage
reason
price + 20% could mean the amount raised by 20% of itself, or 20% of some other amount; the standard operator table refuses it rather than guess. A percentage scales money by *.
next
Write price * 120%, or price + price * 20%, whichever is meant (agent)
rule
type.arithmetic_operand
help
https://jadpo.dev/docs/errors/type.arithmetic_operand

Markdown for agents: /docs/errors/syntax.percent_ambiguous.md.Built from Jadpo main at aee2e8f.