Expressions in DS

Follow

An expression is one method to specify a value in the text box of a step, as it can find a text using the formula you would have entered. Expressions can hence convert values with a high degree of freedom.

Please refer to the examples below.

(Example) Combining variables and texts to make a sentence.
  "The author of『" + Book.title + "』is " + Book.author + "."

[Preconditions]
 The value of the variable "Book.title" is "I am a cat".
 The value of the variable "Book.author" is "Natsume Soseki".
1.png

With the expression of this example, the text below is found.
 "The author of『I am a cat』is Natsume Soseki."
2.png

For more details about descriptive methods of string of characters that include variables, please refer to How to formulate statements when using strings of characters, variables or the newline characters \n in "Expression" in DS?.

 

You can also calculate numerical values within "Expression".
Please refer to the example below.

(Example) Multiplying variables with numerical values and obtaining the result.

[Precondition]
 The value of the variable "Book.price" is "350".

3.png

If you enter the formula below in an expression, the value "350" of the variable "Book.price" is multiplied with "100", and the result "35000" is output.
 Book.price * 100
4.png

 

In "Expression", you can choose among expressions to use in the general formula.
Options include constants, variables, operators, special characters, functions, page properties, robot properties (have additional sub-expression functions set in them).

5.png

 

For more information about the constants you can choose in "Expression", please refer to the link below.
What are the constants (" " and >> <<) I can select for DS expressions?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.