易截截图软件、单文件、免安装、纯绿色、仅160KB

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;



相关问答:

Python中的Unicode在Delphi如何还原成Gb2312?

已知Python 中:
s = unicode("测试", "gb2312")
s = u'\u6d4b\u8bd5'
print s
测试

在Delphi里面如何将\u6d4b\u8bd5这样的还原成Gb2312的汉字呢?
找到个方法
......

转帖:DELPHI编写服务程序总结一--编写技巧

原文地址:http://hi.baidu.com/sqldebug/blog/item/8e2749213082c0589922ed61.html

直接贴过来的,有点乱,大家凑合看。

一、服务程序和桌面程序的区别

Windows 2000/XP/2003等支持一种叫做“ ......

delphi 与 C# 位运算 有好大区别,请教各位!

delphi 函数:

function RB(A: longint): longint;
begin
  Result := (A shr 24) or ((A shr 8) and $FF00) or ((A shl 8) and $FF0000) or (A shl 24);
end;


我转成C#:

& ......

delphi 调用 vc dll 问题

我调用vc的dll,传送结构体参数。vc接受后从内存中拷贝出我传送的值。转换之后是乱码
来错地方了.

去DELPHI

ddd

知道错了

有没具体代码啊

//向终端发送门禁报警信息
    function alar ......

delphi 调用 vc dll 问题

我调用vc的dll,传送结构体参数。vc接受后从内存中拷贝出我传送的值。转换之后是乱码
结构体怎么定义的?

//向终端发送门禁报警信息
    function alarmSentDoor(var pDoorPara :Alley_ALARM_PARA) ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号