News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Const variables mouse over

Started by zdena, May 10, 2019, 08:20:50 AM

Previous topic - Next topic

zdena

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.


#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.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English

BlueHazzard

I do not think that the cc plugin (the plugin providing tool tips) can do this at the moment...

zdena

Windows 10 64b
Arduino 1.8.11 with (modified) Arduino Builder 1.5.1z through (modified) C::B 17.12 32b
Occasional C(C++) hobbyist almost only for Arduino.
Czechia - please pardon my English