0 / 0 / 0
Регистрация: 22.04.2018
Сообщений: 16
1

Ошибка Record, object or class type required

29.04.2018, 17:50. Показов 2189. Ответов 5
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
Delphi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
unit Unit1;
 
interface
 
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ExtCtrls;
 
type
  TCars = record
  Brand:String[20];
  Color:String[20];
  Automaker:String[20];
  end;
 // TMassBase = array [1..1000] of TCars;
  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    SaveDialog1: TSaveDialog;
    BitBtn4: TBitBtn;
    LabeledEditAutoMaker: TLabeledEdit;
    LabeledEditBrand: TLabeledEdit;
    LabeledEditColor: TLabeledEdit;
    procedure BitBtn4Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
 
var
  Form1: TForm1;
 // Base:TMassBase;
  Cars:TCars;
  TMassBase : array [1..1000] of TCars;
implementation
 
{$R *.dfm}
 
procedure TForm1.BitBtn4Click(Sender: TObject);
begin
  SaveDialog1.Execute;
end;
 
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
  if  (Length(LabeledEditAutoMaker.Text)>0) and (Length(LabeledEditBrand.Text)>0)
   and (Length(LabeledEditColor.Text)>0) then
   begin
     with Cars do
     begin
       TMassBase.Color[i]:=LabeledEditColor.Text;
     end;  
   end;
end;
 
end.
Ошибка Record, object or class type required


Тут выдает ошибку
0
Лучшие ответы (1)
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
29.04.2018, 17:50
Ответы с готовыми решениями:

Ошибка: Record, object or class type required
for i := 1 to temp + 1 do cells := i.ToString(); ???? roww := 1; coll :=...

Ошибка: Record, object or class type required
Код программы: unit UnitZakazch; interface uses Winapi.Windows, Winapi.Messages,...

Ошибка: record, object or class type required
Вод полный код окна Form1: unit Unit1; interface uses Windows, Messages, SysUtils,...

Ошибка: Record object or class type required
{$WARN SYMBOL_PLATFORM OFF} unit FormMain; interface uses Windows, Messages, SysUtils,...

5
Почетный модератор
64299 / 47594 / 32743
Регистрация: 18.05.2008
Сообщений: 115,181
29.04.2018, 17:59 2
Лучший ответ Сообщение было отмечено Clear5Sky как решение

Решение

Delphi
1
TMassBase[i].Color
1
0 / 0 / 0
Регистрация: 22.04.2018
Сообщений: 16
29.04.2018, 19:34  [ТС] 3
Благодарю
0
3583 / 2193 / 692
Регистрация: 29.05.2013
Сообщений: 9,360
30.04.2018, 01:02 4
Для лучшей читабельности замените имя переменной TMassBase на AMassBase.
0
1437 / 1014 / 228
Регистрация: 31.05.2013
Сообщений: 6,645
Записей в блоге: 6
30.04.2018, 01:19 5
Цитата Сообщение от Пытливый Посмотреть сообщение
Для лучшей читабельности замените имя переменной TMassBase на AMassBase.
..., ибо приставкой T- обычно обозначают тип. А так будет видно - array
0
0 / 0 / 0
Регистрация: 22.04.2018
Сообщений: 16
02.05.2018, 16:57  [ТС] 6
Просто сначала это было в type)Поэтому и осталось.
0
02.05.2018, 16:57
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
02.05.2018, 16:57
Помогаю со студенческими работами здесь

[Ошибка] : Record, object or class type required
Выдает ошибку: Unit_Kartka.pas(134): Record, object or class type required ...

Ошибка: Record, object or class type required
на код вызова второстепенной формы procedure TForm1.Button1Click(Sender: TObject); begin ...

Ошибка: Record, object or class type required, ругается на DataModule (DM)
Здравствуйте! Помогите пожалуйста разобраться с данной ошибкой. В программе есть DataModule (с...

Ошибка [Error] Unit3.pas(33): Record, object or class type required в Делфи
Выдает ошибку Unit3.pas(33): Record, object or class type required Unit3.pas(34): Record,...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
6
Ответ Создать тему
Опции темы

КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru