IonicWind Software

IWBasic => General Questions => Topic started by: aurelCB on January 24, 2011, 10:32:29 AM

Title: Is local Istring limited?
Post by: aurelCB on January 24, 2011, 10:32:29 AM
Hi...
I create local (in subrutine) ISTRING variable as:
ISTRING LongString[32766]
and recive warnig:
Warning: local data size 33628 bytes in subroutine ....
What's that mean ???
Is Istring type limited in size as local variable or i do something wrong?

all best...
Aurel
Title: Re: Is local Istring limited?
Post by: Brian on January 24, 2011, 12:36:30 PM
Aurel,

Have a look at the help file - Language > Subroutines. You will have to adjust the size
allowed for local variables in the Executable Options > Advanced section

You appear to be filling up the allowed space for local variables

Brian
Title: Re: Is local Istring limited?
Post by: aurelCB on January 24, 2011, 01:25:00 PM
Thanks Brian... ;)
I will see this...
by the way when i set local ISTRING with size of 16384 then there is no problem.
Probably you right.
but hmm...
I click advanced in Build option and there is :
Stack size : 1048576
Stack commit size : 32768

ok ,i will try few option
Title: Re: Is local Istring limited?
Post by: aurelCB on January 25, 2011, 06:09:58 AM
Hi people...
So what i must increase Stack size or Stack commit size?
Title: Re: Is local Istring limited?
Post by: Egil on January 25, 2011, 06:29:22 AM
According to the user manual you have to increase the stack commit size.

QuoteThe default stack commit size is set to 32K and indicates how large the size of the local variables in any one subroutine can be.  If you exceed this size the compiler will generate a warning message so you can adjust as needed.
Title: Re: Is local Istring limited?
Post by: Brian on January 25, 2011, 07:37:26 AM
The stack commit size is set to 32768 (32k). You had already assigned 32766 bytes in one definition. If you
have any more variable defs in there, you will need to add them to your large ISTRING value, then add a
bit more to be safe, and make that the new stack commit size

Brian
Title: Re: Is local Istring limited?
Post by: aurelCB on January 25, 2011, 07:40:43 AM
Do you mean like  65536  ?
Title: Re: Is local Istring limited?
Post by: Brian on January 25, 2011, 07:54:20 AM
I suppose there can be no harm in doubling it - after all, 64k is small fry in memory
terms nowadays. And it will be released when the program finishes, anyway

Brian
Title: Re: Is local Istring limited?
Post by: aurelCB on May 26, 2011, 04:54:33 AM
Hi all... :)
I know that this topic is little bit old but problem is same...

Hmmm i increase stack comit size to 65536 and i still recive same warnings?
Is this normal ?
Or is better option that i use pointer insted of Istring?

any suggestion....
Title: Re: Is local Istring limited?
Post by: REDEBOLT on May 26, 2011, 02:39:05 PM
aurel,

Could you make your istring global?

I don't think global variables affect stack size.

Title: Re: Is local Istring limited?
Post by: LarryMc on May 26, 2011, 02:46:53 PM
I do both:
I use
pointer= NEW(...and in one place(the visual designer)
I have a
global istring buffer[100000]because I was comfortable in doing it.

LarryMc
Title: Re: Is local Istring limited?
Post by: aurelCB on May 27, 2011, 02:03:40 AM
Hi...
Yes i can use Istring as global..
Larry maby is better to use pointer ,ok i will try with pointer

thanks...