Skip to content

Commit 073dcf2

Browse files
committed
Add links and fix spelling errors
1 parent 2da7335 commit 073dcf2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/parserhelp.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The SCIRun parser is designed to give the user the ability to evaluate almost an
1717

1818
### Using the parser
1919

20-
Each parser has several preloaded variables available to the user. These preloaded varaibles in SCIRun are always denoted with an upper case variable name. For example for the {% include moduleLink.md moduleName='CalculateFieldData' %} has the following variables available:
20+
Each parser has several preloaded variables available to the user. These preloaded variables in SCIRun are always denoted with an upper case variable name. For example for the {% include moduleLink.md moduleName='CalculateFieldData' %} has the following variables available:
2121

2222
`DATA, X,Y,Z, POS`
2323

@@ -31,23 +31,23 @@ This will assign the value of `sin(X) + cos(Y)` to `MYDATA`, where `X` and `Y` a
3131

3232
As the output of the expression is a vector `MYDATA` will now be an array of vectors instead of an array of scalars as in the previous example.
3333

34-
To assign any data to the output of a module, certain variables need to be assigned. For example in case of the CalculateFieldData, the output variable is called RESULT and hence a second expression can be added to assign the newly created vector to the output:
34+
To assign any data to the output of a module, certain variables need to be assigned. For example in case of the {% include moduleLink.md moduleName='CalculateFieldData' %}, the output variable is called `RESULT` and hence a second expression can be added to assign the newly created vector to the output:
3535

3636
`MYDATA = vector(Y,X,2*Z); RESULT = MYDATA;`
3737

3838
Now this expression could have been simplified to one expression, which would result in the same operation:
3939

4040
`RESULT = vector(Y,X,2*Z);`
4141

42-
From a performance perspective both would be evaluated equally fast as, copying operations are generally removed by the internal optimizer. However to increase user readability one can split an expression in as many pieces as one wants. For example, the following expression is perfectlt valid expression:
42+
From a performance perspective both would be evaluated equally fast as, copying operations are generally removed by the internal optimizer. However to increase user readability one can split an expression in as many pieces as one wants. For example, the following expression is a perfectly valid expression:
4343

4444
`DX = X-3; DY = Y-4; DZ = Z - 2; RESULT = norm(vector(DX,DY,DZ));`
4545

4646
Hence the general grammar of the expression is:
4747

4848
`VAR1 = function(...);` `VAR2 = function(...);` `VAR3 = function(...);` ... etc
4949

50-
The array parser generally allows two types of input, an array with one element, or an array with many elements. When combining multiple fields or matrices, the arrays with many elements are required to have the same number of elements and the math operations are done by taking correspondeing elements from each array. However an array with one element is treated special, and its value is used for every element for the arrays that have many arrays. For example, assume matrix `A = [1]`, and `B = [1,2,3,4]`. We can now evaluate the following expression:
50+
The array parser generally allows two types of input, an array with one element, or an array with many elements. When combining multiple fields or matrices, the arrays with many elements are required to have the same number of elements and the math operations are done by taking corresponding elements from each array. However an array with one element is treated special, and its value is used for every element for the arrays that have many arrays. For example, assume matrix `A = [1]`, and `B = [1,2,3,4]`. We can now evaluate the following expression:
5151

5252
`RESULT = A+B;`
5353

@@ -154,7 +154,7 @@ For converting any Scalar, Vector or Tensor in to a boolean, e.g. whether all co
154154

155155
`RESULT = boolean(vector(X,0,Z)) || boolean(tensor(4)*0);`
156156

157-
The `select()` function works like the C/C++ ternary ?: operator:
157+
The `select()` function works like the C/C++ ternary `?:` operator:
158158

159159
`RESULT = select(X>2,1,0);`
160160

0 commit comments

Comments
 (0)