Skip to main content

Hi!

Do you know if Counter has a limit on the number that are generated (maximum lentgh)? I suppose there is not but I don't find this information anywhere.

Thank you!

It depends on the version of FME, it's either a signed 32-bit integer (verified with FME 2020, 64-bit) or a signed 64-bit integer (verified with FME 2023).

64-bit signed integers have a range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

32-bit signed integers have a range of -2,147,483,648 to 2,147,483,647.


Interesting! I never realized I could set negative numbers with the Counter transformer 😀

image


Interesting! I never realized I could set negative numbers with the Counter transformer 😀

image

Also be careful if you count past the positive upper limit, FME will silently wrap around to negative numbers and continue counting, without any warning.

Example from FME 2020 which uses a 32-bit counter:

imageThis is pretty much expected behavior for most integer implementations, but it might be something to look out for, at least on older FME versions if you expect to count past 2 billion.


@david_r​ Thank you for your answer !


Reply