[SOLVED - PEBKAC] - CDEF Removes digits

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
vaiper
Posts: 3
Joined: Thu Feb 26, 2009 2:57 pm

[SOLVED - PEBKAC] - CDEF Removes digits

Post by vaiper »

Hi this might have been already answered somewhere, but searching did not yield any answers..

I have an integer I get via SNMP. It ranges from 0 to 1950000000.

Say the integer returned is 82365000. This represents a frequency of 82.3650 MHz. I have created a CDEF that divides by 1000000, but it effectively removes the "decimals"..meaning it shows up as 82.

Does anyone know how do I avoid this, and instead have it show up as 82.3650?

I guess my answer might be in the CDEFs?
The CDEF I created is very basic:

Code: Select all

cdef=CURRENT_DATA_SOURCE,1000000,/
Last edited by vaiper on Thu Feb 26, 2009 3:23 pm, edited 1 time in total.
vaiper
Posts: 3
Joined: Thu Feb 26, 2009 2:57 pm

Figured it out

Post by vaiper »

I figured it out.

I still used the basic CDEF I had created, but I also defined a new GPRINT:

Code: Select all

%8.4lf MHz
This created a number with 4 digits behind the decimal point, and also put MHz on the end for the final touch :D
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests