Skip to content

Commit 63ff11b

Browse files
Merge pull request #271374 from jonburchel/2024-04-05-merge-public-pr-121297
2024 04 05 merge public pr 121297
2 parents e6c334f + 47b7dd0 commit 63ff11b

File tree

1 file changed

+31
-20
lines changed

1 file changed

+31
-20
lines changed

articles/data-factory/control-flow-expression-language-functions.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -324,14 +324,14 @@ These functions are useful inside conditions, they can be used to evaluate any t
324324
| Math function | Task |
325325
| ------------- | ---- |
326326
| [add](control-flow-expression-language-functions.md#add) | Return the result from adding two numbers. |
327-
| [div](control-flow-expression-language-functions.md#div) | Return the result from dividing two numbers. |
327+
| [div](control-flow-expression-language-functions.md#div) | Return the result from dividing one number by another number. |
328328
| [max](control-flow-expression-language-functions.md#max) | Return the highest value from a set of numbers or an array. |
329329
| [min](control-flow-expression-language-functions.md#min) | Return the lowest value from a set of numbers or an array. |
330-
| [mod](control-flow-expression-language-functions.md#mod) | Return the remainder from dividing two numbers. |
330+
| [mod](control-flow-expression-language-functions.md#mod) | Return the remainder from dividing one number by another number. |
331331
| [mul](control-flow-expression-language-functions.md#mul) | Return the product from multiplying two numbers. |
332332
| [rand](control-flow-expression-language-functions.md#rand) | Return a random integer from a specified range. |
333333
| [range](control-flow-expression-language-functions.md#range) | Return an integer array that starts from a specified integer. |
334-
| [sub](control-flow-expression-language-functions.md#sub) | Return the result from subtracting the second number from the first number. |
334+
| [sub](control-flow-expression-language-functions.md#sub) | Return the result from subtracting one number from another number. |
335335

336336
## Function reference
337337

@@ -1398,34 +1398,46 @@ And returns this result: `"https://contoso.com"`
13981398

13991399
### div
14001400

1401-
Return the integer result from dividing two numbers.
1402-
To get the remainder result, see [mod()](#mod).
1401+
Return the result of dividing one number by another number.
14031402

14041403
```
14051404
div(<dividend>, <divisor>)
14061405
```
14071406

1407+
The precise return type of the function depends on the types of its parameters &mdash; see examples for detail.
1408+
14081409
| Parameter | Required | Type | Description |
14091410
| --------- | -------- | ---- | ----------- |
14101411
| <*dividend*> | Yes | Integer or Float | The number to divide by the *divisor* |
1411-
| <*divisor*> | Yes | Integer or Float | The number that divides the *dividend*, but cannot be 0 |
1412+
| <*divisor*> | Yes | Integer or Float | The number that divides the *dividend*. A *divisor* value of zero causes an error at runtime. |
14121413
|||||
14131414

14141415
| Return value | Type | Description |
14151416
| ------------ | ---- | ----------- |
1416-
| <*quotient-result*> | Integer | The integer result from dividing the first number by the second number |
1417+
| <*quotient-result*> | Integer or Float | The result of dividing the first number by the second number |
14171418
||||
14181419

1419-
*Example*
1420+
*Example 1*
14201421

1421-
Both examples divide the first number by the second number:
1422+
These examples divide the number 9 by 2:
14221423

14231424
```
1424-
div(10, 5)
1425-
div(11, 5)
1425+
div(9, 2.0)
1426+
div(9.0, 2)
1427+
div(9.0, 2.0)
14261428
```
14271429

1428-
And return this result: `2`
1430+
And all return this result: `4.5`
1431+
1432+
*Example 2*
1433+
1434+
This example also divides the number 9 by 2, but because both parameters are integers the remainder is discarded (integer division):
1435+
1436+
```
1437+
div(9, 2)
1438+
```
1439+
1440+
The expression returns the result `4`. To obtain the value of the remainder, use the [mod()](#mod) function.
14291441

14301442
<a name="encodeUriComponent"></a>
14311443

@@ -2366,8 +2378,7 @@ And return this result: `1`
23662378

23672379
### mod
23682380

2369-
Return the remainder from dividing two numbers.
2370-
To get the integer result, see [div()](#div).
2381+
Return the remainder from dividing one number by another number. For integer division, see [div()](#div).
23712382

23722383
```
23732384
mod(<dividend>, <divisor>)
@@ -2376,7 +2387,7 @@ mod(<dividend>, <divisor>)
23762387
| Parameter | Required | Type | Description |
23772388
| --------- | -------- | ---- | ----------- |
23782389
| <*dividend*> | Yes | Integer or Float | The number to divide by the *divisor* |
2379-
| <*divisor*> | Yes | Integer or Float | The number that divides the *dividend*, but cannot be 0. |
2390+
| <*divisor*> | Yes | Integer or Float | The number that divides the *dividend*. A *divisor* value of zero causes an error at runtime. |
23802391
|||||
23812392

23822393
| Return value | Type | Description |
@@ -2386,13 +2397,13 @@ mod(<dividend>, <divisor>)
23862397

23872398
*Example*
23882399

2389-
This example divides the first number by the second number:
2400+
This example calculates the remainder when the first number is divided by the second number:
23902401

23912402
```
23922403
mod(3, 2)
23932404
```
23942405

2395-
And return this result: `1`
2406+
And returns this result: `1`
23962407

23972408
<a name="mul"></a>
23982409

@@ -2407,7 +2418,7 @@ mul(<multiplicand1>, <multiplicand2>)
24072418
| Parameter | Required | Type | Description |
24082419
| --------- | -------- | ---- | ----------- |
24092420
| <*multiplicand1*> | Yes | Integer or Float | The number to multiply by *multiplicand2* |
2410-
| <*multiplicand2*> | Yes | Integer or Float | The number that multiples *multiplicand1* |
2421+
| <*multiplicand2*> | Yes | Integer or Float | The number that multiplies *multiplicand1* |
24112422
|||||
24122423

24132424
| Return value | Type | Description |
@@ -2417,7 +2428,7 @@ mul(<multiplicand1>, <multiplicand2>)
24172428

24182429
*Example*
24192430

2420-
These examples multiple the first number by the second number:
2431+
These examples multiply the first number by the second number:
24212432

24222433
```
24232434
mul(1, 2)
@@ -2878,7 +2889,7 @@ And returns this result: `"{ \\"name\\": \\"Sophie Owen\\" }"`
28782889

28792890
### sub
28802891

2881-
Return the result from subtracting the second number from the first number.
2892+
Return the result from subtracting one number from another number.
28822893

28832894
```
28842895
sub(<minuend>, <subtrahend>)

0 commit comments

Comments
 (0)