Skip to main content
Solved

counter limit

  • January 11, 2024
  • 4 replies
  • 42 views

alc33
Contributor
Forum|alt.badge.img+11

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!

Best answer by david_r

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • Best Answer
  • January 11, 2024

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.


geomancer
Evangelist
Forum|alt.badge.img+59
  • Evangelist
  • January 12, 2024

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

image


david_r
Celebrity
  • January 12, 2024

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.


alc33
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • January 16, 2024

@david_r​ Thank you for your answer !