对了,我还没有定义,在声明的时候系统就提示出错哦~ function TestFunc(array[]:integer) :integer;
借一楼的用一下了. -____- type MyIntArray = array of integer;var function TestFunc(intarrayA:MyIntArray;intarrayB:MyIntArray;intarrayC:MyIntArray) :integer; 楼主啊,能做一个参数,就可以做多个参数啊........不过要注意参数的大小,不能太大啊.否则会引起栈溢出的. 可是这样定义: type MyIntArray = array of integer; pMyIntArray =^MyIntArray ; var function TestFunc(intarrayA:pMyIntArray;intarrayB:pMyIntArray;intarrayC:pMyIntArray) :integer; 传指针.
调用时: HdrAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0); TenAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0); CenAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0);type MyIntArray = array of integer;var function TestFunc(intarrayA:MyIntArray;intarrayB:MyIntArray;intarrayC:MyIntArray) :integer;TestFunc(HdrAry,TenAry,CenAry);type MyIntArray = array of integer; pMyIntArray =^MyIntArray ; var function TestFunc(intarrayA:pMyIntArray;intarrayB:pMyIntArray;intarrayC:pMyIntArray) :integer;var pinta,pintb,pintc:pMyintarray;
MyIntArray = array of integer;var
function TestFunc(intarray:MyIntArray) :integer;
TenAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0);
CenAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0);现在要写一函数,把这些数组传给这个函数,现在定义函数的时候,都不知道定义里函数的参数怎么写!
function TestFunc(array[]:integer) :integer;
type
MyIntArray = array of integer;var
function TestFunc(intarrayA:MyIntArray;intarrayB:MyIntArray;intarrayC:MyIntArray) :integer;
楼主啊,能做一个参数,就可以做多个参数啊........不过要注意参数的大小,不能太大啊.否则会引起栈溢出的.
可是这样定义:
type
MyIntArray = array of integer;
pMyIntArray =^MyIntArray ;
var
function TestFunc(intarrayA:pMyIntArray;intarrayB:pMyIntArray;intarrayC:pMyIntArray) :integer;
传指针.
HdrAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0);
TenAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0);
CenAry:array[0..12]of Integer = (0,0,0,0,0,0,0,0,0,0,0,0,0);type
MyIntArray = array of integer;var
function TestFunc(intarrayA:MyIntArray;intarrayB:MyIntArray;intarrayC:MyIntArray) :integer;TestFunc(HdrAry,TenAry,CenAry);type
MyIntArray = array of integer;
pMyIntArray =^MyIntArray ;
var
function TestFunc(intarrayA:pMyIntArray;intarrayB:pMyIntArray;intarrayC:pMyIntArray) :integer;var pinta,pintb,pintc:pMyintarray;
pinta:=@HdrAry[0];
pintb:=@TenAry[0];
pintc:=@CenAry[0];
testfun(pinta,pintb,pintc);