Question
· Jul 3, 2017

What is the size of Caché ObjectScript variable?

Good day, I would like to find out the size of Caché ObjectScript variable in order to guarantee that my program will not leak, equally in terminal and Caché globals.  For example how huge number I can store in that variable ? And what happen in Caché when variable will leak ? How is this behavior treated? (how much memory is reserved for common variable?)

Thanks  in advance for your answers.

Discussion (2)0
Log in or sign up to continue

Although Caché does have a %DataTypes layer for SQL, the database engine itself is purely based on globals, which is losely typed.

Thus, what I can say for you is:

Local variables (memory) is by default around 32 kilobytes, you can upgrade this amount up to 50x.

So, straight from the documentation:
 

Caché supports two maximum string length options:

  • The traditional maximum string length of 32,767 characters.

  • Long Strings maximum string length of 3,641,144 characters.

Globals can go way beyond, since it's persisted.

How huge a number can go? I suppose you're talking about floating precision.

This might help you.

And this explains about how Caché manages variables.

Caché also provides you the possibility to redefine the memory allocation size for the context process.