DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Command: Signif

Display all  Hide all

Command: Signif

Rounds the value of the first parameter mathematically to the number of significant places specified in the second parameter.

ReturnValue = Signif(Value, Value)

Input Parameters

Value Specifies the value to round.
Value Specifies the number of significant places.

Return Parameters

ReturnValue The return value is a Floating-point number type.

Example

The following example rounds numbers mathematically to two significant places.

VBScriptPython

 

Dim Result
Result = Signif(22499, 2)  ' =>  22000
Result = Signif(22501, 2)  ' =>  23000
Result = Signif(22500, 2)  ' =>  22000
Result = Signif(23500, 2)  ' =>  23000
Result = Signif(23.499, 2) ' =>  23
Result = Signif(23.499, 3) ' =>  23.5
Result = Signif(23.449, 4) ' =>  23.45

Related Topics

ChnRound

Was this information helpful?