计算机专业英语翻译,请高手帮忙~~~~~~谢谢

Subprograms in Package Declarations
Another kind of declaration that may be included in a package declaration is a subprogram declaration—either a procedure or a function declaration. An important aspect of declaring a subprogram in a package declaration is that we only write the
header of the subprogram, that is, the part that includes the name and the interface list defining the parameters (and result type for functions). We leave out the body of the subprogram. For example, suppose we have a package declaration that defines
a bit-vector subtype:
subtype word32 is bit_vector(31 downto 0);
We can include in the package a procedure to do addition on word32 values that represent signed integers. The procedure declaration in the package declaration is procedure add ( a, b : in word32;
result : out word32; overflow : out boolean );
Note that we do not include the keyword is or any of the local declarations or statements needed to perform the addition; these are deferred to the package body.
Each package declaration that includes subprogram declarations must have a corresponding package body to fill in the missing details. However, if a package declaration only includes other kinds of declarations, such as types, signals or fully specified
constants, no package body is necessary. The syntax rule for a package body is similar
to that for the interface, but with the inclusion of the keyword body:
package_body ⇐
package body identifier is
{ package_body_declarative_item }
end [ package body ] [ identifier ] ;
The items declared in a package body must include the full declarations of all subprograms
defined in the corresponding package declaration. These full declarations
must include the subprogram headers exactly as they are written in the package declaration.
A package body may also include declarations of additional types, subtypes,
constants and subprograms. These items are used to implement the subprograms defined
in the package declaration. Note that the items declared in the package declaration
cannot be declared again in the body (apart from subprograms and deferred
constants, as described above), since they are automatically visible in the body
谢谢你们的翻译。。可不要拿网络上的翻译器翻。。我是说需要计算机专业人士或是英语学的好帮我翻,再次谢谢你们。

第1个回答  2008-03-17
子程序在包装声明
另一种宣言说,也可能包括在一篮子宣言是一个子程序声明,无论是一个程序或一个函数声明。的一个重要方面宣布一个子程序在一系列声明的是,我们只写
头的子程序,即是这一部分包括该人的姓名及界面名单确定参数(与结果型职能) 。我们离开了身体的子程序。举例来说,假设我们有一个一揽子声明,它确定
有点矢量亚型:
亚型word32是bit_vector ( 31 downto 0 ) ;
我们可以包括在整套程序,这样做除了对word32价值观说成是代表签署的整数。程序宣言,在宣言的方案,是程序添加(甲,乙:在word32 ;
结果:列word32 ;溢出:在布尔) ;
注意,我们不包括关键字或任何地方宣言或声明,需要履行此外,这是推迟到封装体。
每个软件包宣言,其中包括子程序声明必须有一个相应的包装机构,以填补在失踪的细节。但是,如果一个软件包宣言不仅包括其他种类的报关单,如类型,信号或完全指定
常数,无包装的机构是必要的。语法规则为一套机构,是同类
这为界面,但随着加入关键字团体:
package_body ⇐
包体标识符
( package_body_declarative_item )
完[包装机构] [标识符] ;
该项目的申报,在一篮子机构必须包括全面申报所有子程序
定义在相应的包装声明。这些充分声明
必须包括子程序头,正是因为他们都是写在包装声明。
一套机构,也可能包括申报书附加的类型,亚型,
常量和子程序。这些物品都是用于执行子程序定义
在包装声明。注意事项宣布在包装宣言
不能再次宣布在身体内(除子程序和递延
常量,如上文所述) ,因为它们是自动可见在体内
第2个回答  2008-03-17
包裹公告的副程序
可能被包含在包裹公告之中的另外类型的公告是副程序公告-一个程序或功能公告。 宣布包裹公告的一个副程序的重要方面是我们只写那
副程序的首领, 也就是说 , 包括名字和接口目录的部份定义叁数.(和结果类型为功能) 我们遗漏副程序的身体。 举例来说,推想我们有定义的包裹公告
一个一点点-矢量的次类型:
次类型字 32 是 bit_vector(31 downto 0);
我们能在包裹一个程序包括在字上做附加表现的 32 价值签署完整的事物。 包裹公告的程序公告是增加的程序 ( a, b: 在字 32 中;
结果 : 出自字 32; 溢值 : 出自 boolean);
注意我们不包括关键字是或者任何当地公告或者陈述需要运行附加; 这些被延期到包裹身体。
包括副程序公告的每个包裹公告一定有一个对应的包裹身体填写不见的细节。 然而,如果包裹公告只包括其他类型的公告, 像是类型, 信号或完全指定
常数, 没有包裹身体是必需的。 给一个包裹身体的语法规则是相似的
对那为接口, 但是与关键字身体的包含:
package_body?
包裹身体标识符是
{ package_body_declarative_item}
结束 [ 包裹身体 ][ 标识符 ];
项目在一个包裹身体中宣布一定包括所有副程序的完全公告
在对应的包裹公告方面定义。 这些完全的公告
当他们在包裹公告方面被写的时候,一定完全地包括副程序首领。
一个包裹身体也可能包括另外类型的公告,次类型,
常数和副程序。 这些项目用来实现被定义的副程序
在包裹公告方面。 注意项目在包裹公告方面宣布
在身体中能够不再被宣布 (除了副程序之外而且延期
常数, 当做描述在)上面, 因为他们在身体中自动看得见

参考资料:金山快译

相似回答