#
msgid ""
msgstr ""
"Project-Id-Version: Modelica by Example 0.2.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-04-14 10:14-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../../source/behavior/equations/record_def.rst:6
msgid "Record Definitions"
msgstr "Record类型定义"

#: ../../source/behavior/equations/record_def.rst:8
msgid ""
"Earlier, we introduced the idea of a ``model`` definition.  Although we "
"haven't seen any yet, Modelica also includes a ``record`` type.  A "
"``record`` can have variables, just like a ``model``, but it is not allowed "
"to include equations.  Records are primarily used to group data together.  "
"But as we will see shortly, they are also very useful in describing the data"
" associated with :ref:`annotations`."
msgstr ""
"本书的前些章节，我们介绍了\ ``model``\ 类型的定义概念。\ "
"虽然目前为止我们还没有看到任何其他的类型，Modelica语言其实还包括\ "
"``record``\ 类型。\ "
"像\ ``model``\ 类型一样，\ ``record``\ 类型可以有自己的变量，但是不允许包含方程。\ "
"\ ``record``\ 类型主要用于数据的分组。\ "
"但是，在下面的\ :ref:`annotations`\ "
"章节中你会发现它们在描述与标注相关的数据时也非常有用。\ "

#: ../../source/behavior/equations/record_def.rst:16
msgid "Syntax"
msgstr "语法"

#: ../../source/behavior/equations/record_def.rst:18
msgid ""
"The ``record`` definition looks essentially like a ``model`` definition, but"
" without any equations:"
msgstr "\ ``record``\ 类型的定义看起来基本上类似于\ ``model``\ 类型，只是不包含任何的方程："

#: ../../source/behavior/equations/record_def.rst:27
msgid ""
"As with a ``model``, the definition starts and ends with the name of the "
"record being defined.  An explanation of the ``record`` can be included as a"
" string after the name.  All the variables associated with the record are "
"declared within the ``record`` definition."
msgstr ""
"像\ ``model``\ 定义那样，类型定义的开始和结束都会带有所定义的\ ``record``\ 类型名称。\ "
"对所定义的\ "
"``record``\ 类型的说明以字符串的形式紧跟类型名的后面。\ "
"与\ ``record``\ 类型相关联的所有变量都在\ "
"``record``\ 类型定义内声明。\ "

#: ../../source/behavior/equations/record_def.rst:32
msgid "The following are all examples of ``record`` definitions:"
msgstr "以下是\ ``record``\ 类型定义方面的实例："

#: ../../source/behavior/equations/record_def.rst:48
msgid "Record Constructors"
msgstr "Record类型的构造函数"

#: ../../source/behavior/equations/record_def.rst:52
msgid ""
"Now that we know how to define a ``record``, we need to know how to create "
"one.  If we are declaring a variable that happens to be a ``record``, the "
"declaration itself will create an instance of the ``record`` and we can "
"specify the values of variables inside the record using modifications, "
"*e.g.*,"
msgstr ""
"现在，我们已经知道了如何定义一个\ ``record``\ 类型。\ "
"那应该如何创建\ ``record``\ "
"类型呢？如果我们想声明一个变量，恰巧这个变量属于\ ``record``\ 类型，变量声明的本身就会创建一个\ ``record``\ "
"类型实例，而且我们还可以通过修改语句指定\ ``record``\ 类型内的变量值，例如："

#: ../../source/behavior/equations/record_def.rst:62
msgid ""
"But there are some cases where we might want to create an instance of a "
"``record`` that isn't a variable (*e.g.*, to use in an expression, pass as "
"an argument to a function or use in a modification).  For each ``record`` "
"definition, a function is automatically generated with the **same name** as "
"the ``record``.  This function is called the \"record constructor\".  The "
"record constructor has input arguments that match the variables inside the "
"``record`` definition and returns an instance of that ``record``.  So in the"
" case of the ``Vector`` definition above, we could also initialize a "
"``parameter`` using the record constructor as follows:"
msgstr ""
"但在某些情况下，我们可能希望创建一个\ ``record``\ "
"类型而不是一个变量（例如，在表达式中使用，作为参数传递给函数或者在修改功能中使用）。\ "
"对每个\ ``record``\ 类型定义，都会自动生成与\ "
"``record``\ 类型名称\ **完全相同的函数名**\ 。\ "
"这个函数称为“记录构造函数”。\ "
"记录构造函数输入与\ ``record``\ "
"类型内部定义相匹配的变量，并返回一个\ ``record``\ 类型实例。\ "
"所以，在上述\ ``Vector``\ "
"定义实例中，我们也可以通过记录构造函数初始化\ ``parameter``\ 变量，如下所示："

#: ../../source/behavior/equations/record_def.rst:77
msgid ""
"In this case, the value for ``v`` comes from the **expression** "
"``Vector(x=1.0, y=2.0, z=0.0)`` which is a call to the record constructor."
msgstr ""
"在这种情况下，变量\ ``v``\ 的值通过\ **表达式**\ ``Vector(x=1.0, y=2.0, z=0.0)``\ "
"调用记录构造函数进行赋值。\ "
