![]() |
|
|
Регистрация | << Правила форума >> | FAQ | Пользователи | Календарь | Поиск | Сообщения за сегодня | Все разделы прочитаны |
![]() |
|
Опции темы | Поиск в этой теме | Опции просмотра |
|
#1
|
|||
|
|||
![]() Всем доброго времени суток!
При запуске программы начала выскакивать ошибка: raised exception class EListError with message 'List index out of bounds(2)' ![]() Код:
program Project1; uses Forms, Unit1 in 'Unit1.pas' {GForm}, Unit2 in 'Unit2.pas' {IForm1}, Unit3 in 'Unit3.pas' {IForm2}, Unit4 in 'Unit4.pas' {IForm3}; {$R *.res} begin Application.Initialize; Application.CreateForm(TGForm, GForm); > Application.CreateForm(TIForm1, IForm1); Application.CreateForm(TIForm2, IForm2); Application.CreateForm(TIForm3, IForm3); Application.Run; end. Не могу понять в чём может быть проблема. Прошу более опытных пользователей помочь ![]() |
#2
|
||||
|
||||
![]() Где то перебрал с массивом, например обратился к несуществующему элементу массива типа:
Код:
var Arr[1..10] of byte; begin s := Arr[11];//Как вариант end; String - массив символов Memo - массив строк StringGrid - 2-мерный массив строк Часто такое бывает в таком виде Код:
for i := 0 to Length(s) do //s : string a := s[i];//так как нумерация с нуля, то если длина 10, последний элемент 9 Код:
for i := 0 to Length(s)-1 do a := s[i]; В начале был Бит, потом Байт и только потом появилось Слово... |
#3
|
|||
|
|||
![]() Массива в программе нет. В чём собственно и вся магия
|
#4
|
||||
|
||||
![]() Падает метод Create у первой формы, там и ищи.
Некоторые программисты настолько ленивы, что сразу пишут рабочий код. Если вас наказали ни за что - радуйтесь: вы ни в чем не виноваты. |
#5
|
|||
|
|||
![]() Aristarh Dark, а можно по конкретней?) Где искать то?)
Код:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Menus, StdCtrls, DB, ADODB, Grids, DBGrids, ComCtrls, XPMan, RpDefine, RpRave; type TGForm = class(TForm) PageControl1: TPageControl; TabSheet1: TTabSheet; TabSheet2: TTabSheet; TabSheet3: TTabSheet; TabSheet4: TTabSheet; DBGrid1: TDBGrid; DataSource1: TDataSource; ADOTable1: TADOTable; ADOTable2: TADOTable; DataSource2: TDataSource; DBGrid2: TDBGrid; ADOTable3: TADOTable; DataSource3: TDataSource; DBGrid3: TDBGrid; Button1: TButton; Button2: TButton; Button3: TButton; Button4: TButton; Button5: TButton; Button6: TButton; Button7: TButton; Button8: TButton; MainMenu1: TMainMenu; N1: TMenuItem; N2: TMenuItem; GroupBox1: TGroupBox; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Label6: TLabel; pe_06: TEdit; pe_07: TEdit; pe_08: TEdit; pe_09: TEdit; pe_10: TEdit; pe_11: TEdit; pe_12: TEdit; pe_13: TEdit; pe_14: TMemo; pe_15: TMemo; pe_16: TMemo; pe_17: TMemo; pe_18: TMemo; pe_19: TMemo; pe_20: TMemo; pe_21: TMemo; Label7: TLabel; Label8: TLabel; Label9: TLabel; Label10: TLabel; Label11: TLabel; Label12: TLabel; Label13: TLabel; Label14: TLabel; Label15: TLabel; Label16: TLabel; Label17: TLabel; Label18: TLabel; pe_22: TEdit; Label19: TLabel; pe_23: TEdit; pe_24: TEdit; pe_25: TEdit; pe_26: TEdit; pe_27: TEdit; pe_28: TEdit; pe_29: TEdit; Label20: TLabel; Label21: TLabel; Label22: TLabel; Label23: TLabel; Label24: TLabel; Label25: TLabel; Label26: TLabel; Label27: TLabel; Label28: TLabel; Label29: TLabel; pe_30: TEdit; Label30: TLabel; pe_31: TEdit; pe_32: TEdit; Label31: TLabel; Label32: TLabel; pe_33: TMemo; Label33: TLabel; pe_34: TEdit; pe_36: TEdit; Label34: TLabel; Label35: TLabel; Label36: TLabel; pe_01: TEdit; pe_03: TEdit; pe_02: TEdit; pe_04: TEdit; pe_35: TEdit; pe_05: TEdit; Button9: TButton; RvProject1: TRvProject; ADOConnection1: TADOConnection; procedure FormCreate(Sender: TObject); procedure Button1Click(Sender: TObject); procedure Button3Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button4Click(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button7Click(Sender: TObject); procedure Button9Click(Sender: TObject); procedure Button8Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var GForm: TGForm; implementation uses Unit2, Unit3, Unit4; {$R *.dfm} //код end. |
#6
|
||||
|
||||
![]() А чё где искать то?
![]() Код то где? ![]() |