リンクを新しいタブで開く
  1. いいね!
    興味なし

    Procedures and Functions (Delphi) - RAD Studio

    • When you declare a procedure or function, you specify its name, the number and type of parameters it takes, and, in the case of a function, the type of its return value; this part of the declaration is sometimes … さらに表示

    About Procedur…

    Procedures and functions, referred to collectively as routines, are self-contained statement blocks that can be called from different locations in a program. A function is a routine that returns a value when it executes. A procedure is a routine that does not return a value. Function calls, because they return a value, can be used as expressions in...

    Embarcadero/IDERA D…
    Calling Conventions

    When you declare a procedure or function, you can specify a calling convention using one of the directives register, pascal, cdecl, stdcall, safecall, and winapi. For example, Calling conventions determine the order in which parameters are passed to the routine. They also affect the removal of parameters from the stack, the use of registers for pas...

    Embarcadero/IDERA Documentation Wiki
    Forward and Interface Declar…

    The forwarddirective replaces the block, including local variable declarations and statements, in a procedure or function declaration. For example: declares a function called Calculate. Somewhere after the forward declaration, the routine must be redeclared in a defining declaration that includes a block. The defining declaration for Calculatemight...

    Embarcadero/IDERA Documentation Wiki
  1. In Delphi, functions are self-contained blocks of code that return a value when executed. They are used to perform specific tasks and can be called from different locations within a program.

    Example

    function AddNumbers(a, b: Integer): Integer;
    begin
    Result := a + b;
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    var
    sum: Integer;
    begin
    sum := AddNumbers(5, 10);
    ShowMessage('Sum is: ' + IntToStr(sum));
    end;
    コピーしました。

    In this example, the AddNumbers function takes two integer parameters and returns their sum. The Button1Click procedure calls this function and displays the result.

    Important Considerations

    Declaring Functions

    When declaring a function, you specify its name, parameters, and return type. The function body contains the code that executes when the function is called.

    Calling Conventions

    Delphi supports various calling conventions like register, pascal, cdecl, stdcall, and safecall. These conventions determine how parameters are passed to the function and how the stack is cleaned up.

    フィードバック
    ありがとうございました!詳細をお聞かせください
  2. <11> 手続きと関数 (標準 Pascal 範囲内での Delphi 入 …

    2024年11月24日 · 11. 手続きと関数 手続き と 関数 はいわゆる サブルーチン (副プログラム) です。 手続き (procedure) は実行時に値を返さないルーチンです。 …

  3. How to Use Functions and Procedures in Delphi

    2018年5月25日 · In Delphi, there are generally two types of subroutines: a function and a procedure. The usual difference between a function and a procedure is …

  4. Delphi Basics : Procedure command

    When a procedure is defined in a class, it is commonly called a Method. The same name may be used for more than one procedure as long as the Overload directive is used.

  5. Adrenaline and Delphi Procedures and Functions - L2Romans

    2024年11月1日 · Understanding procedures and functions in Delphi is fundamental for anyone interested in programming. They help break down tasks into manageable pieces, making your code …

  6. Procedural Types - GDK Software

    Procedural types in Delphi provide an elegant way to work with procedures and functions as first-class citizens. This capability empowers developers to assign procedures and functions to variables, pass …

  7. Delphi procedureってなに - Qiita

    2023年6月1日 · Delphi procedureとは 特定のタスクや操作を実行するための独立したブロックまたはサブルーチンを定義するために使用されるキーワード

  8. Procedures and Functions - Delphi for .NET Developer’s Guide [Book]

    最大1%キャッシュ バック
     · A procedure is a discrete program part that performs some particular task when it’s called and then returns to the calling part of your code. A function works the same …

  9. Procedures and Functions (Delphi) - RAD Studio

    2025年3月13日 · When you declare a procedure or function, you specify its name, the number and type of parameters it takes, and, in the case of a function, the type of its return value; this part of the …

  10. Delphi: Procedures and functions - greatdelphi.blogspot.com

    When you declare a procedure or function, you specify its name, the number and type of parameters it takes, and, in the case of a function, the type of its return value; this part of the declaration is …