Вверх ↑
Ответов: 1304
Рейтинг: 405
#1: 2015-01-08 23:55:01 ЛС | профиль | цитата
Подскажите пожалуйста где ошибка и "как" исправить
Суть проблемы есть переменная тип запись с полями из динамических массивов, ну так вот надо одну переменную присвоить другой и так два раза, а получается присвоить только один раз . Схема должна выдать 3, а выдаёт 30 как будто второго присваивания не было.
.. бли комом, схема умерла в момент сохранения
.. востановил
Add(MainForm,2953706,35,77)
{
}
Add(InlineCode,8359693,140,77)
{
 WorkPoints=#6:doFunc|
 EventPoints=#7:onFunc0|7:onFunc1|
 Code=#15:unit HiAsmUnit;|0:|9:interface|0:|31:uses Kol, Share, Debug, OpenGL;|0:|4:type|52:  TCoord = record      // Stores X, Y, Z coordinates|21:    X, Y, Z: glFLoat;|6:  end;|0:|4:type|52:  TTexCoord = record   // Stores texture coordinates|18:    U, V: glFloat;|6:  end;|0:|4:type|45:  TColorCoord = record // Stores  value color|21:    R, G, B: GLubyte;|6:  end;|0:|0:|4:type|16:  TMesh = record|26:    ModelName: string[80];|26:    GroupName: string[80];|20:    CountV: integer;|22:    PrimType: integer;|33:    idTexture1: array of integer;|33:    idTexture2: array of integer;|54:    Vertexes: array of TCoord;//----------------------|29:    Normals: array of TCoord;|34:    Textures1: array of TTexCoord;|34:    Textures2: array of TTexCoord;|34:    Textures3: array of TTexCoord;|34:    Textures4: array of TTexCoord;|32:    Color: array of TColorCoord;|6:  end;|0:|4:type|19:  TArrMesh = record|38:    DynamicModeFlag: array of boolean;|34:    NormalsFlag: array of boolean;|35:    TexturesFlag: array of boolean;|36:    nTexturesFlag: array of integer;|32:    ColorFlag: array of boolean;|29:    IdVAOA: array of integer;|29:    IdVAOB: array of integer;|31:    MeshGroupA: array of TMesh;|31:    MeshGroupB: array of TMesh;|6:  end;|0:|3:var|19:  Mesh0: TMesh;  //|15:  Mesh1: TMesh;|0:|4:type|29:  THiAsmClass = class(TDebug)|9:  private|0:|8:  public|23:    onFunc0: THI_Event;|23:    onFunc1: THI_Event;|0:|51:    procedure doFunc(var Data: TData; index: word);|6:  end;|0:|48:function SetLengthMesh(Count: integer): boolean;|41:function DelMeshID(id: integer): boolean;|0:|14:implementation|0:|48:function SetLengthMesh(Count: integer): boolean;|0:|5:begin|17:  Result := True;|4:end;|0:|41:function DelMeshID(id: integer): boolean;|0:|5:begin|17:  Result := True;|4:end;|0:|59:procedure THiAsmClass.doFunc(var Data: TData; index: word);|3:var|25:  Id, CountV, i: integer;|5:begin|10:  Id := 0;|15:  CountV := 10;|32:  SetLength(Mesh0.Vertexes, 10);|32:  SetLength(Mesh1.Vertexes, 10);|0:|29:  for i := 0 to CountV - 1 do|7:  begin|29:    Mesh0.Vertexes[i].X := 1;|29:    Mesh0.Vertexes[i].Y := 2;|52:    Mesh0.Vertexes[i].Z := 3;//Mesh0.Vertexes[0].Z=3|6:  end;|0:|41:  Mesh1 := Mesh0; //Mesh1.Vertexes[0].Z=3|2:  |29:  for i := 0 to CountV - 1 do|7:  begin|30:    Mesh1.Vertexes[i].X := 10;|30:    Mesh1.Vertexes[i].Y := 20;|55:    Mesh1.Vertexes[i].Z := 30; //Mesh1.Vertexes[0].Z=30|8:  end;  |2:  |0:|46:  Mesh1 := Mesh0; //Mesh1.Vertexes[1].Z <> 3 ?|2:  |47:  //_hi_OnEvent(onFunc0, high(Mesh1.Vertexes));|44:  _hi_OnEvent(onFunc1, Mesh1.Vertexes[0].Z);|4:end;|0:|4:end.|
 link(onFunc0,2470084:doText,[])
 link(onFunc1,4431543:doText,[(198,90)(198,125)])
}
Add(Label,2470084,224,77)
{
 Left=175
 Top=25
}
Add(Label,4431543,224,119)
{
 Left=95
 Top=25
}
Add(Button,2721913,84,77)
{
 Left=20
 Top=20
 link(onClick,8359693:doFunc,[])
}



карма: 3

0