How to cast a data type?

0 votes
asked Feb 9, 2022 in Grammars by jlawhead (120 points)
The file format I'm working with (NITF) stores the record count as ASCII to represent a 3-digit number between 000-999.  Is there a way to transform that value to the corresponding integer so I can use it to repeat the record structure?

1 Answer

0 votes
answered Feb 17, 2023 by andreas (3,500 points)
This is actually a hidden feature: simply create a string element (name without spaces!) for the number, then use its name as Repeat/max count. The string is treated as a decimal number.
...