# Is there a way to include an "or" statement within an "if" statement?

**URL:** https://community.freefem.org/t/is-there-a-way-to-include-an-or-statement-within-an-if-statement/2639
**Category:** General Discussion
**Created:** [August 4, 2023, 12:24pm UTC](https://community.freefem.org/t/is-there-a-way-to-include-an-or-statement-within-an-if-statement/2639 "2023-08-04T12:24:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jna1g18](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jna1g18](https://community.freefem.org/u/jna1g18)
#### Post date: [August 4, 2023, 12:24pm UTC](https://community.freefem.org/t/is-there-a-way-to-include-an-or-statement-within-an-if-statement/2639/1 "2023-08-04T12:24:51Z")

</div>

Hi, does freeFEM support “or” statements inside “if” statements? If so, what’s the syntax? I know there’s an “and” statement, the syntax for which is && (I think).

Cheers!

---

<div class="post-metadata">

### Author: ![julienG](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/julieng/32/222_2.png) [@julienG](https://community.freefem.org/u/julienG)
#### Post date: [August 4, 2023, 1:00pm UTC](https://community.freefem.org/t/is-there-a-way-to-include-an-or-statement-within-an-if-statement/2639/2 "2023-08-04T13:00:54Z")

</div>

Hi yes use the symbol pipes: `||`. For example

> if(condition1 || condition2)

---

<div class="post-metadata">

### Author: ![jna1g18](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jna1g18](https://community.freefem.org/u/jna1g18)
#### Post date: [August 4, 2023, 1:32pm UTC](https://community.freefem.org/t/is-there-a-way-to-include-an-or-statement-within-an-if-statement/2639/3 "2023-08-04T13:32:43Z")

</div>

Ah right, of course. Thanks!
