E07560: must be an Integer with a value greater than zero
What went wrong
An Integer value is required to be greater than zero (positive) in this context.
Worked examples
Compilable examples demonstrating this error and the correct fix:
- ek9 -q 125 (How do I use head, tail, and skip to limit streams in EK9?)
How to fix it
- Use positive Integer value (> 0)
Common causes
- Zero value where positive required
- Negative value where positive required
- Array size, count, or repetition count
See also
Examples
Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.
Fails with E07560: must be an Integer with a value greater than zero
#!ek9 defines module error.e07560.bad defines function firstOnes() <- rtn as List of String: List() //head of nothing makes no sense cat ["last", "first"] | head 0 > rtn
Fixed: Use a count of one or more
#!ek9 defines module error.e07560.good defines function firstOnes() <- rtn as List of String: List() cat ["last", "first"] | head 1 > rtn
Questions and answers
These Q&A entries show E07560 and its fix: