‼
To give you the best experience, this site uses cookies. Continuing to use
9bis.net
means you agree to our use of cookies.
Case_In_Esac
(
en )
Last modification : 2013/01/26 19:16
Index
/
Recent changes
/
News
/
Forum
/
Download
/
Contact
Edit (
Help
) /
Rename
/
History
If there are many '''else''' expression into a [if ... then ... else ... fi|?page=If_Then_Else_Fi], it is possible to write a '''case''' block such as a '''switch''' command in a C program. Here it is the syntax:{case ''variable'' in ''value1'' ''':''' command 1 ''';;''' ''value2'' ''':''' command 2 ''';;''' ... esac} '---Example---':{msh> set A=1 msh> case $A in 1> -1: print Negative ;; 1> 0: print Null ;; 1> 1: print Positive ;; 1> esac Positive}
Password :
Wiki utilisant
PumaWiki 1.0
2025/05/09 17:45 -- en -- 18.221.99.121