Results 1 to 3 of 3

Thread: switch

  1. #1
    Join Date
    Jan 2009
    Posts
    56
    Rep Power
    0

    Default switch

    Hello to everybody i ve this code:

    CODE]
    switch(i){

    case 0:
    {
    vuthoskopisi="kulo";
    tonometrisi=10;
    automati_perimetria=2;
    gwnioskopia=2;

    illness = Asth[0];
    break;
    }
    case 1:
    {
    vuthoskopisi="kurto";
    tonometrisi=10;
    automati_perimetria=2;
    gwnioskopia=2;

    illness= Asth[1];
    break;
    }
    }
    [/CODE] i want the variables tonometrisi automati_perimetria and gwnioskopia to be statement like
    (tonometrisi<10)&(tonometrisi>0)ect.
    When i put this statement in case the compiler saint that this sentence is not a statement.So what s the problem??:cool:

  2. #2
    makpandian's Avatar
    makpandian is offline Senior Member
    Join Date
    Dec 2008
    Location
    Chennai
    Posts
    448
    Rep Power
    6

    Default

    Could you send your full source code?
    Here no need to have open Braces inside of Case .
    Mak
    (Living @ Virtual World)

  3. #3
    angryboy's Avatar
    angryboy is offline Senior Member
    Join Date
    Jan 2009
    Posts
    742
    Rep Power
    6

    Default

    actually... the OP started another thread w/ the same title.
    switch
    USE CODE TAGS--> [CODE]...[/CODE]
    Get NotePad++ (free)

Similar Threads

  1. [SOLVED] Should I use switch or if else
    By hungdukie in forum New To Java
    Replies: 14
    Last Post: 12-25-2011, 01:49 AM
  2. Switch help please!!!!
    By soc86 in forum New To Java
    Replies: 6
    Last Post: 11-23-2008, 07:25 PM
  3. What is wrong with my switch??
    By soc86 in forum New To Java
    Replies: 3
    Last Post: 11-20-2008, 12:34 AM
  4. Help with switch color
    By Daniel in forum AWT / Swing
    Replies: 2
    Last Post: 09-18-2008, 07:54 AM
  5. Switch Statemet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-30-2007, 09:16 AM

Posting Permissions

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