[ 
https://issues.apache.org/jira/browse/KARAF-5629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16374331#comment-16374331
 ] 

ASF GitHub Bot commented on KARAF-5629:
---------------------------------------

gnodet opened a new pull request #465: [KARAF-5629] Improve syntax of 
procedural functions
URL: https://github.com/apache/karaf/pull/465
 
 
   This is a temporary commit until the real fix is moved into gogo (to provide 
better syntax highlighting of this new syntax).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add new karaf commands shell:elif and shell:else
> ------------------------------------------------
>
>                 Key: KARAF-5629
>                 URL: https://issues.apache.org/jira/browse/KARAF-5629
>             Project: Karaf
>          Issue Type: New Feature
>          Components: karaf-shell
>    Affects Versions: 4.1.5, 4.2.0.M2
>            Reporter: Lijun Liao
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: 4.2.0
>
>
> Take the following example:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } {
>   if {"$v" equals "b"} {
>     do something b
>   } {
>     if {"$v" equals "c"} {
>       do something c
>     } {
>       do something others
>     }
>   }
> }
> {code}
> By introducing the commands shell:elif and shell:else, this can be simplified 
> as follows:
> {code:java}
> if {"$v" equals "a"} {
>   do something a
> } elif {"$v" equals "b"} {
>   do something b
> } elif {"$v" equals "c"} {
>   do something c
> } else {
>   do something others
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to