Author Topic: Const variables mouse over  (Read 244 times)

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Const variables mouse over
« on: May 10, 2019, 08:20:50 am »
Hello,
if I define a macro in the code I can see the value in a tooltip (attachment 1).

Can I also see the value if I use a const variable instead of #define?

I tried to set "Evaluate expression under cursor" in debugger settings, but it works only during debugging.

Code: [Select]
#include <iostream>

using namespace std;
#define VARIABLE_DEFINE 222
const int VARIABLE_CONST = 222;
int test;

int main()
{
  cout << "Hello world!" << endl;
  test = VARIABLE_DEFINE;
  test = VARIABLE_CONST;

  return 0;
}
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2379
Re: Const variables mouse over
« Reply #1 on: May 11, 2019, 05:04:00 pm »
I do not think that the cc plugin (the plugin providing tool tips) can do this at the moment...

Offline zdena

  • Multiple posting newcomer
  • *
  • Posts: 21
Re: Const variables mouse over
« Reply #2 on: May 11, 2019, 06:27:09 pm »
@BlueHazzard: Thank you.
Windows 10 64b
Arduino 1.8.5 with (modified) Arduino Builder 1.4.5 through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.