delphi 数组如何动态增加
//下面是一记录,三维坐标
type
Tposition = record
x:integer;
y:integer;
z:integer;
end;
//======下面是要在一个循环中动态地增加三维坐标数据的长度
//请问如何写会高效。
produce getposition(Sender: TObject)
var
position:array of record;
begin
。。。
for i =A to B do
if k then
position增加一个C(xc,yc,zc)的数; //这里如何写?
。。。
end;
请大侠指点。谢谢!!
SetLength
starluck:
具体如何写?
每次都用setlength?
SetLength(Length(position)+1)
position:array of record; //貌似应当是position:array of Tposition;
____________
SetLength(position, Length(position) + 1);
with position[Length(position) - 1] do
begin
x := xc;
y := yc;
z := zc;
end;
相关问答:
我在模块里自定义了一个函数:stradd()
可是在adoquery1.sql.add('select stradd(author) from book');
时提示stradd未定义...
这个问题有什么办法可以解决的吗? 非常感激!
(在A ......
原文地址:http://hi.baidu.com/sqldebug/blog/item/8e2749213082c0589922ed61.html
直接贴过来的,有点乱,大家凑合看。
一、服务程序和桌面程序的区别
Windows 2000/XP/2003等支持一种叫做“ ......
原文地址:http://hi.baidu.com/sqldebug/blog/item/58a764624a44d74eeaf8f863.html
一、如何限制系统服务和桌面程序只运行一个
如何限制系统服务和桌面程序只运行一个
在工程加入下列代码可以 ......
比如在delphi代码里,对某个方法或者form不了解,按下ctrl键,用鼠标点一下,就会跳到这个form或方法的代码哪里去。
我刚学c#,先下了一个系统的源代码看,里面很多控件、方法不知道是哪里来的,也没法去找。 ......