Python Forum
must the if statement in the following tutorial be nested?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
must the if statement in the following tutorial be nested?
#1
in this tutorial series on creating a programming language:
https://www.youtube.com/watch?v=pWAxiKdJF0c  (the first episode in the video tutorial series)

he uses nested if statement,but can i use many if elif else statement instead.(especially the lexer)
Reply
#2
If you could post the code in question here it would help a lot.
Reply
#3
Tomorrow or the day after tomorrow because I am not at home now and my computer is at home.
Reply
#4
At the point the elif checks tok to equal \ and then inside of that condition checks state to be 0 or 1
To not nest it could be replaced with two elif that check for tok and state at the same time.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Nested if Statement help olliej 3 2,016 Feb-19-2021, 05:18 AM
Last Post: olliej

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020