When I write
\If{condition}
{
\textbf{return true}\;
}
The output is like below
However, I don't want end line. If possible, I want like this:
if condition then return true;
Is it possible?
algorithm2e
When I write
\If{condition}
{
\textbf{return true}\;
}
The output is like below
However, I don't want end line. If possible, I want like this:
if condition then return true;
Is it possible?
Best Answer
This is entirely covered in the
algorithm2e
documentation (section 10.4 if-then-else macros), and is provided by\lIf
(short forl
ineIf
):