Author Topic: MDG - ShapeScript AND/OR operators  (Read 357 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1212
  • Karma: +38/-2
    • View Profile
    • www.umlchannel.com
MDG - ShapeScript AND/OR operators
« on: September 02, 2022, 08:02:13 pm »
Hello,

Is there a way to combine conditions within an if statement in ShapeScript ?
The following doesn't work so I have to repeat if.. else statements for each condition and duplicate the code.

Code: [Select]
if (HasTag('Type','A') AND HasTag('Type','A'))
{
   // ...
}
Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


qwerty

  • EA Guru
  • *****
  • Posts: 12980
  • Karma: +371/-298
  • I'm no guru at all
    • View Profile
Re: MDG - ShapeScript AND/OR operators
« Reply #1 on: September 02, 2022, 08:52:59 pm »
AND = nested IF.

OR = repeat the code.

(argh!)

q.