Skip to content
  • So as far as the Otium language goes does that mean there is no nested statements like I was trying to do? It seems to be that way since Otiums version of ELSIF/ELIF/ ELSE IF is technically non existent and it just uses its version of IF over and over again.

  • Jim @jimbo2150 ·

    No what I'm saying is, if nesting prov means else if, then how would you have a nested if? It doesn't seem possible. I would say have the else if on the same level (with an extra blank line to split if/else if from if followed by another if).

    Edited by Jim
  • Jim @jimbo2150 ·

    Examples:

    Nested if:

    prov x == 1
      display('x is 1')
      prov y == 2
        display('and y is 2')
      otherwise:
        display('and y is not 2')
    otherwise:
       display('X is not 1')

    If / Else If (with nested if -- if you had used nested ifs as if/else if, this would not be possible):

    prov x == 1
      display('x is 1')
    prov x == 2
      display('else x is 2')
      prov y == 1
        display('and y is 1')
      otherwise:
        display('and y is not 1');
    prov x == 3
      display('else x is 3')
    otherwise:
      display('x is not 1-3')
  • Ok I think I understand what you mean a little better this I is I think I should ad a keyword for IF/ELSE. using the same word to mean two things might be confusing. I do see what you mean but I feel like it can be simplified by adding a keyword to take some of the load off of prov

  • Also I'm thinking of adding you as a contributor to Otium's source code on GitHub so that way if you ever want to explain something to me you can modify a version of it straight at the source. Let me know what you think. Once again thank you for the input

    Schooly = appreciative
    
    while Schooly == appreciative
      print('Thank You :smile: ')
    
    Thank You :smile:
    Thank You :smile:
    Thank You :smile:
    Thank You :smile: 
    Edited by Marshall B
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment