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.
  • Andre YoungAndre Young USAMember Posts: 0

    __ / http://forcoder.org / free video tutorials and ebooks about { C#, Java, Scratch, Perl, Objective-C, PL/SQL, Go, Python, MATLAB, C, JavaScript, Assembly, C++, PHP, Visual Basic .NET, Swift, R, Ruby, Visual Basic, Delphi SAS, Lisp, Clojure, Hack, Ada, Kotlin, Awk, Scala, Alice, Transact-SQL, Julia, Scheme, ABAP, Apex, VBScript, Rust, FoxPro, Prolog, F#, Fortran, Crystal, COBOL, Erlang, Dart, LabVIEW, Logo, ML, Bash, Lua, D } ______

Sign In or Register to comment.