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

来源:百度知道 编辑:UC知道 时间:2024/05/24 05:37:46
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; th

子程序在包装声明
另一种宣言说,也可能包括在一篮子宣言是一个子程序声明,无论是一个程序或一个函数声明。的一个重要方面宣布一个子程序在一系列声明的是,我们只写
头的子程序,即是这一部分包括该人的姓名及界面名单确定参数(与结果型职能) 。我们离开了身体的子程序。举例来说,假设我们有一个一揽子声明,它确定
有点矢量亚型:
亚型word32是bit_vector ( 31 downto 0 ) ;
我们可以包括在整套程序,这样做除了对word32价值观说成是代表签署的整数。程序宣言,在宣言的方案,是程序添加(甲,乙:在word32 ;
结果:列word32 ;溢出:在布尔) ;
注意,我们不包括关键字或任何地方宣言或声明,需要履行此外,这是推迟到封装体。
每个软件包宣言,其中包括子程序声明必须有一个相应的包装机构,以填补在失踪的细节。但是,如果一个软件包宣言不仅包括其他种类的报关单,如类型,信号或完全指定
常数,无包装的机构是必要的。语法规则为一套机构,是同类
这为界面,但随着加入关键字团体:
package_body ⇐
包体标识符
( package_body_declarative_item )
完[包装机构] [标识符] ;
该项目的申报,在一篮子机构必须包括全面申报所有子程序
定义在相应的包装声明。这些充分声明
必须包括子程序头,正是因为他们都是写在包装声明。
一套机构,也可能包括申报书附加的类型,亚型,
常量和子程序。这些物品都是用于执行子程序定义
在包装声明。注意事项宣布在包装宣言
不能再次宣布在身体内(除子程序和递延
常量,如上文所述) ,因为它们是自动可见在体内

包裹公告的副程序
可能被包含在包裹公告之中的另外类型的公告是副程序公告-一个程序或功能公告。 宣布包裹公告的一个副程序的重要方面是我们只写那
副程序的首领, 也就是说 , 包括名字和接口目录的部份定义叁数.(和结果类型为功能) 我们遗漏副程序的身体。 举例来说,推想我们有定义的包裹公告
一个一点点-矢