Sounds real, alive and well to me then.

Thank you very much, Razzak

Bruce

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of A. Razzak
Memon
Sent: Sunday, July 21, 2013 12:45 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: SWITCH: Best tool?

At 03:14 PM 7/21/2013, Bruce A. Chitiea wrote:

>I can't recall ever seeing a posting on the SWITCH syntax, I suppose 
>because it is very straightforward.
>
>Is it the best tool to use when the number of outcomes to the driving 
><expression> is fixed, or would I do better focusing on more dynamic 
>constructs such as loops driven by SSUB-parsed value lists?

Bruce,

Here you go ...

The SWITCH statement is a control statement that handles multiple selections
by passing control to one of the CASE statements within its body.

Syntax:

SWITCH ([expression])
    CASE [value]
       [case-block]
       BREAK
    DEFAULT
       [default-block]
       BREAK
ENDSW

The SWITCH statement can include any number of CASE instances, but no two
case statements can have the same value.

The SWITCH and CASE statements help control complex conditional and
branching operations. The switch statement transfers control to a statement
within its body.

Use the DEFAULT clause to provide a statement to be executed if none of the
label values matches expression. It can appear anywhere within the SWITCH
-ENDSW code block.

In addition to handling multiple selections by passing control to one of the
CASE statements within its body, the SWITCH provides an efficient mechanism
for controlling, tracing, and debugging output at run time using external
settings.

Practically, you may define a common code template/Form Action and then use
the R:BASE "% Variables" to pass all required parameters for SWITCH and CASE
values.

And, that is your tip of the day!

Very Best R:egards,

Razzak.

www.rbase.com
www.facebook.com/rbase
-- 
30+ years of continuous innovation!
15 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
-- 


Reply via email to