# Size() is returning the max size of the ulong and not the String(8192) control - ?!?

**URL:** <https://clarionhub.com/t/size-is-returning-the-max-size-of-the-ulong-and-not-the-string-8192-control/8404>\
**Category:** questions\
**Tags:** language\
**Created:** [July 21, 2025, 3:07pm UTC](https://clarionhub.com/t/size-is-returning-the-max-size-of-the-ulong-and-not-the-string-8192-control/8404 "2025-07-21T15:07:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RchdR](https://clarionhub.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@RchdR](https://clarionhub.com/u/RchdR)\
**Post date:** [July 21, 2025, 3:07pm UTC](https://clarionhub.com/t/size-is-returning-the-max-size-of-the-ulong-and-not-the-string-8192-control/8404/1 "2025-07-21T15:07:21Z")

</div>

Size() is returning the max size of the ulong and not the String(8192) control - ?!?

Any ideas how this is even possible? Its not a coding error.

TIA

---

<div class="post-metadata">

**Author:** ![jslarve](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/e480ec/32.png) [@jslarve](https://clarionhub.com/u/jslarve)\
**Post date:** [July 21, 2025, 3:16pm UTC](https://clarionhub.com/t/size-is-returning-the-max-size-of-the-ulong-and-not-the-string-8192-control/8404/2 "2025-07-21T15:16:41Z")

</div>

Although it might not be a coding error, can you show how it’s declared and how you’re getting the string?

If you’re dealing with a &STRING reference, perhaps you are unintentionally setting the size component of the reference variable.

BTW, If you are receiving the string from a non-Clarion source (or just by ADDRESS), you need to explicitly tell it what the size is.

e.g.

` MyStringRef &= ADDRESS(SomeStringBuffer) & ':' & BufferSize`

---

<div class="post-metadata">

**Author:** ![RchdR](https://clarionhub.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@RchdR](https://clarionhub.com/u/RchdR)\
**Post date:** [July 21, 2025, 3:30pm UTC](https://clarionhub.com/t/size-is-returning-the-max-size-of-the-ulong-and-not-the-string-8192-control/8404/3 "2025-07-21T15:30:12Z")

</div>

Its stopped doing it now, and is showing the correct value. 🫩

Its a global string declared in the dct globals, no reference is ticked, its just

```auto
glo:stringVar string(8192)
Glo:buffersize = size(glo:stringVar) - 2

```
