Book a Demo

Author Topic: Boolean AND or OR in shape script?  (Read 4408 times)

Rich Anderson

  • EA User
  • **
  • Posts: 142
  • Karma: +8/-0
    • View Profile
    • LinkedIn
Boolean AND or OR in shape script?
« on: August 17, 2019, 07:57:33 am »
This statement is apparently not valid in Shape Script....

Code: [Select]
if (HasTag("Tag1") AND HasTag("Tag2"))
{
print("#TAG:Tag1#,#TAG:Tag2#");
}
else
{
print("");
}

Is there any way to have an AND, OR, or NOT expresison in a shape script control structure?    Or do I have to construct this using nested if logic?
Rich Anderson
Urgnt Limited

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Boolean AND or OR in shape script?
« Reply #1 on: August 17, 2019, 08:31:14 am »
No boolean, no procedures. Just copy and paste :-/

I made a complete (it's tiny) EBNF of shape script at the end of my shape script book.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Boolean AND or OR in shape script?
« Reply #2 on: August 17, 2019, 04:12:37 pm »
Or do I have to construct this using nested if logic?

Yes, I think so

Geert