Re: 4GL: space allocation for temp. strings
Posted in 1994
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
David Shuman (essayes@telerama.lm.com) wrote: : Hello All, : The manual says that 4GL allocates only 512 bytes for "temporary : string storage." Can anyone tell me what exactly occupies this space? I : would guess that the space occupied would equal the sum of the string : lengths assigned to global variables, but in my program this sum is over : 512 bytes and my queries run flawlessly. What puzzles me is that my row- : adding function involves displaying no more string information than the : query function, but the add bombs. Does an INPUT BY NAME fill the 0.5K : allocation in a different manner than does the DISPLAY BY NAME that my : query uses? : Help! : Of course, if there's a way to allocate more than 512 bytes, I'd : be interested in hearing about it.... : -- Don't take this is absolute fact, but what I've heard about this problem is that it only allocates 512 bytes -- to hold passed parameters. Thus, if you are calling several functions that pass quite a few parameters around, you can run out of space to hold them. The ugly solution that I've been forced to use in the past to get around this is to use global variables for some of the parameters. Not exactly textbook programming practice, but it works ... Good luck, Ryan -- /************************************************************** * Ryan McFall * * Dept. of Computer Science * * Michigan State University * * mcfallry@cps.msu.edu * * * * My statments do not reflect the opinions of MSU, * * Heck, they probably don't even make sense! * *************************************************************/