DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding a single value

Hello,

 

I'm trying to round a variable that contains a single value to 1 decimal place in my script. I found this function but it appears to be only for channels of values:

 

Command: ChnRound

 

How can I round a single value?

 

0 Kudos
Message 1 of 2
(2,359 Views)
Option Explicit  'Forces the explicit declaration of all the variables in a script.

Dim number
number = 3.14159265359
Call LogFileWrite("Before: " & number)
number = Round(number, 1)
Call LogFileWrite("After: " & number)
0 Kudos
Message 2 of 2
(2,345 Views)