Kbase P31734: Comments are Ignored in Include File References
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
SYMPTOM(s):
Comments are ignored in include file references
For example:
/* main.p */
{testinc.i &test = "test"
/* &test2 = "test2" */
&test3 = "test3"}
/* testinc.i */
message "{&test}" skip
"{&test2}" skip
"{&test3}"
view-as alert-box info buttons OK.
Results in a message of
test
test2
test3
In addition, compiling the code with the PREPROCESS option results in:
message "test" skip
"test2" skip
"test3"
view-as alert-box info buttons OK.
CAUSE:
Expected behavior - it ignores everything except for the valid tokens expected between the include braces. e.g. = and &.
So in the case above:
[1] it get the include file name - testinc.i
[2] it finds the & and grabs the following token 'test'
[3] it ignores everything until it finds an '='
[4] it looks for '"'
[5] grabs everything it finds until it gets another '"' - here 'test'
[6] it ignores everything until it finds & again - so the '/*' is skipped
does the same as [2]-[5] again
[8] it ignores everything until it finds '&' - again. '*/' is skipped
etc.
FIX:
No fix required, product is behaving as designed