点击或拖拽改变大小

SoftBasicSplitIntegerToArray 方法

将整数进行有效的拆分成数组,指定每个元素的最大值
Effectively split integers into arrays, specifying the maximum value for each element

命名空间:  HslCommunication.BasicFramework
程序集:  HslCommunication (在 HslCommunication.dll 中) 版本:11.8.2.0 (11.8.2.0)
语法
public static int[] SplitIntegerToArray(
	int integer,
	int everyLength
)

参数

integer
类型:SystemInt32
整数信息
everyLength
类型:SystemInt32
单个的数组长度

返回值

类型:Int32
拆分后的数组长度
示例
SplitIntegerToArray示例
int[] b1 = SoftBasic.SplitIntegerToArray( 10, 10 );
// b1为 [10]

int[] b2 = SoftBasic.SplitIntegerToArray( 10, 5 );
// b2为 [5,5]

int[] b3 = SoftBasic.SplitIntegerToArray( 10, 4 );
// b3为 [4,4,2]
参见