Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
「parameter」の意味や使い方 わかりやすく解説 Weblio辞書
[go: Go Back, main page]

parameterとは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > 日本語表現辞典 > parameterの意味・解説 

パラメータ

英語:parameter

「パラメータ」の基本的な意味

「パラメータ」とは、ある現象システム特徴づける変数のことである。これらの変数は、システム挙動性能決定する要素となり、最適化制御において重要な役割を果たす例えば、物理学における質量電荷プログラミングにおける関数の引数統計学における平均分散などがパラメータとして扱われる

「パラメータ」の英語表記

「パラメータ」の英語表記は ""parameter"" である。

「パラメータ」の類語・類語の意味

変数

変数」は、数学物理学などの分野用いられる概念で、値が変化することができる量を指す。パラメータも変数一種であるが、パラメータは特にシステム現象特徴づける変数として扱われる

係数

係数」は、数学物理学において、変数前に掛けられる定数を指す。係数はパラメータと同様にシステム性質決定する要素であるが、係数定数であり、変数ではない。

引数

引数」は、プログラミングにおいて、関数メソッド渡される値を指す。引数はパラメータとして機能し関数挙動決定する

「パラメータ」に関連する用語・知識

パラメータ推定

パラメータ推定」は、統計学において、観測データからパラメータの値を推定することである。最尤推定ベイズ推定などの手法が用いられる

パラメータチューニング

「パラメータチューニング」は、システムモデル性能向上させるために、パラメータの値を調整することである。機械学習においては、ハイパーパラメータチューニングとも呼ばれる

パラメトリックモデル

「パラメトリックモデル」は、パラメータによって特徴づけられるモデルのことである。対照的に、パラメータを用いないモデルはノンパラメトリックモデルと呼ばれる

「パラメータ」を用いた例文

1. このシミュレーションでは、摩擦係数空気抵抗などのパラメータを調整して現実に近い挙動再現している。 2. 研究者たちは、新し材料熱伝導率というパラメータを測定する実験行った。 3. 機械学習アルゴリズム性能向上させるために、学習率や正則化項の強さといったパラメータを調整することが重要である。

parameter

別表記:パラメーター

「parameter」とは、パラメーター補助変数媒介変数のことを意味する英語表現である。

「parameter」とは・「parameter」の意味

「parameter」は、パラメーター補助変数媒介変数意味する名詞である。数学分野では、式や関数の定義の中で使われる、値が未知定数のことを指す。統計学分野では、母集団特性を表す未知定数が「parameter」である。ITの分野では、あるシステムモデムアルゴリズム関数などの内部設定値条件を表す変数を指す。たとえば、機械学習アルゴリズムにおいてはモデル学習率やパッチサイズ、エポック数などが「parameter」にあたる。

「parameter」の複数形は「parameters」である。

「parameter」の発音・読み方

「parameter」の発音記号は「pərǽmətər」である。発音に近いカタカナ読みだと「パラマター」になる。

「parameter」の語源・由来

「parameter」の語源は、ギリシャ語で横や近く意味するpara-」と、測定器基準意味するmetron」である。元々は数学物理学分野において、他の変数とは独立して値が定まる定数のことを指していた。その後統計学情報科学技術分野でも使われるようになった考えられる

「parameter」の略語

「parameter」の一般的な略語は「param」である。しかし、統計学機械学習分野では「prm」が使われることもある。

「parameter(媒介変数)」の解説

「parameter(媒介変数)」とは、数学多様体における曲線局面において、「parameter(媒介変数)」が自由に動くことによって多様体上の点が移動することを表現するための変数である。たとえば、二次元平面上の点(x、y)に媒介変数tを用い場合次のように表現できる

x=f(t)
y=g(t)

この場合、f(t)とg(t)媒介変数tの関数である。tの値が変化することによって、二次元平面上の点が移動する

「parameter」と「config」の違い

「parameter」と「config」はどちらもコンピューター科学において重要な単語であり、設定関連する情報を示す言葉だが、意味は異なる。「parameter」は一般にプログラムシステム動作制御するために使用される変数であり、プログラム実行時に値が変更可能であることが一般的である。一方、「config」はアプリケーションシステム設定ファイル保存される静的設定情報を指す。これらの設定アプリケーションの実行前にロードされるため、実行中変更することはできない

「parameter」を含む様々な用語の解説

「parameter」を含む用語としては、次のようなものが挙げられる

「product parameters」とは


Product parameters」は、製品設計開発において、その製品機能性能定義するために使用されるパラメーターを指す。これらのパラメーターは、製品の品質信頼性コスト生産性安全性などに大きな影響与える。

「parameter setting」とは


「parameter setting」は、パラメーター設定のことである。

「parameter estimation」とは


「parameter estimationは、パラメーター推定を指す。統計学機械学習分野において、あるモデルパラメーターデータから推定することである。

「parameter tuning」とは


「parameter tuning」は、機械学習システム開発などにおいてパラメーター最適地を探索しシステムモデル性能改善することを意味する

「parameter space」とは


「parameter space」は、パラメーター空間のことである。機械学習統計学分野で、あるモデルパラメーター全体集合を指す。

「system parameters」とは


system parameters」は、あるシステム制御必要なパラメーター意味する

「design parameters」とは


design parameters」は、ある製品設計において、その製品の形状サイズ素材機能など決定するためのパラメーターを指す。

「parameter」の使い方・例文

「parameter」を用いた例文には、次のようなものがある。

In order to optimize the performance of the machine learning model, we need to set the parameters appropriately.(機械学習モデルパフォーマンス最適化するには、パラメーター適切に設定する必要がある)」

「The engineer adjusted the set parameters of the robotic arm to increase its range of motion.(エンジニアは、ロボットアーム設定パラメーター調整して可動域広げた)」

「The performance of the algorithm was significantly improved after the parameter tuning process.(パラメーターチューニングの実行後、アルゴリズムパフォーマンス大幅に向上した)」

「The parameter values for the statistical model were estimated using maximum likelihood estimation.(統計モデルパラメーター値は、最尤推定使用して推定された)」

パラメーター【parameter】


パラメーター

【英】parameter

変数値のこと。コンピュータ・プログラムでは、パラメーターはプログラム走らせるごとに変動される。リストレンタル・セレクションのパラメーターは、各リストから適切な選択をするための基準項目のことである。例えば、パラメーターは男性名年収5万ドル上で最近購入した人の名前を選ぶというようにセットされる

パラメータ

読み方:パラメータ
【英】:parameter

関連するカテゴリ
インバータ

インバータをどう使用するかの設定値


パラメータ

別名:パラメーター
【英】parameter

パラメータとは、プログラム動作条件与えるための情報のことである。

プログラムでは、多くユーザー異な好み応えるために、一つ機能でも動作変えられるように作成されることが多い。それらは、ユーザー設定値ボタンなどで選択することができるようになっており、動作変更は、プログラム内部ではパラメータによって制御されている。

パラメータは、プログラミングでは引数呼ばれることもあり、プログラム部品実行する場合に、引数によって部品動作についての指示起動が行う。

プログラミングのほかの用語一覧
コーディング:  打ち切り誤差  配列  バグ  パラメータ  パーサ  ハンガリー記法  番兵

Parameter クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

アプリケーション変数ユーザー IDユーザー選択、および他のデータバインドするためにデータ ソース コントロール使用する機構提供しますASP.NETすべてのパラメータ型の基本クラスとして機能します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Class Parameter
    Implements ICloneable, IStateManager
public class Parameter : ICloneable, IStateManager
public ref class Parameter : ICloneable, IStateManager
public class Parameter implements ICloneable,
 IStateManager
public class Parameter implements ICloneable,
 IStateManager
解説解説

Parameter クラスは、ASP.NET データ ソース コントロールデータ選択フィルタ処理変更使用するパラメータ化された SQL クエリフィルタ式、またはビジネス オブジェクト メソッド呼び出しパラメータ表しますParameter オブジェクトは、ParameterCollection オブジェクト格納されます。Parameter オブジェクト実行時評価され、それらのオブジェクトが表す変数の値をデータ ソース コントロール使用するメソッドバインドしてデータやり取ります。

ControlParameter、CookieParameter、SessionParameter、ProfileParameter、QueryStringParameter など、ASP.NET提供されるパラメータ クラスは、Web ベースデータ アプリケーションビルドするデータ ソース コントロールおよびデータ バインド コントロール使用します。これらのクラスデータ ソース コントロール使用されWeb アプリケーション内の特定の種類の値を、SQL クエリ文字列ビジネス オブジェクト メソッドパラメータなどに含まれるプレースホルダにバインドます。たとえば、ControlParameter クラスWeb サーバー コントロールパブリック プロパティバインドするために使用されSessionParameter クラスユーザー セッションの値をバインドするために使用されます。また、QueryStringParameter クラスCookieParameter クラスは、HttpRequest クラスの値にバインドするために使用されます。独自のカスタム パラメータ型を実装する場合は、基本 Parameter クラス拡張します。

Parameter オブジェクトは非常に簡単なオブジェクトです。このオブジェクトには、Name プロパティType プロパティあります。このオブジェクトは、宣言によって表すことができ、複数HTTP 要求にわたり状態を追跡できますパラメータが値にバインドされたときのために、すべてのパラメータDefaultValue プロパティサポートしていますが、この値は実行時null 参照 (Visual Basic では Nothing) と評価されます。

データ ソース コントロールParameter オブジェクトコレクション使用する場合コレクション内でのオブジェクト順序が重要となりますパラメータ使用されるしくみの詳細については、「SqlDataSource コントロールにおけるパラメータ使用」および「ObjectDataSource コントロールにおけるパラメータ使用」を参照してください

使用例使用例

宣言シナリオで、Parameter オブジェクト使用してListBox コントロール表示されデータDropDownList コントロール選択された値にバインドする方法次のコード例示しますControlParameter オブジェクトは、フォームの SqlDataSource コントロールの SelectParameters コレクション追加され、SelectCommand プロパティの "@Title" プレースホルダ テキスト対応します

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <body>
    <form runat="server">

      <p><asp:dropdownlist
          id="DropDownList1"
          runat="server"
          autopostback="True">
          <asp:listitem selected>Sales Representative</asp:listitem>
          <asp:listitem>Sales Manager</asp:listitem>
          <asp:listitem>Vice President, Sales</asp:listitem>
      </asp:dropdownlist></p>

      <asp:sqldatasource
          id="SqlDataSource1"
          runat="server"
          connectionstring="<%$ ConnectionStrings:MyNorthwind%>"
          selectcommand="SELECT LastName FROM Employees WHERE
 Title = @Title">
          <selectparameters>
              <asp:controlparameter name="Title"
 controlid="DropDownList1" propertyname="SelectedValue"/>
          </selectparameters>
      </asp:sqldatasource>

      <p><asp:listbox
          id="ListBox1"
          runat="server"
          datasourceid="SqlDataSource1"
          datatextfield="LastName">
      </asp:listbox></p>

    </form>
  </body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <body>
    <form runat="server">

      <p><asp:dropdownlist
          id="DropDownList1"
          runat="server"
          autopostback="True">
          <asp:listitem selected>Sales Representative</asp:listitem>
          <asp:listitem>Sales Manager</asp:listitem>
          <asp:listitem>Vice President, Sales</asp:listitem>
      </asp:dropdownlist></p>

      <asp:sqldatasource
          id="SqlDataSource1"
          runat="server"
          connectionstring="<%$ ConnectionStrings:MyNorthwind%>"
          selectcommand="SELECT LastName FROM Employees WHERE Title = @Title">
          <selectparameters>
              <asp:controlparameter name="Title" controlid="DropDownList1"
 propertyname="SelectedValue"/>
          </selectparameters>
      </asp:sqldatasource>

      <p><asp:listbox
          id="ListBox1"
          runat="server"
          datasourceid="SqlDataSource1"
          datatextfield="LastName">
      </asp:listbox></p>

    </form>
  </body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
  <BODY>
    <FORM runat="server">

      <p><asp:DropDownList
          id="DropDownList1"
          runat="server"
          AutoPostBack="True">
          <asp:ListItem Selected>Sales Representative</asp:ListItem>
          <asp:ListItem>Sales Manager</asp:ListItem>
          <asp:ListItem>Vice President, Sales</asp:ListItem>
      </asp:DropDownList></p>

      <asp:SqlDataSource
          id="SqlDataSource1"
          runat="server"
          ConnectionString="Data Source=localhost;Integrated Security=SSPI;Initial
 Catalog=Northwind;"
          SelectCommand="SELECT LastName FROM Employees WHERE Title = @Title">
          <SelectParameters>
              <asp:ControlParameter Name="Title" ControlId="DropDownList1"
 PropertyName="SelectedValue"/>
          </SelectParameters>
      </asp:SqlDataSource>

      <p><asp:ListBox
          id="ListBox1"
          runat="server"
          DataSourceID="SqlDataSource1"
          DataTextField="LastName">
      </asp:ListBox></p>

    </FORM>
  </BODY>
</HTML>

プログラム シナリオで、Parameter オブジェクト使用して、DataGrid コントロール表示されデータDropDownList コントロール選択された値にバインドするコード例次に示しますページ最初に読み込まれときにはDropDownList コントロールの値は選択されていないため、Parameter オブジェクトDefaultValue プロパティ使用されます。

<%@ Page Language="VB" AutoEventWireup="false"
 CodeFile="param1avb.aspx.vb" Inherits="param1avb_aspx"
 %>
<html  >
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList
          runat="server"
          AutoPostBack="True"
          id="DropDownList1">
            <asp:ListItem Value="USA">USA</asp:ListItem>
            <asp:ListItem Value="UK">UK</asp:ListItem>
         </asp:DropDownList>

        <asp:DataGrid
          runat="server"
          id="DataGrid1" />    
    </div>
    </form>
</body>
</html>
<%@ Page Language="C#" CodeFile="param1acs.aspx.cs" Inherits="param1acs_aspx"
 %>
<html  >
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList
          runat="server"
          AutoPostBack="True"
          id="DropDownList1">
            <asp:ListItem Value="USA">USA</asp:ListItem>
            <asp:ListItem Value="UK">UK</asp:ListItem>
         </asp:DropDownList>

        <asp:DataGrid
          runat="server"
          id="DataGrid1" />    
    </div>
    </form>
</body>
</html>
<%@ Page Language="VJ#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<SCRIPT runat="server">
private void Page_Load(Object sender, System.EventArgs
 e)
{
    SqlDataSource sqlSource = new SqlDataSource("Data Source=localhost;"
 
        + "Integrated Security=SSPI;Initial Catalog=Northwind;",
        "SELECT FirstName, LastName FROM Employees WHERE Country = @country;");

    ControlParameter country = new ControlParameter();
    country.set_Name("country");
    country.set_Type(System.TypeCode.String);
    country.set_ControlID("DropDownList1");
    country.set_PropertyName("SelectedValue");

    // If the DefaultValue is not set, the DataGrid does not
    // display anything on the first page load. This is because
    // on the first page load, the DropDownList has no
    // selected item, and the ControlParameter evaluates to
    // String.Empty.
    country.set_DefaultValue("USA");

    sqlSource.get_SelectParameters().Add(country);

    // Add the SqlDataSource to the page controls collection.
    get_Page().get_Controls().Add(sqlSource);

    DataGrid1.set_DataSource(sqlSource);
    DataGrid1.DataBind();
} //Page_Load
</SCRIPT>

<HTML>
    <BODY>
        <FORM runat="server">

        <asp:DropDownList
          runat="server"
          AutoPostBack="True"
          id="DropDownList1">
            <asp:ListItem Value="USA">USA</asp:ListItem>
            <asp:ListItem Value="UK">UK</asp:ListItem>
         </asp:DropDownList>

        <asp:DataGrid
          runat="server"
          id="DataGrid1" />

        </FORM>
    </BODY>
</HTML>

次の分離コード モジュールは、前の Web フォーム ページ使用されます。

Partial Class param1avb_aspx
   Inherits System.Web.UI.Page
    Private Sub Page_Load(ByVal
 sender As Object, ByVal
 e As System.EventArgs)

        Dim sqlSource As SqlDataSource

        sqlSource = New SqlDataSource(ConfigurationManager.ConnectionStrings("MyNorthwind").ConnectionString,
 "SELECT FirstName, LastName FROM Employees WHERE Country = @country;")
        Dim country As New
 ControlParameter()
        country.Name = "country"
        country.Type = TypeCode.String
        country.ControlID = "DropDownList1"
        country.PropertyName = "SelectedValue"
        ' If the DefaultValue is not set, the DataGrid does not
        ' display anything on the first page load. This is because
        ' on the first page load, the DropDownList has no
        ' selected item, and the ControlParameter evaluates to
        ' String.Empty.
        country.DefaultValue = "USA"
        sqlSource.SelectParameters.Add(country)

        ' Add the SqlDataSource to the page controls collection.
        Page.Controls.Add(sqlSource)


        DataGrid1.DataSource = sqlSource
        DataGrid1.DataBind()

    End Sub 'Page_Load
End Class
public partial class param1acs_aspx : System.Web.UI.Page
 
{
    private void Page_Load(object sender, System.EventArgs
 e)
    {
        SqlDataSource sqlSource = new SqlDataSource(
          ConfigurationManager.ConnectionStrings["MyNorthwind"].ConnectionString
,
          "SELECT FirstName, LastName FROM Employees WHERE Country = @country;");

        ControlParameter country = new ControlParameter();
        country.Name = "country";
        country.Type = TypeCode.String;
        country.ControlID = "DropDownList1";
        country.PropertyName = "SelectedValue";

        // If the DefaultValue is not set, the DataGrid does not
        // display anything on the first page load. This is because
        // on the first page load, the DropDownList has no
        // selected item, and the ControlParameter evaluates to
        // String.Empty.
        country.DefaultValue = "USA";

        sqlSource.SelectParameters.Add(country);

        // Add the SqlDataSource to the page controls collection.
        Page.Controls.Add(sqlSource);

        DataGrid1.DataSource = sqlSource;
        DataGrid1.DataBind();
    }
}

Parameter クラス拡張してデータ バインディング シナリオデータ ソース コントロールと他のコントロール使用できる新しパラメータ型を作成する方法次のコード例示しますデータ ソース コントロールは、StaticParameter パラメータ使用してWeb フォーム ページ上で宣言されオブジェクトの値 (通常は文字列) にバインドできます

Imports System
Imports System.ComponentModel
Imports System.Security.Permissions
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls

Namespace Samples.AspNet

<AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)>
 _
Public Class StaticParameter
   Inherits Parameter


   Public Sub New()
   End Sub

  ' The StaticParameter(string, object) constructor
  ' initializes the DataValue property and calls the
  ' Parameter(string) constructor to initialize the Name property.
   Public Sub New(name As
 String, value As Object)
      MyBase.New(name)
      DataValue = value
   End Sub

   ' The StaticParameter(string, TypeCode, object) constructor
   ' initializes the DataValue property and calls the
   ' Parameter(string, TypeCode) constructor to initialize the Name
 and
   ' Type properties.
   Public Sub New(name As
 String, type As TypeCode, value As
 Object)
      MyBase.New(name, type)
      DataValue = value
   End Sub
   ' The StaticParameter copy constructor is provided to ensure that
   ' the state contained in the DataValue property is copied to new
   ' instances of the class.
   Protected Sub New(original
 As StaticParameter)
      MyBase.New(original)
      DataValue = original.DataValue
   End Sub

   ' The Clone method is overridden to call the
   ' StaticParameter copy constructor, so that the data in
   ' the DataValue property is correctly transferred to the
   ' new instance of the StaticParameter.
   Protected Overrides Function
 Clone() As Parameter
      Return New StaticParameter(Me)
   End Function

   ' The DataValue can be any arbitrary object and is stored in ViewState.
   Public Property DataValue() As
 Object
      Get
         Return ViewState("Value")
      End Get
      Set
         ViewState("Value") = value
      End Set
   End Property
   ' The Value property is a type safe convenience property
   ' used when the StaticParameter represents string data.
   ' It gets the string value of the DataValue property, and
   ' sets the DataValue property directly.
   Public Property Value() As
 String
      Get
         Dim o As Object
 = DataValue
         If o Is Nothing
 OrElse Not TypeOf o Is
 String Then
            Return String.Empty
         End If
         Return CStr(o)
      End Get
      Set
         DataValue = value
         OnParameterChanged()
      End Set
   End Property
   ' The Evaluate method is overridden to return the
   ' DataValue property instead of the DefaultValue.
   Protected Overrides Function
 Evaluate(context As HttpContext, control As
 Control) As Object
      If context Is Nothing
 Then
          Return Nothing
      Else
          Return DataValue
      End If
   End Function
End Class ' StaticParameter

End Namespace ' Samples.AspNet
namespace Samples.AspNet {

  using System;
  using System.ComponentModel;
  using System.Security.Permissions;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;

  [AspNetHostingPermission(SecurityAction.Demand, Level=AspNetHostingPermissionLevel.Minimal)]
  public class StaticParameter : Parameter
 {

    public StaticParameter() {
    }
    // The StaticParameter(string, object) constructor
    // initializes the DataValue property and calls the
    // Parameter(string) constructor to initialize the Name property.
    public StaticParameter(string name, object
 value) : base(name) {
      DataValue = value;
    }
    // The StaticParameter(string, TypeCode, object) constructor
    // initializes the DataValue property and calls the
    // Parameter(string, TypeCode) constructor to initialize the Name
 and
    // Type properties.
    public StaticParameter(string name, TypeCode
 type, object value) : base(name, type) {
      DataValue = value;
    }
    // The StaticParameter copy constructor is provided to ensure that
    // the state contained in the DataValue property is copied to new
    // instances of the class.
    protected StaticParameter(StaticParameter original) : base(original)
 {
      DataValue = original.DataValue;
    }

    // The Clone method is overridden to call the
    // StaticParameter copy constructor, so that the data in
    // the DataValue property is correctly transferred to the
    // new instance of the StaticParameter.
    protected override Parameter Clone() {
      return new StaticParameter(this);
    }
    // The DataValue can be any arbitrary object and is stored in ViewState.
    public object DataValue {
      get {
        return ViewState["Value"];
      }
      set {
        ViewState["Value"] = value;
      }
    }
    // The Value property is a type safe convenience property
    // used when the StaticParameter represents string data.
    // It gets the string value of the DataValue property, and
    // sets the DataValue property directly.
    public string Value {
      get {
        object o = DataValue;
        if (o == null || !(o is string))
          return String.Empty;
        return (string)o;
      }
      set {
        DataValue = value;
        OnParameterChanged();
      }
    }

    // The Evaluate method is overridden to return the
    // DataValue property instead of the DefaultValue.
    protected override object Evaluate(HttpContext context, Control
 control) {

      if (context.Request == null)
          return null;

      return DataValue;
    }
  }
}
package Samples.AspNet ;
import System.* ;
import System.ComponentModel.* ;
import System.Web.UI.* ;
import System.Web.UI.WebControls.* ;

public class StaticParameter extends Parameter
{
    public StaticParameter()
    {
    } //StaticParameter


    // The StaticParameter(string, object) constructor
    // initializes the DataValue property and calls the 
    // Parameter(string) constructor to initialize the Name property.
    public StaticParameter(String name, Object value)
    {
        super(name);
        set_DataValue(value);
    } //StaticParameter

    
    // The StaticParameter(string, TypeCode, object) constructor
    // initializes the DataValue property and calls the 
    // Parameter(string, TypeCode) constructor to initialize the Name
 and 
    // Type properties.
    public StaticParameter(String name, TypeCode type, Object
 value)
    {
        super(name, type);
        set_DataValue(value);
    } //StaticParameter

    
    // The StaticParameter copy constructor is provided to ensure that
 
    // the state contained in the DataValue property is copied to new
    // instances of the class. 
    protected StaticParameter(StaticParameter original)
    {
        super(original);
        set_DataValue(original.get_DataValue());
    } //StaticParameter


    // The Clone method is overridden to call the 
    // StaticParameter copy constructor, so that the data in 
    // the DataValue property is correctly transferred to the 
    // new instance of the StaticParameter.
    protected Parameter Clone()
    {
        return new StaticParameter(this);
    } //Clone

    
    // The DataValue can be any arbitrary object and is stored in ViewState.
    /** @property 
     */
    public Object get_DataValue()
    {
        return get_ViewState().get_Item("Value");
    } //get_DataValue


    /** @property 
     */
    public void set_DataValue(Object value)
    {
        get_ViewState().set_Item("Value", value);
    } //set_DataValue

    
    // The Value property is a type safe convenience property 
    // used when the StaticParameter represents string data.
    // It gets the string value of the DataValue property, and
    // sets the DataValue property directly.
    /** @property 
     */
    public String get_Value()
    {
        Object o = get_DataValue();

        if (o == null || !(o instanceof String))
 {
            return String.Empty;
        }

        return (String)(o);
    } //get_Value


    /** @property 
     */
    public void set_Value(String value)
    {
        set_DataValue(value);
        OnParameterChanged();
    } //set_Value

    
    // The Evaluate method is overridden to return the 
    // DataValue property instead of the DefaultValue.
    protected Object Evaluate(Control control)
    {
        return get_DataValue();
    } //Evaluate
} //StaticParameter
継承階層継承階層
System.Object
  System.Web.UI.WebControls.Parameter
     派生クラス
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter メンバ
System.Web.UI.WebControls 名前空間
ControlParameter クラス
CookieParameter クラス
FormParameter クラス
QueryStringParameter
SessionParameter
ParameterCollection
DataSourceControl
その他の技術情報
データ ソース コントロールパラメータ使用

Parameter コンストラクタ ()

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

Parameter クラス新し既定インスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter クラス
Parameter メンバ
System.Web.UI.WebControls 名前空間

Parameter コンストラクタ (Parameter)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

指定した元のインスタンスの値を使用してParameter クラス新しインスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Protected Sub New ( _
    original As Parameter _
)
Dim original As Parameter

Dim instance As New Parameter(original)
protected Parameter (
    Parameter original
)
protected:
Parameter (
    Parameter^ original
)
protected Parameter (
    Parameter original
)
protected function Parameter (
    original : Parameter
)

パラメータ

original

現在のインスタンス初期化の基になる Parameter インスタンス

解説解説

Parameter(Parameter) コンストラクタは、Parameter インスタンスクローン作成するための protected コピー コンストラクタです。NameTypeDefaultValueDirection、ConvertEmptyStringToNull の各プロパティの値は、すべて新しインスタンス転送されます。

使用例使用例

Parameter クラス拡張したクラスから Parameter(Parameter) コンストラクタ呼び出してクラスオブジェクト適切なクローン動作実装する方法次のコード例示します。このコード例Parameter クラス概要取り上げているコード例一部分です。

' The StaticParameter copy constructor is provided to ensure that
' the state contained in the DataValue property is copied to new
' instances of the class.
Protected Sub New(original
 As StaticParameter)
   MyBase.New(original)
   DataValue = original.DataValue
End Sub

' The Clone method is overridden to call the
' StaticParameter copy constructor, so that the data in
' the DataValue property is correctly transferred to the
' new instance of the StaticParameter.
Protected Overrides Function
 Clone() As Parameter
   Return New StaticParameter(Me)
End Function
// The StaticParameter copy constructor is provided to ensure that
// the state contained in the DataValue property is copied to new
// instances of the class.
protected StaticParameter(StaticParameter original) : base(original)
 {
  DataValue = original.DataValue;
}

// The Clone method is overridden to call the
// StaticParameter copy constructor, so that the data in
// the DataValue property is correctly transferred to the
// new instance of the StaticParameter.
protected override Parameter Clone() {
  return new StaticParameter(this);
}
// The StaticParameter copy constructor is provided to ensure that 
// the state contained in the DataValue property is copied to new
// instances of the class. 
protected StaticParameter(StaticParameter original)
{
    super(original);
    set_DataValue(original.get_DataValue());
} //StaticParameter


// The Clone method is overridden to call the 
// StaticParameter copy constructor, so that the data in 
// the DataValue property is correctly transferred to the 
// new instance of the StaticParameter.
protected Parameter Clone()
{
    return new StaticParameter(this);
} //Clone
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter クラス
Parameter メンバ
System.Web.UI.WebControls 名前空間
Clone

Parameter コンストラクタ (String, TypeCode, String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

DefaultValue プロパティ指定した名前、型、文字列使用してParameter クラス新しインスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

Parameter(String,TypeCode,String) コンストラクタ使用してUpdate メソッド呼び出す前に、AccessDataSource コントロールの UpdateParameters コレクション更新パラメータ オブジェクト追加する方法次のコード例示します

<SCRIPT runat="server">
Private Sub UpdateRecords(source As
 Object, e As EventArgs)

  ' This method is an example of batch updating using a
  ' data source control. The method iterates through the rows
  ' of the GridView, extracts each CheckBox from the row and, if
  ' the CheckBox is checked, updates data by calling the Update
  ' method of the data source control, adding required parameters
  ' to the UpdateParameters collection.

  Dim cb As CheckBox
  Dim row As GridViewRow

  For Each row In GridView1.Rows

    cb = CType(row.Cells(0).Controls(1), CheckBox)
    If cb.Checked Then

      Dim oid As String
      oid = CType(row.Cells(1).Text, String)

      Dim param1 As New
 Parameter("date", TypeCode.DateTime, DateTime.Now.ToString())
      MyAccessDataSource.UpdateParameters.Add(param1)

      Dim param2 As New
 Parameter("orderid", TypeCode.String, oid)
      MyAccessDataSource.UpdateParameters.Add(param2)

      MyAccessDataSource.Update()
      MyAccessDataSource.UpdateParameters.Clear()
    End If
  Next
End Sub ' UpdateRecords
</SCRIPT>
<SCRIPT runat="server">
private void UpdateRecords(Object source, EventArgs
 e)
{
  // This method is an example of batch updating using a
  // data source control. The method iterates through the rows
  // of the GridView, extracts each CheckBox from the row and, if
  // the CheckBox is checked, updates data by calling the Update
  // method of the data source control, adding required parameters
  // to the UpdateParameters collection.
  CheckBox cb;
  foreach(GridViewRow row in this.GridView1.Rows)
 {
    cb = (CheckBox) row.Cells[0].Controls[1];
    if(cb.Checked) {
      string oid = (string) row.Cells[1].Text;
      MyAccessDataSource.UpdateParameters.Add(new Parameter("date"
,TypeCode.DateTime,DateTime.Now.ToString()));
      MyAccessDataSource.UpdateParameters.Add(new Parameter("orderid"
,TypeCode.String,oid));
      MyAccessDataSource.Update();
      MyAccessDataSource.UpdateParameters.Clear();
    }
  }
}
</SCRIPT>
<SCRIPT runat="server">
    private void UpdateRecords(Object source,
 System.EventArgs e)
    {
        // This method is an example of batch updating using a
        // data source control. The method iterates through the rows
        // of the GridView, extracts each CheckBox from the row and,
 if
        // the CheckBox is checked, updates data by calling the Update
        // method of the data source control, adding required parameters
        // to the UpdateParameters collection.
        CheckBox cb;
        for (int iCtr = 0; 
                iCtr < this.GridView1.get_Rows().get_Count();
 iCtr++) {
            GridViewRow row = this.GridView1.get_Rows().get_Item(iCtr);
            cb = (CheckBox)row.get_Cells().get_Item(0).get_Controls().get_Item(1);
            if (cb.get_Checked()) {
                String oid = (String)(row.get_Cells().get_Item(1).get_Text());
                MyAccessDataSource.get_UpdateParameters().Add(new
 Parameter(
                    "date", System.TypeCode.DateTime, System.DateTime.get_Now().ToString()));
                MyAccessDataSource.get_UpdateParameters().Add(new
 Parameter(
                    "orderid", System.TypeCode.String, oid));
                MyAccessDataSource.Update();
                MyAccessDataSource.get_UpdateParameters().Clear();
            }
        }
    } //UpdateRecords
</SCRIPT>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter クラス
Parameter メンバ
System.Web.UI.WebControls 名前空間
Name
Type
DefaultValue

Parameter コンストラクタ (String, TypeCode)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

名前と型を指定して、Parameter クラス新しインスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

Parameter クラス拡張したクラスから Parameter(String,TypeCode) コンストラクタ呼び出してインスタンスName プロパティType プロパティ初期化する方法次のコード例示します。このコード例は、Parameter クラス概要取り上げているコード例一部分です。

' The StaticParameter(string, TypeCode, object) constructor
' initializes the DataValue property and calls the
' Parameter(string, TypeCode) constructor to initialize the Name and
' Type properties.
Public Sub New(name As
 String, type As TypeCode, value As
 Object)
   MyBase.New(name, type)
   DataValue = value
End Sub
// The StaticParameter(string, TypeCode, object) constructor
// initializes the DataValue property and calls the
// Parameter(string, TypeCode) constructor to initialize the Name and
// Type properties.
public StaticParameter(string name, TypeCode
 type, object value) : base(name, type) {
  DataValue = value;
}
// The StaticParameter(string, TypeCode, object) constructor
// initializes the DataValue property and calls the 
// Parameter(string, TypeCode) constructor to initialize the Name and
 
// Type properties.
public StaticParameter(String name, TypeCode type, Object value)
{
    super(name, type);
    set_DataValue(value);
} //StaticParameter
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter クラス
Parameter メンバ
System.Web.UI.WebControls 名前空間
Name
Type

Parameter コンストラクタ


Parameter コンストラクタ (String)

メモ : このコンストラクタは、.NET Framework version 2.0新しく追加されたものです。

名前を指定して、Parameter クラス新しインスタンス初期化します。

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

解説解説
使用例使用例

Parameter クラス拡張したクラスから Parameter(String) コンストラクタ呼び出してインスタンスName プロパティ初期化する方法次のコード例示します。このコード例Parameter クラス概要取り上げているコード例一部分です。

' The StaticParameter(string, object) constructor
' initializes the DataValue property and calls the
' Parameter(string) constructor to initialize the Name property.
 Public Sub New(name As
 String, value As Object)
    MyBase.New(name)
    DataValue = value
 End Sub
// The StaticParameter(string, object) constructor
// initializes the DataValue property and calls the
// Parameter(string) constructor to initialize the Name property.
public StaticParameter(string name, object
 value) : base(name) {
  DataValue = value;
}
// The StaticParameter(string, object) constructor
// initializes the DataValue property and calls the 
// Parameter(string) constructor to initialize the Name property.
public StaticParameter(String name, Object value)
{
    super(name);
    set_DataValue(value);
} //StaticParameter
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
Parameter クラス
Parameter メンバ
System.Web.UI.WebControls 名前空間
Name

Parameter プロパティ


パブリック プロパティパブリック プロパティ

プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ IsTrackingViewState Parameter オブジェクトビューステートへの変更保存しているかどうかを示す値を取得します
プロテクト プロパティ ViewState 同一ページ対す複数要求わたってParameter オブジェクトビューステート保存し復元できるようにする状態情報のディクショナリを取得します
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.Web.UI.IStateManager.IsTrackingViewState Parameter オブジェクトビューステートへの変更保存しているかどうかを示す値を取得します
参照参照

関連項目

Parameter クラス
System.Web.UI.WebControls 名前空間
ControlParameter クラス
CookieParameter クラス
FormParameter クラス
QueryStringParameter
SessionParameter
ParameterCollection
DataSourceControl

その他の技術情報

データ ソース コントロールパラメータ使用

Parameter メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.ICloneable.Clone 現在の Parameter インスタンス複製返します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.LoadViewState データ ソース ビューの、以前保存したビューステート復元します。
インターフェイスの明示的な実装 System.Web.UI.IStateManager.SaveViewState ページサーバーポストバックされた時間以降発生したParameter オブジェクトビューステートへの変更保存します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.TrackViewState Parameter オブジェクトがそのビューステート変更追跡するようにします。それにより、変更コントロールViewState オブジェクト格納して、同じページ対す複数要求わたって永続化できます
参照参照

関連項目

Parameter クラス
System.Web.UI.WebControls 名前空間
ControlParameter クラス
CookieParameter クラス
FormParameter クラス
QueryStringParameter
SessionParameter
ParameterCollection
DataSourceControl

その他の技術情報

データ ソース コントロールパラメータ使用

Parameter メンバ

アプリケーション変数ユーザー IDユーザー選択、および他のデータバインドするためにデータ ソース コントロール使用する機構提供しますASP.NETすべてのパラメータ型の基本クラスとして機能します

Parameter データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
プロテクト コンストラクタプロテクト コンストラクタ
パブリック プロパティパブリック プロパティ
プロテクト プロパティプロテクト プロパティ
  名前 説明
プロテクト プロパティ IsTrackingViewState Parameter オブジェクトビューステートへの変更保存しているかどうかを示す値を取得します
プロテクト プロパティ ViewState 同一ページ対す複数要求わたってParameter オブジェクトビューステート保存し復元できるようにする状態情報のディクショナリを取得します
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
明示的インターフェイスの実装明示的インターフェイス実装
  名前 説明
インターフェイスの明示的な実装 System.ICloneable.Clone 現在の Parameter インスタンス複製返します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.LoadViewState データ ソース ビューの、以前保存したビューステート復元します。
インターフェイスの明示的な実装 System.Web.UI.IStateManager.SaveViewState ページサーバーポストバックされた時間以降発生したParameter オブジェクトビューステートへの変更保存します
インターフェイスの明示的な実装 System.Web.UI.IStateManager.TrackViewState Parameter オブジェクトがそのビューステート変更追跡するようにします。それにより、変更コントロールViewState オブジェクト格納して、同じページ対す複数要求わたって永続化できます
インターフェイスの明示的な実装 System.Web.UI.IStateManager.IsTrackingViewState Parameter オブジェクトビューステートへの変更保存しているかどうかを示す値を取得します
参照参照

関連項目

Parameter クラス
System.Web.UI.WebControls 名前空間
ControlParameter クラス
CookieParameter クラス
FormParameter クラス
QueryStringParameter
SessionParameter
ParameterCollection
DataSourceControl

その他の技術情報

データ ソース コントロールパラメータ使用

引数

(parameter から転送)

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2026/02/04 06:49 UTC 版)

引数(ひきすう、: parameter, argument)は、数学における関数コンピュータプログラムにおける手続きにおいて、その外部と値をやりとりするための特別な変数、あるいはその変数の値のことである。

数学最適化問題に関するそれ(「パラメータ」とカタカナで表現されることが多い)については「媒介変数」の記事を参照のこと。以下は専らコンピュータプログラミングに関して説明する。

関数サブルーチンメソッド等を定義する時に、外部から値を渡される特別な変数として指定されるのが仮引数。関数(等)を呼出す式において、仮引数に対応する式(あるいはその値)が実引数である。実行時には、実引数の値を仮引数が受け取る。

「引数」を「いんすう」と読む読み方もある[1][2]が、術語としては変則的に湯桶読みして「ひきすう」としている。数学分野で因数(factor)との取違えを防ぐためといった理由もある。

仮引数

仮引数(かりひきすう、かびきすう、parameterformal parameter (formal argument))とは、手続き(プロシージャー)で定義される変数のうち、実行時に呼び出し元から渡される(実引数の)値を受けるものをいう。例としてC言語系言語における定義を挙げる:

int sum(int addend1, int addend2)
{
    return addend1 + addend2;
}

上の定義では、

  • int 型の仮引数 addend1
  • int 型の仮引数 addend2

2つを伴った関数 sum を定義している。定義の中で addend1addend2 が変数のように使用されていることに注目されたい。

実引数

実引数(じつひきすう、argumentactual argument (actual parameter))とは、プロシージャーを呼び出す際に渡す値のことで、プロシージャーの挙動(動作や結果)に作用する。変数やリテラルを含むを指定できる。C言語系言語において前に示した例中の関数 sum を用いた例を挙げる:

 sum(123, 456);

上の文は、

  • 仮引数 addend1 に対応する実引数 123
  • 仮引数 addend2 に対応する実引数 456

2つを関数 sum に渡している[3]

評価戦略

値渡し

値渡し(あたいわたし、call by value)は右辺値を渡す方法で、実引数として変数を渡したとしても、その値のみが渡される。もちろん即値や複雑な式を渡すこともでき、式の評価結果が渡される。その仕組みとしては、独立した新たな変数が関数内に用意され、元の値がコピーされる。そのため変数を渡したとしても、元の変数が変更されるという事はない。

これは「関数が副作用を持たない」という観点から、計算を中心とする言語では望ましい動作といえる。またそもそも代入概念のない関数型言語では、引数は必ず値で渡されると考えられる(ただし、代入が存在しない以上コピーをとる必要もない)。

値渡しを採用した言語としてはC言語MLAPLSchemeJava等が挙げられる。

ポインタ渡し

アドレス渡し(call-by-adress)とも呼ぶ。 C言語C++ポインタが保持する値はオブジェクトに対する参照(メモリアドレス)であり、後述の参照渡しの参照と似た性質を持つ。このため、ポインタ変数を値渡しすると、値渡しでありながら参照渡しと似たような効果を得ることができる。このため、ポインタ(=メモリアドレス)を値渡しする事を単なる値渡しと区別して俗にポインタ渡しなどと呼ぶ事もある。

名前渡し

ALGOLで採用されていた特徴的な機能の一つである。名前渡しでは値でも参照でもなく、式がそのまま渡される。基本的には参照渡しのように振る舞うが、式を参照するごとに値を計算して取り出す事が特徴である。C言語のプリプロセッサのマクロ展開と似ているが、引数と、ローカル変数が衝突しないように配慮はされる。 次のような例は名前渡しに特徴的な動作と言われる。

swap(x,y) {
 tmp = x;
 x = y;
 y = tmp;
}

この例に対し、x=i, y=a[i]という"式"を渡すとする。仮にi=2だったとすると、

tmp = x;
xiを渡されており、かつi=2と仮定したので、x=i=2となり、tmp2になる。
x = y;
xiを渡されているのでiyの値になる。ya[i]を渡されており、かつi=2と仮定したので、iaの2番目の値になる。
y = tmp;
ya[i]を渡されているが、前手順によりia[2]になっている。従ってy=a[a[2]]となる。最初の手順によりtmp2なので、a[a[2]]の値が2になる。

結果として、「iとa[i]の変数値を交換する」という期待に反し、予想もしない意外な挙動を示すこととなる。

このような複雑さもあって、ALGOL以外で名前渡しが採用された事例はほとんどない[4]

変数渡し

変数渡し(へんすうわたし、call by variable)は、変数そのもの(左辺値)を渡す方法で、この場合は仮引数に対する操作がそのまま実引数(渡された変数)に影響する。 多くの言語では(とくに配列のようなデータ構造を戻り値にできない場合)戻り値はひとつの値だけしか返せないが、データベース検索などで見つかったかどうかと、見つかったならその値も知らせるような場合に、見つかったかどうかを戻り値にして、検索結果の値は適当な引数を変更するといった使い方ができる。

参照渡し(さんしょうわたし、call by reference)はその実装手段の一つ(と見ることもできる[5])。変数に対する参照(アドレス情報)を渡す方法である(これは言語側が勝手に行う。C言語のように明示的にアドレス演算子を使うものは参照渡しとは呼ばない)。

その他、値渡しと同じようにコピーを渡しておいて、関数/サブルーチンからのリターン時に元の変数に変更結果をコピーしなおす方法もある(これは変数の共有(エイリアス)や再帰呼出しがあると奇妙な結果になることがある)。PL/Iでは、どちらの方法で実装しても良いと規定されている。

原始的な言語であるFORTRANは機械語のアドレス操作を反映した参照渡ししか持たなかった。これは特にcall by indexと呼ばれている。

他に変数渡しをサポートする言語としては、PascalPerlC++C#Quick BASIC等の構造化BASICなどが挙げられる。

なお変数渡しの関数・サブルーチンに、実引数として変数以外(右辺値)を渡した場合にどうなるかは、言語によって異なる。そのような操作が禁止されており、エラーが発生する言語(Pascal等)、テンポラリな変数を作成し、リターン時にそれを捨ててしまうため、値渡しと同じことができる言語(Quick BASIC等)、「未定義の動作」をひきおこし、何が起こるか全く予測がつかない言語(FORTRAN等)がある。C++ではconst修飾されていない型への参照に右辺値を渡すとエラーになるが、const修飾されていれば一時オブジェクトが作成され、また右辺値のみを参照できる「右辺値参照」が存在する。

値渡しによる引数の変更

C言語は値渡しのみをサポートするが、変数のポインタ(メモリアドレス)を取得することが可能であるため、変数へのポインタを値で渡す事で元の変数を変更できる。オフセット計算により配列や構造体の一部分を参照するコードも容易に記述できる。

しかしこれは、実際の変数領域を逸脱した部分をも参照できるので、あくまでも値渡しによる参照渡しのエミュレートである。参照渡しをサポートする言語でも内部的には同様の操作を行っているが、それは何らかの意味で言語の保護下にある参照となる。

参照の値渡し

参照渡しで言うところの「参照」と呼ばれているものと、特定の言語で「参照」と呼ばれているものが必ずしも同じでない事には注意が必要。例えば、Javaは参照型を扱うための『Javaの「参照」』を持つが、これはPascal等のポインタ相当で、『参照渡しの「参照」』とは概念が違うため、『Javaの「参照」』を渡しても参照渡しであるとは言えない。C言語の「ポインタの値渡し」と同じである[6] 。これは、Javaの参照型と似た参照型と、Javaのプリミティブ型に近い値型を持つC#を見ると理解しやすいだろう。C#では、特に指定しなければ参照型も値型も値渡しされるが、引数に ref もしくは out を使用する事によって参照渡しにする事ができる。『C#の値型』を渡すから値渡し、『C#の参照型』を渡すから参照渡しとはならない。

例:Pascalの変数渡し

Pascalの手続き(procedure)や関数(function)では、原始型(integer, realなど) の値渡しと変数渡しのどちらでも行える。変数渡しの場合は手続き・関数の引数にvarを付ける。

{ 手続き swap 内で a,b の値を入れ替える。
  sampleの i,j は変数渡しされ、aとi、bとjは同じアドレスを指して
  いるので、i,jの値は入れ替わる。 }

procedure swap(var a,b:integer);  { var をつけると変数渡し }
  var tmp:integer;
  begin
    tmp := a; a := b; b := tmp
  end;

procedure sample();
  var i, j:integer;
  begin
    i := 5;
    j := 10;
    swap(i, j);
    ... { iは10, jは5になる }
  end;

遅延評価

Haskellなどの遅延評価型関数言語に見られる形態で、値が実際に必要になるまで計算を行わない方法。概念上は、計算方法を遅延したthunkと呼ばれるオブジェクトが渡っていると考えられる。

脚注

  1. ^ KAKASI (Kanji Kana Simple inversion program) MIT
  2. ^ Javascript練習 09 京都産業大学
  3. ^ ちなみに、上の文の結果は 579 である
  4. ^ とはいえ中島秀之によれば、DEC 10 Prologの移植に際して、「修羅場を見た」と述べている。
  5. ^ 変数以外から成る任意の式に対して、その左辺値というものは考えづらいため。あたかも名前のない変数がテンポラリに作られるかのように振舞うものもある。
  6. ^ JavaHouse-Brewers の議論

関連項目



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「parameter」の関連用語

parameterのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



parameterのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
実用日本語表現辞典実用日本語表現辞典
Copyright © 2026実用日本語表現辞典 All Rights Reserved.
デジタル大辞泉デジタル大辞泉
(C)Shogakukan Inc.
株式会社 小学館
JERICHO CONSULTINGJERICHO CONSULTING
Copyright (C) 2026by Jericho Consulting Co.,Ltd. All Rights Reserved.
オムロン株式会社オムロン株式会社
© Copyright OMRON Corporation 1996-2026. All Rights Reserved.
IT用語辞典バイナリIT用語辞典バイナリ
Copyright © 2005-2026 Weblio 辞書 IT用語辞典バイナリさくいん。 この記事は、IT用語辞典バイナリの【パラメータ】の記事を利用しております。
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.
ウィキペディアウィキペディア
All text is available under the terms of the GNU Free Documentation License.
この記事は、ウィキペディアの引数 (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。 Weblio辞書に掲載されているウィキペディアの記事も、全てGNU Free Documentation Licenseの元に提供されております。

©2026 GRAS Group, Inc.RSS