Divide$ – Floating Point Calculation Function**






Description

The Divide$ function divides two strings representing floating point numbers.

Usage

As only integers are supported numbers in WinTask, calculation on floating point numbers is done using their string representation.

Syntax

res$=Divide$(a$,b$[,rc])

Parameters

a$, b$ are the strings representing the two floating numbers to be divided.

rc, optional numeric return code.

Values are:

  • 0 if the division is successful
  • 1 invalid operation because the parameters are incorrect (for instance, the string can’t be considered a number)
  • 2 if operation causes an overflow
  • 3 if division by zero is attempted

Return Value

res$, string representing a$/b$.

Examples

Divide$("13.56","145.789") 'gives "0.09"
Divide$("-45.678","34.8976") 'gives "-1.31"
#Precision=3
Divide$("567.34257","45.343") 'gives "12.512"