>Thank you Hilmar for this improvment ! I suppose that BINTOC will not preserve the order for sorting (at least, the doc doesn't say that it preserves the order) - but that is probably unimportant in my case.
I think it will, because of the binary representation. I am not sure about negative numbers.
But you must be careful to use only "Machine" for the collation sequence. "Machine" is already the default, but you may have changed this.
bintoc() will accept the entire range of a 4 byte integer, i.e., from minus to plus 2 thousand million, approximately.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)