Results 1 to 3 of 3

Thread: if and elif

  1. #1
    Join Date
    Feb 2004
    Posts
    143

    Unanswered: if and elif

    An if block should end with an fi.
    But how about elif ? Does elif need to have a corresponding fi ?

    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    Bordeaux, France
    Posts
    320
    There is only one fi
    The syntax is :
    Code:
    if condition1
    then
        action
    elif condition2
    then
        action
    else
        action
    fi
    Jean-Pierre.

  3. #3
    Join Date
    Feb 2004
    Posts
    143
    Thanks aigles

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •