- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a line like this:
STRUCT(2)%VAR = 1
I use fpp to make the code a little more readable with
#define VAR STRUCT(2)%VAR
and now the code is
VAR = 1
The preprocessor expands this to the full line and everything works fine.
However, when I am debugging, I can no longer hold the cursor over "VAR" and see the value in a popup, nor can I put "VAR" in a watch window. Is there a way to have the debugger know about expanding "VAR" like the preprocessor does?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No. Preprocessing is simply a textual substitution that occurs before the compiler is run. There is no way to inform the debugger about it.
You might want to look into the ASSOCIATE construct for this purpose. For example:
associate (VAR => STRUCT(2)%VAR) VAR = 1 ... end associate
The debugger can see VAR in this case.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page