Binary Division Function
Function Name
$divide(intA, intB)
Function Description
Implements the division operation between parameter A and parameter B. Parameters A and B support the following types:
- Numbers
- Local parameters
- Binary operations
Application Scenarios
The binary division function can be used in the following scenarios for API automation:
- Request URL
- Request header
- Request body
- Checkpoint property
- if condition
- for loop interrupt condition
Example
- Request URL
As shown in the following figure, the value of the test parameter in the request URL is the binary division function. Parameters A and B in the function are 100 and 10 respectively.

- Request header
As shown in the following figure, the value of divide in the request header is the binary division function. Parameter A in the function is the binary multiplication function $multiply(1000,100), and parameter B is 10.


- Request body
As shown in the following figure, the binary division function is used in the request body. Parameter A in the function is the binary subtraction operation $subtract(1001,1000), and parameter B is the binary multiplication operation $multiply(10,100).

- Checkpoint property
As shown in the following figure, the target value of the checkpoint property result is the binary division function. Parameter A in the function is the local parameter test, and parameter B is 1. For details about how to set local parameters, see Local Parameters.

- if condition
As shown in the following figure, the target value of the if condition is the binary division function. Parameter A in the function is 100, and parameter B is the environment variable status. For details about how to set environment parameters, see Setting Environment Parameters of an API Script.

- for loop interrupt condition
As shown in the following figure, the target value of the for loop interrupt condition is the binary division function. Parameter A in the function is the local parameter test, and parameter B is 10.

- for loop interrupt condition
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot