define constant的意思|示意

美 / diˈfain ˈkɔnstənt / 英 / dɪˈfaɪn ˈkɑnstənt /

[计] 定义常数


define constant的用法详解

英语单词define constant的用法讲解

define constant是一个C语言的内置命令,它的作用是为变量设置恒定的值,以便在整个程序中保持不变。它的使用形式为:#define constant 常量值 。

比如,如果希望在一个程序中使用名为My_number的常量,它的值为3,则应该在程序代码的开头使用#define来定义该常量,具体如下:#define My_number 3 。

至此,在程序中定义的My_number就不能再更改,在任何情况下,都将是3。

define constant这个内部命令常常用在程序中,来让程序更加灵活,可以将一个数值定义成一个常量,如果之后发现需要改变这个数值,只需要在程序的开头更改常量的定义即可,而不需要改动整个程序。

define constant相关短语

1、 define constant instruction 定义常数指令,定义常数指令英语,翻译

2、 define constant double 定义双字常数

3、 define constant floating 定义浮点常数

4、 define constant statement 定义常数语句

5、 define constant character 定义常数字符

6、 dcf define constant floating 定义浮动常数

7、 dcc define constant character 定义常数字符

8、 define e constant statement 定义常数语句

define constant相关例句

The mapping table also allows the user to convert source types to target types, or define constant mappings that set constant values to items in the target schema.

映射表还允许用户将源类型转化成目标类型,或定义常量映射 来将常量设置为目标架构中的项目。

My favorite is to use a configuration file and define a constant in it that holds the format string for the date function.

我最喜欢的方式是使用配置文件并在配置文件中定义一个常量,这个常量保留date函数的格式字符串。

So we define, then, equilibrium constant this way.

所以我们这样定义平衡常数。