Tag Archives: FormatAddress

MAXSTRLEN on unlimmited Text variables

It has probably been blogged or posted about, but I must have missed it.

While recording a How Do I video for the Address Integration Pattern I noticed that you cannot declare an address array without declaring the length.

Here is why:

If I declare an address array without specifying the length I get this error:

Arithmetic operation resulted in an overflow.

2014-12-02_21-41-47

Ambiguous…

And this is the code:

2014-12-02_21-42-17

Since MAXSTRLEN returns 2147483647, this function blows up.

Here is proof:

2014-12-02_21-47-47

The max value for integer (int32) is 2147483647. Adding 1, is not possible.