Home Delphi 2006 proper use of END
Reply: 0

Delphi 2006 proper use of END

user1206
1#
user1206 Published in June 19, 2018, 7:58 pm

Look at this code:

if Poruka(BM_UWARN, GetMsg('Da li zaista ┼żelite da odbijete nalog?')) = mrOk then
  begin
    tmps := TRN.ss;
    TrnPom.ss := TRN.ss;
    RadnikOdbio.l := AdresniSlog.Rabotnik;
    if Zakljucaj(1011, tmps, 3) then
      begin
        FRazlogOdbNal.ShowModal;
        case FRazlogOdbNal.ModalResult of
          mrOk:              
            BeBankComment.ss := FRazlogOdbNal.beRazlogOdbijanja.ss;              
          else
            Otkljucaj(1011, tmps, 3);
            exit;
        end;
      end;
   end;

It is not important what this code does, what I need help with is did I use enough ENDs in this part of code. So the first END is of CASE statement. Second END closes BEGIN of if Zakljucaj(1011,tmps,3) and the last END is closing BEGIN of starting IF. Is this the right way to close them, does compiler now which end refers to which part of the code? And also, does compiler knows that the else part refers to case statement? If not, is there a way to explicitly do this?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.322694 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO