Sequential Statements (if, case, NULL) in VHDL Digital Design using VHDL by Ravinder Nath Rajotiya - May 14, 2021May 14, 20210 The sequential constructs refer to the VHDL language constructs that execute in sequence. The different sequential constructs are : Wait statement If statement Case statement Loop statement Null statement Next statement Assertion statement Report statement Procedure call statement Return statement we now discuss all these sequential statements in the following paragraph : IF statement: The IF statement used to transfer the control of the program to another set of sequential statement based on the value of the condition in the expression that evaluates to BOOLEAN value. The syntax of the IF statement is: Format-1 Format-2 Format-3 IF expression then Statement(s); ELSE Statement(s) END IF IF expression then Statement(s); ELSIF expression then Statement(s) -- END IF IF expression then IF expression then IF expression then Statement(s); ELSE Statement(s) End if; End if; End if; The following example illustrates the use of if
Control and Loop Statements in Python PYTHON by Ravinder Nath Rajotiya - April 19, 2019May 10, 20210 Control Statements There are many instances when it is required to take decision. If statement is a decision making statement. If statement in Python is used to test a condition and transfer the control of program to usual sequential next line of code or skips certain lines and jump to another point. It should be clearly noted that Python make use of indentation almost every where especially while writing if statement. If indentation is not used in a statement that particular line of code will be treated as not part of if statement or loop statements and is thus treated as statement outside the control and loop. example: >>> x=10 >>> if x>0: . . . print(x," is +ve Number") #indented line thus executed