Home » Community » Newbie corner » Search for constant and show it....
Search for constant and show it.... [message #36178] |
Wed, 09 May 2012 11:00 |
Wolfgang
Messages: 146 Registered: November 2011 Location: Germany
|
Experienced Member |
|
|
Hi,
I've got an untypical task, I have a namespace with a amount of constants (const uint16 ...) and for debugging reasons I want to search for the name of the constant by their value:
For better understanding:
namespace CanMethod
{
const uint16 PING_REQUEST = 1001;
const uint16 PING_REPLAY = 1002;
const uint16 DEVICE_STATE_REQUEST = 1003;
const uint16 DEVICE_STATE_REPLAY = 1004;
}
(the real list is larger than the examle...)
I get the value "1003" and now I want to get the String "DEVICE_STATE_REQUEST" - is this possible without to create a complete new list with all constants?
|
|
|
Goto Forum:
Current Time: Sun May 12 06:17:07 CEST 2024
Total time taken to generate the page: 0.02386 seconds
|