Passa al contenuto principale

RoundToSigDig

| Structure

RoundToSigDig(dNumber, iSigDigits, var iResolution)

Type

Function

Description

This function takes dNumber and rounds it to iSigDigits significant digits. It also takes iResolution as a variable and returns the corresponding resolution used by the test points grid.

Parameters: 3

dNumber = the number to be rounded.

iSigDigits = the number of significant digits to round to.

iResolution = a variable that gets updated to the IndySoft Resolution value.

Return Value

A number that has been rounded.

Examples

'set up the variables

dNumber = 1.2345

iSigDigits = 3

iResolution = 0

'Get the result

dResult = RoundToSigDig(dNumber, iSigDigits, iResolution)

'display result 1.23

showmessage(dResult)

'display resolution 2

showmessage(iResolution) |