[progress Communities] [progress Openedge Abl] Forum Post: Re: Temp Table

  • Thread starter Thread starter smat-consulting
  • Start date Start date
Status
Not open for further replies.
S

smat-consulting

Guest
When working with include-files it is often a good idea to compile the program with preprocess, which shows how the program looks when all include-files and preprocessor variables have been textually replaced before the actual compile. (or with LISTING option, which shows the preprocessors and include references, too, in addition to the replaced text). It looks that you are assigning the value of the temp-table field to a variable (sv_out_string) before you even create a record. I think you should get a compile error, that tt_it record is referenced before it's being read. the assign of the sv_out_string needs to come after the assign of vorigitem... Secondly, I would strongly suggest to use a prefix to all variable names (something like lcVorigItem if inside of a procedure or function, and gcVorigItem if scoped to the whole .p). This is to avoid ambiguity between table columns and variables - you have a vorigitem as both tt-field and variable. I think it would use the variable, but I am not sure, as I started using prefixes many, many years ago, after encountering really hard to find bugs due to such ambiguities. In your case, you are (most likely) assigning a value to the variable, not the tt-field, thus the tt-field remaining with its initial value.

Continue reading...
 
Status
Not open for further replies.
Back
Top