So cool, that was it
Thanks for the help
---------------------------------------------
Scott Piehn
JCWIFI.com Division Manager
Computer Dynamics
451 W. South St
Freeport, IL 61032
V 815.233.2641
F 815.233.6225
E [email protected]
----- Original Message -----
From: "Christopher Sweeney" <[email protected]>
To: "InterMapper Discussion" <[email protected]>
Sent: Tuesday, November 24, 2009 10:17 AM
Subject: Re: [IM-Talk] Custom Probe - Format output
Scott Piehn wrote:
I Apologize for my lack of knowledge on programming.
Following is what I have. Displays on a single line
BytesRF, $WLANBytesR >= 1024*1024*1024 ? sprintf("%.2f GB", $WLANBytesR
/ 1024*1024*1024) :
$WLANBytesR >= 1024*1024 ? sprintf("%.2f MB", $WLANBytesR / 1024*1024) :
$WLANBytesR >= 1024 ? sprintf("%.2f KB", $WLANBytesR / 1024) :
sprintf("%d B", $WLANBytesR), CALCULATION, ""
If correctly gives the KB, MB, GB base on size of WLANBytesR, but
doesn't actually do the calculation. ex
Origional Value = 77862289 (of WLANBytesR)
Displayed with above = 77862289.00 MB (is BytesRF)
Would like = 74.26 MB
Can someone point of what I am missing to get it to do the math
I think you need parens around 1024*1024*1024 and 1024*1024 when dividing:
BytesRF, $WLANBytesR >= 1024*1024*1024 ? sprintf("%.2f GB", $WLANBytesR
/ (1024*1024*1024)) : $WLANBytesR >= 1024*1024 ? sprintf("%.2f MB",
$WLANBytesR / (1024*1024)) : $WLANBytesR >= 1024 ? sprintf("%.2f KB",
$WLANBytesR / 1024) : sprintf("%d B", $WLANBytesR), CALCULATION, ""
-- Christopher
--
=================================
Christopher L. Sweeney
Director of Software Development
Dartware, LLC
+1 603 643-9600 x104
http://dartware.com/
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [email protected]
____________________________________________________________________
List archives:
http://www.mail-archive.com/intermapper-talk%40list.dartware.com/
To unsubscribe: send email to: [email protected]