Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Find a number of syntax examples for assignment of constant values and expressions.

  • The Input representation of the examples corresponds to what a user types in the GUI.
  • The Output representation of the examples corresponds to what is visible from the log output, e.g. using an echo command in a Shell Job.
  • The JSON representation is visible when using the "Show JSON" operation from an object's action menu.

Examples for Constant Values

...

  • Use with single quotes

    Inputvar = 'some value'
    Outputsome value
    JSON"var": "'some value'"



  • Use with double quotes

    Inputvar = "some value"
    Outputsome value
    JSON"var": "\"some value\""



  • Use with single quoted values

    Inputvar = 'some \'quoted\' value'
    Outputsome 'quoted' value
    JSON"var": "'some \\'quoted\\' value'"



  • Use with double quoted values

    Inputvar = "some \"quoted\" value"
    Outputsome "quoted" value
    JSON"var": "\"some \\\"quoted\\\" value\""



  • Use with double quoted and single quoted values

    Inputvar = "some 'quoted' value"
    Outputsome 'quoted' value
    JSON"var": "\"some 'quoted' value\""



  • Use with $ character from single quoted values

    Inputvar = 'some $dollar value'
    Outputsome $dollar value
    JSON"var": "'some $dollar value'"



  • Use with $ character from double quoted values

    Inputvar = "some \$dollar value"
    Outputsome $dollar value
    JSON"var": "\"some \\$dollar value\""

...

  • Use without quotes
    Assume var2 to hold the value: some value

    Inputvar = $var2
    Outputsome value
    JSON"var": "$var"



  • Use with double quotes
    Assume var2 to hold the value: some value

    Inputvar = "$var2"
    Outputsome value
    JSON"var": "\"$var\""



  • Use with constant values from double quoted values
    Assume var2 to hold the value: second value

    Inputvar = "first value, $var2"
    Outputfirst value, second value
    JSON"var": "\"first value, $var2\""



  • Use with string concatenation from double quoted values
    Assume var2 to hold the value: second value

    Inputvar = "${var2}first value"
    Outputsecond valuefirst value
    JSON"var": "\"${var2}first value\""



  • Use with constant values and single quoted values
    Assume var2 to hold the value: second value

    Inputvar = "first, '$var2'"
    Outputfirst, 'second value'
    JSON"var": "\"first, '$var'\""

...