pict-section-formeditor 1.0.11 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/_sidebar.md +14 -0
- package/{user-documentation → docs/user-docs}/pict_documentation_topics.json +18 -26
- package/docs/user-docs/solveroperators/add.md +75 -0
- package/docs/user-docs/solveroperators/assign.md +83 -0
- package/docs/user-docs/solveroperators/divide.md +73 -0
- package/docs/user-docs/solveroperators/exponent.md +83 -0
- package/docs/user-docs/solveroperators/expressionbegin.md +61 -0
- package/docs/user-docs/solveroperators/modulus.md +70 -0
- package/docs/user-docs/solveroperators/multiply.md +79 -0
- package/docs/user-docs/solveroperators/nullcoalesce.md +80 -0
- package/docs/user-docs/solveroperators/setconcat.md +67 -0
- package/docs/user-docs/solveroperators/subtract.md +75 -0
- package/example_applications/form_editor/package.json +7 -3
- package/example_applications/form_editor_flex/package.json +7 -3
- package/package.json +8 -8
- package/source/views/PictView-FormEditor-PropertiesPanel.js +6 -0
- /package/{user-documentation → docs/user-docs}/Getting-Started.md +0 -0
- /package/{user-documentation → docs/user-docs}/Groups.md +0 -0
- /package/{user-documentation → docs/user-docs}/Inputs.md +0 -0
- /package/{user-documentation → docs/user-docs}/Sections.md +0 -0
- /package/{user-documentation → docs/user-docs}/Shortcuts.md +0 -0
- /package/{user-documentation → docs/user-docs}/Solver-Expression-Walkthrough.md +0 -0
- /package/{user-documentation → docs/user-docs}/Solver-Expressions-Advanced.md +0 -0
- /package/{user-documentation → docs/user-docs}/Solver-Functions.md +0 -0
- /package/{user-documentation → docs/user-docs}/Solvers.md +0 -0
- /package/{user-documentation → docs/user-docs}/ToC.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/abs.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/aggregationhistogram.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/aggregationhistogrambyobject.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/arrayconcat.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/avg.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/bucketset.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/ceil.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/cleanvaluearray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/cleanvalueobject.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/colorgroupbackground.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/colorinputbackground.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/colorinputbackgroundtabular.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/colorsectionbackground.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/compare.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/concat.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/concatraw.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/cos.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/count.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/countset.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/countsetelements.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/createarrayfromabsolutevalues.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/createvalueobjectbyhashes.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/cumulativesummation.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateadddays.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddhours.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddmilliseconds.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddminutes.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddmonths.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddseconds.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddweeks.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateaddyears.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/datedaydifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/datefromparts.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/datehourdifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/datemathadd.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/datemilliseconddifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateminutedifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/datemonthdifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateseconddifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateweekdifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/dateyeardifference.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/differencearrays.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/disablesolverordinal.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/distributionhistogram.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/distributionhistogrambyobject.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/enablesolverordinal.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/entryinset.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/euler.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/exp.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/findfirstvaluebyexactmatch.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/findfirstvaluebystringincludes.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/flatten.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/floor.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/gaussianelimination.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/generatearrayofobjectsfromsets.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/generatehtmlhexcolor.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/getvalue.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/getvaluearray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/getvalueobject.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/hidesections.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/if.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/intercept.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/iterativeseries.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/join.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/joinraw.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/largestinset.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/leastsquares.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/linest.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/log.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/logvalues.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/match.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/matrixinverse.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/matrixmultiply.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/matrixtranspose.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/matrixvectormultiply.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/max.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/mean.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/median.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/min.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/mode.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/objectkeystoarray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/objectvaluessortbyexternalobjectarray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/objectvaluestoarray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/percent.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/pi.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/polynomialregression.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/predict.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/rad.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/randomfloat.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/randomfloatbetween.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/randomfloatupto.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/randominteger.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/randomintegerbetween.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/randomintegerupto.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/refreshtabularsection.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/resolvehtmlentities.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/round.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/runsolvers.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/setconcatenate.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/setgroupvisibility.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/setsectionvisibility.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/setsolverordinalenabled.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/settabularrowlength.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/setvalue.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/showsections.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sin.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/slice.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/slope.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/smallestinset.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sortarray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sorthistogram.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sorthistogrambykeys.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sortset.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sqrt.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/stdev.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/stdeva.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/stdevp.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/stringcountsegments.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/stringgetsegments.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/subtractingsummation.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/sum.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/tan.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/tofixed.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/unionarrays.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/uniquearray.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/var.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/vara.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/varp.md +0 -0
- /package/{user-documentation → docs/user-docs}/solverfunctions/when.md +0 -0
package/docs/_sidebar.md
CHANGED
|
@@ -17,6 +17,20 @@
|
|
|
17
17
|
- [Reading the Manifest](#/README?id=reading-the-manifest-back)
|
|
18
18
|
- [Architecture](#/README?id=architecture)
|
|
19
19
|
|
|
20
|
+
- User Documentation
|
|
21
|
+
- [Table of Contents](user-docs/ToC.md)
|
|
22
|
+
- [Getting Started](user-docs/Getting-Started.md)
|
|
23
|
+
- [Sections](user-docs/Sections.md)
|
|
24
|
+
- [Groups](user-docs/Groups.md)
|
|
25
|
+
- [Inputs & Data Types](user-docs/Inputs.md)
|
|
26
|
+
- [Solvers](user-docs/Solvers.md)
|
|
27
|
+
- [Keyboard Shortcuts](user-docs/Shortcuts.md)
|
|
28
|
+
|
|
29
|
+
- Solver Expression Guides
|
|
30
|
+
- [Solver Expression Walkthrough](user-docs/Solver-Expression-Walkthrough.md)
|
|
31
|
+
- [Solver Expressions Advanced Topics](user-docs/Solver-Expressions-Advanced.md)
|
|
32
|
+
- [Solver Functions Reference](user-docs/Solver-Functions.md)
|
|
33
|
+
|
|
20
34
|
- Resources
|
|
21
35
|
- [Example Application](#/README?id=example-application)
|
|
22
36
|
- [GitHub](https://github.com/stevenvelozo/pict-section-formeditor)
|
|
@@ -636,60 +636,52 @@
|
|
|
636
636
|
},
|
|
637
637
|
"SLV-OP-Add": {
|
|
638
638
|
"TopicCode": "SLV-OP-Add",
|
|
639
|
-
"TopicHelpFilePath": "
|
|
640
|
-
"TopicTitle": "Addition Operator (+)"
|
|
641
|
-
"RelevantMarkdownLine": 39
|
|
639
|
+
"TopicHelpFilePath": "solveroperators/add.md",
|
|
640
|
+
"TopicTitle": "Addition Operator (+)"
|
|
642
641
|
},
|
|
643
642
|
"SLV-OP-Subtract": {
|
|
644
643
|
"TopicCode": "SLV-OP-Subtract",
|
|
645
|
-
"TopicHelpFilePath": "
|
|
646
|
-
"TopicTitle": "Subtraction Operator (-)"
|
|
647
|
-
"RelevantMarkdownLine": 40
|
|
644
|
+
"TopicHelpFilePath": "solveroperators/subtract.md",
|
|
645
|
+
"TopicTitle": "Subtraction Operator (-)"
|
|
648
646
|
},
|
|
649
647
|
"SLV-OP-Multiply": {
|
|
650
648
|
"TopicCode": "SLV-OP-Multiply",
|
|
651
|
-
"TopicHelpFilePath": "
|
|
652
|
-
"TopicTitle": "Multiplication Operator (*)"
|
|
653
|
-
"RelevantMarkdownLine": 36
|
|
649
|
+
"TopicHelpFilePath": "solveroperators/multiply.md",
|
|
650
|
+
"TopicTitle": "Multiplication Operator (*)"
|
|
654
651
|
},
|
|
655
652
|
"SLV-OP-Divide": {
|
|
656
653
|
"TopicCode": "SLV-OP-Divide",
|
|
657
|
-
"TopicHelpFilePath": "
|
|
658
|
-
"TopicTitle": "Division Operator (/)"
|
|
659
|
-
"RelevantMarkdownLine": 37
|
|
654
|
+
"TopicHelpFilePath": "solveroperators/divide.md",
|
|
655
|
+
"TopicTitle": "Division Operator (/)"
|
|
660
656
|
},
|
|
661
657
|
"SLV-OP-Modulus": {
|
|
662
658
|
"TopicCode": "SLV-OP-Modulus",
|
|
663
|
-
"TopicHelpFilePath": "
|
|
664
|
-
"TopicTitle": "Modulus Operator (%)"
|
|
665
|
-
"RelevantMarkdownLine": 38
|
|
659
|
+
"TopicHelpFilePath": "solveroperators/modulus.md",
|
|
660
|
+
"TopicTitle": "Modulus Operator (%)"
|
|
666
661
|
},
|
|
667
662
|
"SLV-OP-Exponent": {
|
|
668
663
|
"TopicCode": "SLV-OP-Exponent",
|
|
669
|
-
"TopicHelpFilePath": "
|
|
670
|
-
"TopicTitle": "Exponentiation Operator (^)"
|
|
671
|
-
"RelevantMarkdownLine": 35
|
|
664
|
+
"TopicHelpFilePath": "solveroperators/exponent.md",
|
|
665
|
+
"TopicTitle": "Exponentiation Operator (^)"
|
|
672
666
|
},
|
|
673
667
|
"SLV-OP-SetConcat": {
|
|
674
668
|
"TopicCode": "SLV-OP-SetConcat",
|
|
675
|
-
"TopicHelpFilePath": "
|
|
669
|
+
"TopicHelpFilePath": "solveroperators/setconcat.md",
|
|
676
670
|
"TopicTitle": "Set Concatenation Operator (,)"
|
|
677
671
|
},
|
|
678
672
|
"SLV-ASSIGN-Equals": {
|
|
679
673
|
"TopicCode": "SLV-ASSIGN-Equals",
|
|
680
|
-
"TopicHelpFilePath": "
|
|
681
|
-
"TopicTitle": "Assignment Operator (=)"
|
|
682
|
-
"RelevantMarkdownLine": 17
|
|
674
|
+
"TopicHelpFilePath": "solveroperators/assign.md",
|
|
675
|
+
"TopicTitle": "Assignment Operator (=)"
|
|
683
676
|
},
|
|
684
677
|
"SLV-ASSIGN-NullCoalesce": {
|
|
685
678
|
"TopicCode": "SLV-ASSIGN-NullCoalesce",
|
|
686
|
-
"TopicHelpFilePath": "
|
|
687
|
-
"TopicTitle": "Null Coalescence Assignment (?=)"
|
|
688
|
-
"RelevantMarkdownLine": 141
|
|
679
|
+
"TopicHelpFilePath": "solveroperators/nullcoalesce.md",
|
|
680
|
+
"TopicTitle": "Null Coalescence Assignment (?=)"
|
|
689
681
|
},
|
|
690
682
|
"SLV-ASSIGN-ExpressionBegin": {
|
|
691
683
|
"TopicCode": "SLV-ASSIGN-ExpressionBegin",
|
|
692
|
-
"TopicHelpFilePath": "
|
|
684
|
+
"TopicHelpFilePath": "solveroperators/expressionbegin.md",
|
|
693
685
|
"TopicTitle": "Expression Begin Directive (:)"
|
|
694
686
|
}
|
|
695
687
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Addition Operator (+)
|
|
2
|
+
|
|
3
|
+
Adds two numeric values together.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
left + right
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `+` operator performs addition on two numeric operands. It uses arbitrary precision arithmetic, so results are accurate even for very large or very small numbers.
|
|
14
|
+
|
|
15
|
+
When used in a solver expression, the `+` operator is one of the standard arithmetic operators and has lower precedence than `*`, `/`, `%`, and `^`.
|
|
16
|
+
|
|
17
|
+
## Precedence
|
|
18
|
+
|
|
19
|
+
The `+` operator has the same precedence as `-` (subtraction). Both are evaluated after `*`, `/`, `%`, and `^`. Use parentheses to override the default order.
|
|
20
|
+
|
|
21
|
+
| Precedence | Operators |
|
|
22
|
+
|------------|-----------|
|
|
23
|
+
| Highest | `^` |
|
|
24
|
+
| | `*` `/` `%` |
|
|
25
|
+
| Lowest | `+` `-` |
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Basic Addition
|
|
30
|
+
|
|
31
|
+
```expression
|
|
32
|
+
Total = Price + Tax
|
|
33
|
+
// With Price = 100, Tax = 8.50
|
|
34
|
+
// Result: "108.50"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Chaining Multiple Additions
|
|
38
|
+
|
|
39
|
+
```expression
|
|
40
|
+
GrandTotal = Subtotal + Tax + ShippingFee
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Combined with Other Operators
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
// Multiplication is evaluated before addition
|
|
47
|
+
Result = Price + Tax * Quantity
|
|
48
|
+
// Equivalent to: Price + (Tax * Quantity)
|
|
49
|
+
|
|
50
|
+
// Use parentheses to add first
|
|
51
|
+
Result = (Price + Tax) * Quantity
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Adding Constants
|
|
55
|
+
|
|
56
|
+
```expression
|
|
57
|
+
AdjustedScore = RawScore + 10
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Related Operators
|
|
61
|
+
|
|
62
|
+
- [-](./subtract.md) - Subtraction
|
|
63
|
+
- [*](./multiply.md) - Multiplication
|
|
64
|
+
- [/](./divide.md) - Division
|
|
65
|
+
|
|
66
|
+
## Related Functions
|
|
67
|
+
|
|
68
|
+
- [sum](../solverfunctions/sum.md) - Sum all values in an array
|
|
69
|
+
- [round](../solverfunctions/round.md) - Round a computed result
|
|
70
|
+
|
|
71
|
+
## Notes
|
|
72
|
+
|
|
73
|
+
- Uses arbitrary precision arithmetic
|
|
74
|
+
- Non-numeric operands may produce unexpected results
|
|
75
|
+
- The result is always returned as a string
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Assignment Operator (=)
|
|
2
|
+
|
|
3
|
+
Assigns the result of the right-hand expression to the left-hand target.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
target = expression
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `=` operator is the assignment operator in solver expressions. It evaluates the expression on the right side and stores the result in the variable or form input identified by the left side.
|
|
14
|
+
|
|
15
|
+
The left-hand target can be:
|
|
16
|
+
- A form input hash (writes the result to that input)
|
|
17
|
+
- A temporary variable name (stores a value for use in later expressions)
|
|
18
|
+
|
|
19
|
+
## Examples
|
|
20
|
+
|
|
21
|
+
### Assigning to a Form Input
|
|
22
|
+
|
|
23
|
+
```expression
|
|
24
|
+
Area = Height * Width
|
|
25
|
+
// Computes Height * Width and writes the result to the input with hash "Area"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Assigning a Constant
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
DefaultRate = 0.05
|
|
32
|
+
// Sets DefaultRate to 0.05
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Assigning a Computed Value
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Tax = round(Subtotal * TaxRate, 2)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Assigning a String
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
Status = if(Total, ">=", 1000, "High Value", "Standard")
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Using Temporary Variables
|
|
48
|
+
|
|
49
|
+
```expression
|
|
50
|
+
// Solver ordinal 1: compute intermediates
|
|
51
|
+
TempSubtotal = Price * Quantity
|
|
52
|
+
TempTax = round(TempSubtotal * 0.08, 2)
|
|
53
|
+
|
|
54
|
+
// Solver ordinal 2: compute final values using intermediates
|
|
55
|
+
GrandTotal = TempSubtotal + TempTax
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Expressions Without Assignment
|
|
59
|
+
|
|
60
|
+
Not all expressions need an assignment. Some functions perform side effects directly:
|
|
61
|
+
|
|
62
|
+
```expression
|
|
63
|
+
// These call functions without storing a return value
|
|
64
|
+
SetGroupVisibility("Products", "Details", if(ShowDetails, "==", 1, 1, 0))
|
|
65
|
+
ColorSectionBackground("Summary", "#E0F0E0", 1)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Related Operators
|
|
69
|
+
|
|
70
|
+
- [?=](./nullcoalesce.md) - Null coalescence assignment (assign only if target is empty)
|
|
71
|
+
- [:](./expressionbegin.md) - Expression begin directive
|
|
72
|
+
|
|
73
|
+
## Related Topics
|
|
74
|
+
|
|
75
|
+
- [Solver Expression Walkthrough](../Solver-Expression-Walkthrough.md) - Expression basics
|
|
76
|
+
- [Solvers](../Solvers.md) - How solvers execute
|
|
77
|
+
|
|
78
|
+
## Notes
|
|
79
|
+
|
|
80
|
+
- The left-hand target is case-sensitive
|
|
81
|
+
- If the target matches a form input hash, the computed value is written to that input
|
|
82
|
+
- If the target does not match any input, it is treated as a temporary variable
|
|
83
|
+
- The `=` operator is evaluated after all arithmetic and function calls on the right side
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Division Operator (/)
|
|
2
|
+
|
|
3
|
+
Divides the left operand by the right operand.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
left / right
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `/` operator performs division on two numeric operands. It uses arbitrary precision arithmetic for accurate results. Division by zero returns `0` rather than causing an error.
|
|
14
|
+
|
|
15
|
+
## Precedence
|
|
16
|
+
|
|
17
|
+
The `/` operator has the same precedence as `*` (multiplication) and `%` (modulus). All three are evaluated before `+` and `-`, but after `^` (exponentiation).
|
|
18
|
+
|
|
19
|
+
| Precedence | Operators |
|
|
20
|
+
|------------|-----------|
|
|
21
|
+
| Highest | `^` |
|
|
22
|
+
| | `*` `/` `%` |
|
|
23
|
+
| Lowest | `+` `-` |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Division
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Average = Total / Count
|
|
31
|
+
// With Total = 250, Count = 5
|
|
32
|
+
// Result: "50"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Percentage Calculation
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
PercentComplete = CompletedItems / TotalItems * 100
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Rounding
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
// Division can produce many decimal places; round for display
|
|
45
|
+
Rate = round(Amount / Hours, 2)
|
|
46
|
+
// With Amount = 1000, Hours = 3
|
|
47
|
+
// Result: "333.33"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### In a Complex Expression
|
|
51
|
+
|
|
52
|
+
```expression
|
|
53
|
+
// Compute a weighted average
|
|
54
|
+
WeightedAvg = (Score1 * Weight1 + Score2 * Weight2) / (Weight1 + Weight2)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Related Operators
|
|
58
|
+
|
|
59
|
+
- [*](./multiply.md) - Multiplication
|
|
60
|
+
- [%](./modulus.md) - Modulus (remainder)
|
|
61
|
+
- [^](./exponent.md) - Exponentiation
|
|
62
|
+
|
|
63
|
+
## Related Functions
|
|
64
|
+
|
|
65
|
+
- [round](../solverfunctions/round.md) - Round a computed result
|
|
66
|
+
- [avg](../solverfunctions/avg.md) - Compute average of an array
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Uses arbitrary precision arithmetic
|
|
71
|
+
- Division by zero returns `0` (no error is thrown)
|
|
72
|
+
- The result is always returned as a string
|
|
73
|
+
- For long decimal results, use `round` or `tofixed` to limit precision
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Exponentiation Operator (^)
|
|
2
|
+
|
|
3
|
+
Raises the left operand to the power of the right operand.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
base ^ exponent
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `^` operator raises a base value to a given power. It uses arbitrary precision arithmetic for accurate results. This is the highest-precedence arithmetic operator.
|
|
14
|
+
|
|
15
|
+
## Precedence
|
|
16
|
+
|
|
17
|
+
The `^` operator has the highest precedence among arithmetic operators. It is evaluated before all others.
|
|
18
|
+
|
|
19
|
+
| Precedence | Operators |
|
|
20
|
+
|------------|-----------|
|
|
21
|
+
| Highest | `^` |
|
|
22
|
+
| | `*` `/` `%` |
|
|
23
|
+
| Lowest | `+` `-` |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Exponentiation
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Squared = Value ^ 2
|
|
31
|
+
// With Value = 5
|
|
32
|
+
// Result: "25"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Cubing a Value
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Cubed = Side ^ 3
|
|
39
|
+
// With Side = 4
|
|
40
|
+
// Result: "64"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Square Root via Fractional Exponent
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
// Square root is the same as raising to the power of 0.5
|
|
47
|
+
SquareRoot = Value ^ 0.5
|
|
48
|
+
// With Value = 16
|
|
49
|
+
// Result: "4"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### In a Complex Expression
|
|
53
|
+
|
|
54
|
+
```expression
|
|
55
|
+
// Exponentiation is evaluated first
|
|
56
|
+
WidthCubeArea = Width ^ 3
|
|
57
|
+
HeightCubeArea = Height ^ 3
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Combined with Other Operators
|
|
61
|
+
|
|
62
|
+
```expression
|
|
63
|
+
// ^ is evaluated before * and +
|
|
64
|
+
Result = 2 + 3 ^ 2 * 4
|
|
65
|
+
// Equivalent to: 2 + (9 * 4) = 2 + 36 = 38
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Related Operators
|
|
69
|
+
|
|
70
|
+
- [*](./multiply.md) - Multiplication
|
|
71
|
+
- [/](./divide.md) - Division
|
|
72
|
+
|
|
73
|
+
## Related Functions
|
|
74
|
+
|
|
75
|
+
- [sqrt](../solverfunctions/sqrt.md) - Square root
|
|
76
|
+
- [round](../solverfunctions/round.md) - Round a computed result
|
|
77
|
+
|
|
78
|
+
## Notes
|
|
79
|
+
|
|
80
|
+
- Uses arbitrary precision arithmetic
|
|
81
|
+
- The result is always returned as a string
|
|
82
|
+
- Fractional exponents compute roots (e.g. `^ 0.5` for square root)
|
|
83
|
+
- Has the highest precedence of all arithmetic operators
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Expression Begin Directive (:)
|
|
2
|
+
|
|
3
|
+
Marks the beginning of an inline expression within a MAP or VAR pipeline.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
MAP VAR name FROM source : expression
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `:` operator signals the start of the expression body in a `MAP ... VAR ... FROM ...` pipeline. Everything after the `:` is the expression that gets evaluated for each element in the source data.
|
|
14
|
+
|
|
15
|
+
The `:` is used exclusively in MAP expressions and is not a general-purpose operator.
|
|
16
|
+
|
|
17
|
+
## Examples
|
|
18
|
+
|
|
19
|
+
### Basic MAP Expression
|
|
20
|
+
|
|
21
|
+
```expression
|
|
22
|
+
// Double each value in a set
|
|
23
|
+
Doubled = MAP VAR x FROM Values : x * 2
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### MAP with Multiple Variables
|
|
27
|
+
|
|
28
|
+
```expression
|
|
29
|
+
// Combine values from two parallel arrays
|
|
30
|
+
Combined = MAP VAR a FROM Prices VAR b FROM Quantities : a * b
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### MAP with Conditional Logic
|
|
34
|
+
|
|
35
|
+
```expression
|
|
36
|
+
// Apply different logic per element
|
|
37
|
+
Adjusted = MAP VAR val FROM RawScores : if(val, ">", 100, 100, val)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### In a Complex Pipeline
|
|
41
|
+
|
|
42
|
+
```expression
|
|
43
|
+
// Map, then aggregate
|
|
44
|
+
ItemTotals = MAP VAR price FROM Prices VAR qty FROM Quantities : price * qty
|
|
45
|
+
GrandTotal = SUM(ItemTotals)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Related Operators
|
|
49
|
+
|
|
50
|
+
- [=](./assign.md) - Assignment operator
|
|
51
|
+
- [,](./setconcat.md) - Set concatenation (argument separator)
|
|
52
|
+
|
|
53
|
+
## Related Topics
|
|
54
|
+
|
|
55
|
+
- [Solver Expressions Advanced Topics](../Solver-Expressions-Advanced.md) - MAP, VAR, FROM details
|
|
56
|
+
|
|
57
|
+
## Notes
|
|
58
|
+
|
|
59
|
+
- The `:` must appear after all VAR/FROM declarations in a MAP expression
|
|
60
|
+
- Everything after the `:` is the per-element expression
|
|
61
|
+
- The result of the MAP expression is an array of the computed values
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Modulus Operator (%)
|
|
2
|
+
|
|
3
|
+
Returns the remainder after dividing the left operand by the right operand.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
left % right
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `%` operator computes the modulus (remainder) of dividing the left operand by the right operand. It uses arbitrary precision arithmetic.
|
|
14
|
+
|
|
15
|
+
## Precedence
|
|
16
|
+
|
|
17
|
+
The `%` operator has the same precedence as `*` (multiplication) and `/` (division). All three are evaluated before `+` and `-`, but after `^` (exponentiation).
|
|
18
|
+
|
|
19
|
+
| Precedence | Operators |
|
|
20
|
+
|------------|-----------|
|
|
21
|
+
| Highest | `^` |
|
|
22
|
+
| | `*` `/` `%` |
|
|
23
|
+
| Lowest | `+` `-` |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Modulus
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Remainder = 7 % 3
|
|
31
|
+
// Result: "1"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Check for Even/Odd
|
|
35
|
+
|
|
36
|
+
```expression
|
|
37
|
+
// Use if() to test the remainder
|
|
38
|
+
Parity = if(Value % 2, "==", 0, "Even", "Odd")
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Cyclic Index
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
// Wrap an index into a fixed range (e.g. 0-11 for months)
|
|
45
|
+
MonthIndex = RawMonth % 12
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Combined with Division
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
// Get whole part and remainder separately
|
|
52
|
+
WholePart = floor(Total / GroupSize)
|
|
53
|
+
LeftOver = Total % GroupSize
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Related Operators
|
|
57
|
+
|
|
58
|
+
- [/](./divide.md) - Division
|
|
59
|
+
- [*](./multiply.md) - Multiplication
|
|
60
|
+
|
|
61
|
+
## Related Functions
|
|
62
|
+
|
|
63
|
+
- [floor](../solverfunctions/floor.md) - Round down to integer
|
|
64
|
+
- [round](../solverfunctions/round.md) - Round a computed result
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
- Uses arbitrary precision arithmetic
|
|
69
|
+
- The result is always returned as a string
|
|
70
|
+
- The sign of the result matches the sign of the left operand
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Multiplication Operator (*)
|
|
2
|
+
|
|
3
|
+
Multiplies two numeric values together.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
left * right
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Description
|
|
12
|
+
|
|
13
|
+
The `*` operator performs multiplication on two numeric operands. It uses arbitrary precision arithmetic for accurate results, even with very large numbers or many decimal places.
|
|
14
|
+
|
|
15
|
+
## Precedence
|
|
16
|
+
|
|
17
|
+
The `*` operator has the same precedence as `/` (division) and `%` (modulus). All three are evaluated before `+` and `-`, but after `^` (exponentiation).
|
|
18
|
+
|
|
19
|
+
| Precedence | Operators |
|
|
20
|
+
|------------|-----------|
|
|
21
|
+
| Highest | `^` |
|
|
22
|
+
| | `*` `/` `%` |
|
|
23
|
+
| Lowest | `+` `-` |
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic Multiplication
|
|
28
|
+
|
|
29
|
+
```expression
|
|
30
|
+
Area = Height * Width
|
|
31
|
+
// With Height = 12, Width = 8
|
|
32
|
+
// Result: "96"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Computing a Product with Multiple Factors
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Volume = Length * Width * Height
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Combined with Addition
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
// Multiplication is evaluated before addition
|
|
45
|
+
Total = BasePrice + TaxRate * BasePrice
|
|
46
|
+
// Equivalent to: BasePrice + (TaxRate * BasePrice)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Using Parentheses
|
|
50
|
+
|
|
51
|
+
```expression
|
|
52
|
+
// Force addition before multiplication
|
|
53
|
+
Result = (Price + Tax) * Quantity
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With Rounding
|
|
57
|
+
|
|
58
|
+
```expression
|
|
59
|
+
// Multiply and round to 2 decimal places
|
|
60
|
+
Cost = round(UnitPrice * Quantity, 2)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Related Operators
|
|
64
|
+
|
|
65
|
+
- [/](./divide.md) - Division
|
|
66
|
+
- [^](./exponent.md) - Exponentiation
|
|
67
|
+
- [+](./add.md) - Addition
|
|
68
|
+
- [-](./subtract.md) - Subtraction
|
|
69
|
+
|
|
70
|
+
## Related Functions
|
|
71
|
+
|
|
72
|
+
- [round](../solverfunctions/round.md) - Round a computed result
|
|
73
|
+
- [tofixed](../solverfunctions/tofixed.md) - Format to fixed decimal places
|
|
74
|
+
|
|
75
|
+
## Notes
|
|
76
|
+
|
|
77
|
+
- Uses arbitrary precision arithmetic
|
|
78
|
+
- Non-numeric operands may produce unexpected results
|
|
79
|
+
- The result is always returned as a string
|