E07600: program arguments are limited to a finite range of EK9 built in types
What went wrong
A program argument uses a type that isn't supported for command-line arguments.
Worked examples
Compilable examples demonstrating this error and the correct fix:
- ek9 -q 947 (Which types are allowed for typed program arguments in...)
Supported program argument types
- String, Integer, Float, Boolean
- Date, Time, DateTime
- List of above types
How to fix it
- Use supported built-in types for program arguments
- Parse custom types from String inside program
The [EXAMPLE] section below shows a record as a program argument, and the program taking built-in types and building the record from them.
Common causes
- Custom type as program argument
- Complex type without command-line representation
See also
Examples
Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.
Fails with E07600: program arguments are limited to a finite range of EK9 built in types
#!ek9 defines module error.e07600.bad defines record Person name <- String() age <- Integer() default operator ? defines program //The command line holds text, which EK9 converts to its built-in types only Register() -> person as Person stdout <- Stdout() stdout.println("registered")
Fixed: Take built-in types and build the record
#!ek9 defines module error.e07600.good defines record Person name <- String() age <- Integer() Person() -> personName as String personAge as Integer this.name :=: personName this.age :=: personAge default operator ? defines program //Take built-in types, and build the record from them Register() -> name as String age as Integer stdout <- Stdout() person <- Person(name, age) stdout.println(`registered: ${person.name}`)
Questions and answers
These Q&A entries show E07600 and its fix:
Found a problem?
If EK9 reported E07600 for a program you think is valid, or did not report it where it should have, use the compiler form with the smallest program that shows it. If this page is wrong or unclear, use the documentation form. Both are at github.com/ek9lang/ek9-issues.