SDIV function

Syntax

SDIV (string.number.1, string.number.2 [ ,precision])

Description

Use the SDIV function to divide string.number.1 by string.number.2 and return the result as a string number. You can use this function in any expression where a string or string number is valid, but not necessarily where a standard number is valid, because string numbers can exceed the range of numbers which standard arithmetic operators can handle. Either string number can be a valid number or a string number.

precision specifies the number of places to the right of the decimal point. The default precision is 14.

If either string number contains nonnumeric data, an error message is generated and 0 is used for that number. If either string number evaluates to the null value, null is returned.

Example

X = "1"
Y = "3"
Z = SDIV (X,Y)
ZZ = SDIV (X,Y,20)
PRINT Z
PRINT ZZ

This is the program output:

0.33333333333333
0.33333333333333333333