Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Calling Procedures

I would like a bit of help on how to declare a procedure, and how to then run several declared procedures on clicking a button. Thanx ;)

Comments

  • zibadianzibadian Member Posts: 6,349
    : I would like a bit of help on how to declare a procedure, and how to then run several declared procedures on clicking a button. Thanx ;)
    :
    Here is a piece of code as an example.
    [code]
    procedure DoSomething; // declare a procedure and implement it
    begin
    { Do whatever you like here }
    end;

    procedure DoSomethingElse; // declare another procedure and implement it
    begin
    { Do whatever you like here }
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    DoSomething; // call them
    DoSomethingElse;
    end;
    [/code]
    Many Delphi words are procedures or functions themselves. Things like Format() or IntToStr() are all simple functions.
Sign In or Register to comment.