EDP syntax - if ( ) statements

Thank you so much to everyone who codes/maintains this amazing software!
I saw one-liner if ( ) statements in a few EDP file examples, and when I tried to use more statements between curly braces { } following the if ( ) I run into some issues.
I read the documentation and I could not find a description of if (), I found “for” and “while”, but not “if”, and the key index at the end of the documentation does not list the if statement.
I could just work with for or while () using an extra variable to make it finish after one iteration, but I though perhaps you want to put some info in the documentation, and if you have something handy, I would be very thankful if you share it with me.

Thanks again to everyone who develops/maintains FreeFEM++ !!!

Could you give an example of your syntax and your issues?

real one, two, four;
#In-line if statement, applies to next operation
if ( condition) one = 1.0; // ends if statement
else if (alternatecondition) { //scoped if statement, applies to everything in braces
    two = 2.0;
    real three = 3.0; // this isnt stored outside of the {}
} else {
    four = 4;

Chris, Thanks a lot for these examples.
The error that I was getting was not because of the “if” statement, but because I was trying to reassign the value of a “func” object, the compiler error was not obvious for me, so I thought it was related to the if().
Everything is good, thanks again for your help !