Re: Parsing problem using constants
- Posted by zebra Apr 14, 2011
- 1418 views
zebra said...
When using constants like MB_YESNO in messagebox the parser does not recognize it and reports an error. If I substitute the value 4 in its place it works ok. I then tried replacing MB_YESNO from a different library ( my own constants ). It still failed. I changed public to global It still failed. I tried substituting msgbox.e library with ver3.11 msgbox.e library. It still failed. This seems to indicate something is wrong with the parsing of constants when it is being used inside of a function or procedure.
I have figured out what is causing my problem. I am including msgbox.e from another file via the PUBLIC INCLUDE ( scope ) If you try to use a PUBLIC CONSTANT from a PUBLIC INCLUDE file the parser does not see it. But you have use the NAMESPACE scope ( EXAMPLE : msgbox:MB_YESNO then the parser doesn't error out and my program works properly.