Case Statement help Delphi

Discussion in 'Software' started by Juicer, May 13, 2011.

  1. Juicer

    Juicer Private E-2

    I must do a task for IT. I must make a Distance compare programme, they gave me the info i done the case statement shown here:

    procedure TForm1.btnVertoonClick(Sender: TObject);
    begin
    case cmbxfrom.ItemIndex of
    -1 :
    begin
    case cmbxto.ItemIndex of
    -1 : pnlafstand.Caption:= arrafstande[1,1];
    0 : pnlafstand.Caption:= arrafstande[1,2];
    1 : pnlafstand.Caption:= arrafstande[1,3];
    end;
    end;
    0 :
    begin
    case cmbxto.ItemIndex of
    -1 : pnlafstand.Caption:= arrafstande[2,1];
    0 : pnlafstand.Caption:= arrafstande[2,2];
    1 : pnlafstand.Caption:= arrafstande[2,3];
    end;
    end;
    1 :
    begin
    case cmbxto.ItemIndex of
    -1 : pnlafstand.Caption:= arrafstande[3,1];
    0 : pnlafstand.Caption:= arrafstande[3,2];
    1 : pnlafstand.Caption:= arrafstande[3,3];
    end;
    end;
    end;
    end;

    can someone hint me to the problem:confused
    the task must be completed on the 16th of may.
    The whole unit is in text format attached
     

    Attached Files:


MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds