Skip to main content
June 10, 2014
Question

ignore logical operator in string

  • June 10, 2014
  • 1 reply
  • 272 views

I assign a string string to a variable var, then show the variable using $$var$$

This works if the string is something like "Black White", and $$var$$ returns "Black White"

However, if the string contains a logical operator like "and" or "or", then captivate sees it as a logical operator, and returns "false".  Therefore the string "Black or White" makes the variable return "false"

I believe I need to put something in front of or around the logical operator so that it's ignored, like "Black */or/* White", or something like that, but I can't remember what.

    This topic has been closed for replies.

    1 reply

    TLCMediaDesign
    Inspiring
    June 10, 2014

    What version of CP or you using and how are you setting the variable?

    Not sure the variable name var is a good choice since it is reserved in ActionScript.

    June 10, 2014

    Captivate 8

    Shared action: Assign variable "var01a" with literal "this is a string".

    TLCMediaDesign
    Inspiring
    June 10, 2014

    It works for me in CP7, I don't have access to my CP8 until tonight. You may be able to concatenate variables if it's seeing the "or" as an operator.