1. The example's output is wrong. It should be:

    >print(string.format("%2$d, %1$d, %d", 13, 17))

    17, 13, 17 

  2. The example's output is wrong. It should be:

    >print(string.format("%2$d, %1$d, %d", 13, 17))

    17, 13, 17