printf icon indicating copy to clipboard operation
printf copied to clipboard

[Neko] 'Invalid field access : length' for positional parameters

Open grepsuzette opened this issue 10 years ago • 0 comments

Hi Michael,

I'm in need of the positional feature (eg "%2$s" for second parameter) and encounter this error on run-time (from the example you gave):

$ neko test.n
Called from ? line 1
Called from Sprintf.hx line 8
Called from de/polygonal/Printf.hx line 603
Called from de/polygonal/Printf.hx line 1037
Uncaught exception - Invalid field access : length

[Sprintf.hx]

import de.polygonal.Printf;
import neko.Lib;

class Sprintf {
    static function main() {
        Lib.println(Printf.format("%s is %d years old, and his name is %1$s", ["Joe", 32]));
    }
}

[build.xhml]

-lib polygonal-printf
-neko test.n
-main Sprintf

Do you have any idea what the problem might be?

Haxe version is 3.1.3 polygonal-printf version is 1,0,2-beta (installed just today using 'haxelib install polygonal-printf')

Thanks for all your hard work!

grepsuzette avatar Jul 07 '15 08:07 grepsuzette