Показать сообщение отдельно
  #3  
Старый 03.01.2010, 22:43
padavanLS1000 padavanLS1000 вне форума
Прохожий
 
Регистрация: 03.01.2010
Сообщения: 5
Репутация: 10
По умолчанию

Не прокатывает пишит ошибку

Код:
procedure TForm1.StringGrid1Click(Sender: TObject);
var
 i : integer;//цикл
 summ : real;//первая сумма
 summ1 : real;//вторая сумма
begin
summ := 1;//обнуляем первую сумму
 summ1 := 0;//обнуляем вторую сумму
 for i:= 1 to 31 do//цикл
begin
StringGrid1.Cells[0,1]:='1';
 StringGrid1.Cells[0,2]:='2';
   StringGrid1.Cells[0,3]:='3';
 StringGrid1.Cells[0,4]:='4';
  StringGrid1.Cells[0,5]:='5';
 StringGrid1.Cells[0,6]:='6';
   StringGrid1.Cells[0,7]:='7';
 StringGrid1.Cells[0,8]:='8';
 StringGrid1.Cells[0,9]:='9';
 StringGrid1.Cells[0,10]:='10';
   StringGrid1.Cells[0,11]:='11';
 StringGrid1.Cells[0,12]:='12';
  StringGrid1.Cells[0,13]:='13';
 StringGrid1.Cells[0,14]:='14';
   StringGrid1.Cells[0,15]:='15';
 StringGrid1.Cells[0,16]:= '16';
  StringGrid1.Cells[0,17]:= '17';
 StringGrid1.Cells[0,18]:= '18';
   StringGrid1.Cells[0,19]:= '19';
 StringGrid1.Cells[0,20]:= '20';
  StringGrid1.Cells[0,21]:= '21';
 StringGrid1.Cells[0,22]:= '22';
   StringGrid1.Cells[0,23]:= '23';
 StringGrid1.Cells[0,24]:= '24';
 StringGrid1.Cells[0,25]:= '25';
 StringGrid1.Cells[0,26]:= '26';
   StringGrid1.Cells[0,27]:= '27';
 StringGrid1.Cells[0,28]:= '28' ;
  StringGrid1.Cells[0,29]:= '29';
 StringGrid1.Cells[0,30]:= '30';
   StringGrid1.Cells[0,31]:= '31';
   StringGrid1.Cells[0,32]:= 'Итого';
   { ----------------------------------------}
 StringGrid1.Cells[0,0]:= 'Дата' ;
  StringGrid1.Cells[1,0]:= 'Книги';
 StringGrid1.Cells[2,0]:= 'Брошюры';
   StringGrid1.Cells[3,0]:='каратыши';
   StringGrid1.Cells[4,0]:= 'Жюрналы';
   StringGrid1.Cells[5,0]:= 'карандаши';
 summ := StringGrid1.Cells[1,i];//подсчет первой суммы
  summ1 := summ1+StringGrid1.Cells[1,i];//подсчет суммы
 end;
 end;
end.

Это то что я пишу мож неправильно что?

lmikle: Еще один такой пост без тегов - и будет бан!!!
Ответить с цитированием