Re: XForms: About switch with Xforms.

Robert Nield (ceerjn@cee.hw.ac.uk)
Mon, 02 Jun 1997 10:54:23 +0100

To subscribers of the xforms list from Robert Nield <ceerjn@cee.hw.ac.uk> :

--------------45A20BE720DA17047531C21F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Andres Florido wrote:

> To subscribers of the xforms list from Andres Florido
> <florido@apolo.lcc.uma.es> :
>
> Hello, I am a rookie with Xforms. I want to know, if I can use the
> swithc sentence. Thank You.
>
If what you are talking about is the switch(x) ...case 1: construct,
then yes.Example:

void meun_cb(FL_OBJECT *ob, long data)
{
int type_chosen;

type_chosen = fl_get_menu(ob);
switch(type_chosen)
{
case 1: // Encryption method set to PGP
enc_type=1;
break;

} // end switch
}// end func

Rob

--
Name   : Robert James Nield
HomePage : http://www.cee.hw.ac.uk/~ceerjn
Telephone: +44 (0)131 449-8323

--------------45A20BE720DA17047531C21F Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Andres Florido wrote:

To subscribers of the xforms list from Andres Florido <florido@apolo.lcc.uma.es> :

Hello, I am a rookie  with Xforms. I want to know, if I can use the
swithc sentence. Thank You.

If what you are talking about is the switch(x) ...case 1: construct, then yes.Example:

void meun_cb(FL_OBJECT *ob, long data)
{
 int type_chosen;
 
 type_chosen = fl_get_menu(ob);
 switch(type_chosen)
 {
  case 1: // Encryption method set to PGP
          enc_type=1;
          break;
 
 } // end switch
}// end func
 

Rob

--
Name   : Robert James Nield
HomePage : http://www.cee.hw.ac.uk/~ceerjn
Telephone: +44 (0)131 449-8323 --------------45A20BE720DA17047531C21F-- _________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/