首页 > 未分类 > int整数
2017
07-15

int整数

Name

int整数

   

Examples

int a; // Declare variable ‘a’ of type int

a = 23; // Assign ‘a’ the value 23

int b = -256; // Declare variable ‘b’ and assign it the value -256

int c = a + b; // Declare variable ‘c’ and assign it the sum of ‘a’ and ‘b’

Description

描述

Datatype for integers, numbers without a decimal point. Integers can be as large as 2,147,483,647 and as low as -2,147,483,648. They are stored as 32 bits of information. The first time a variable is written, it must be declared with a statement expressing its datatype. Subsequent uses of this variable must not reference the datatype because Processing will think the variable is being declared again.

整数的数据类型, 没有小数点的数字。整数可以是2147483647和低至-2147483648 的大。它们存储为32位信息。第一次写入变量时, 必须用表达其数据类型的语句声明它。此变量的后续使用不能引用该数据类型, 因为处理将认为该变量正在再次声明。

Syntax

语法

int var

int var = value

Parameters

参数

var

variable name referencing the value

value

any integer value

Related

相关

float



最后编辑:
作者:卡萨布兰卡
卡萨布兰卡
这个作者貌似有点懒,什么都没有留下。

留下一个回复

你的email不会被公开。