Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

If Statement With Multiple Lines

I have an if statement with multiple conditions. I cannot see them all in a single window view. Is there a way to separate them on different lines or do they have to be written all in one line?

like image 401
Ren Avatar asked Nov 28 '11 23:11

Ren


People also ask

How do you do an if statement with multiple lines in Python?

The recommended style for multiline if statements in Python is to use parenthesis to break up the if statement. The PEP8 style guide recommends the use of parenthesis over backslashes and putting line breaks after the boolean and and or operators.

How do you write an if statement with multiple conditions?

When you combine each one of them with an IF statement, they read like this: AND – =IF(AND(Something is True, Something else is True), Value if True, Value if False) OR – =IF(OR(Something is True, Something else is True), Value if True, Value if False) NOT – =IF(NOT(Something is True), Value if True, Value if False)

What are multi line statements?

PythonServer Side ProgrammingProgramming. Statements in Python typically end with a new line. Python does, however, allow the use of the line continuation character (\) to denote that the line should continue. For example − total = item_one + \ item_two + \ item_three.


1 Answers

The VBA line-continuation character is an underscore _

if ( _     (something) _     or (somethingelse) _ )  
like image 105
Cylindric Avatar answered Oct 06 '22 08:10

Cylindric