Re: 4gl RDS 7,2 on hp-ux 10.20 -- string handling errors
Posted in 1998
Sean Kelsey wrote: > > Well, its a shot in the dark, but... > > Example 1 > if a_string = 200 characters > and b_string = 200 characters > the following LET statements may produce problems > > LET a_string = 'Some data to be displayed somewhere' > LET b_string = 200 SPACES > LET a_string = b_string[1,22], a_string [SNIP] > Thus, breaking the boundaries of the original string length causing all > sorts of problems in the stack or heap where the variables have been > declared. add the CLIPPED clause to the last statement to give:- [SNIP] If this happens then it is a bug in popquote() in the 4GL library. 4GL uses a stack model for processing and an assignment of a string, even a concatenated string as above, results in the resulting concatenated string being on top of the stack and a popquote( a_string, 200 ) being executed which will copy 200 characters from the object on top of the stack into a_string, padding as needed, and then pop the stack pointer. If this is bombing it is definitely a bug. Art S. Kagel