Control structure with "not"

Peter Haworth pete at
Tue Aug 4 23:40:46 CEST 2015

You could:

set tSwitchApple to (tSender is not "Apple")
set tSwitchPeach to (tSender is not "Peach")
set tSwitchGrape to (tSender is not "Grape")

Slightly different than your code because the switches would be set to
false if the condition isn't met whereas you code doesn't do that.

On Tue, Aug 4, 2015 at 2:25 PM Peter Bogdanoff <bogdanoff at> wrote:

> Is it possible to convert this to a switch control structure, or otherwise
> refined somehow? The “not” is what I need, and the setting has to be always
> “true”:
> on doThisThing tSender
>         if tSender is not “Apple” then
>                 set tSwitchApple to true
>         end if
>         if Sender is not “Peach” then
>                 set tSwitchPeach to true
>         end if
>         if Sender is not “Grape” then
>                 set tSwitchGrape to true
>         end if
> end doThisThing
> Peter Bogdanoff
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the use-livecode mailing list