Forum Discussion
weikang_Hu_9799
Nimbostratus
Nov 27, 2007Got a negative integer which returned by getLow();
As the structure defined as below . high/low are unsigned integer .
struct Common.ULong64 {
long high;
long low;
};
However, I got a negative integer ..
...
Don_MacVittie_1
Nov 28, 2007Historic F5 Account
Hey Weikang,
That will work just fine except for very large values - which our statistics do generate sometimes.
Try this:
unsigned long myresult_low = (unsigned long)(commonstat[5].getValue().getLow());
unsigned long myresult_high = (unsigned long)(commonstat[5].getValue().getHigh());
unsigned long myresult = (unsigned long)(myresult_high <<32) + (unsigned long)myresult_low;
That will work for any value we can represent, and you won't have to worry about numbers approaching 2 billion.
Don.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
