![]() |
|
|
Регистрация Восстановить пароль |
Регистрация | Задать вопрос |
Заплачу за решение |
Новые сообщения |
Сообщения за день |
Расширенный поиск |
Правила |
Всё прочитано |
![]() |
|
Опции темы | Поиск в этой теме |
![]() |
#1 |
Новичок
Джуниор
Регистрация: 26.03.2011
Сообщений: 1
|
![]()
Помогите объяснить ошибку. Вот текст программы:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, OleServer, WordXP,system; type TForm1 = class(TForm) Button1: TButton; Button2: TButton; WordApplication1: TWordApplication; procedure FormActivate(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} uses ComObj; var W:variant; w1:WordApplication; eee_:string; procedure TForm1.FormActivate(Sender: TObject); begin W:=CreateOleObject('Word.Applicatio n'); W.Visible:=true; end; procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin W.Quit; W:=UnAssigned; end; procedure TForm1.Button1Click(Sender: TObject); var s:string; i:integer; begin s:=W.selection.text; delete(s,1,1); //[Error] Project2.dpr(9): Constant object cannot be passed as var parameter end; end; end. |
![]() |
![]() |
![]() |
![]() |
||||
Тема | Автор | Раздел | Ответов | Последнее сообщение |
delete | asko | Помощь студентам | 0 | 15.04.2010 16:16 |
SQL процедура DELETE | mar4elo | БД в Delphi | 9 | 22.02.2010 23:24 |
error C2541: 'delete' : cannot delete objects that are not pointers | novokhatsky | Общие вопросы C/C++ | 2 | 14.12.2009 10:25 |
Процедура в процедура в C++ Builder | Ecosasha | C++ Builder | 2 | 06.06.2009 17:17 |
Перегрузка операций new, new[], delete, delete[] | IgorKr | Общие вопросы C/C++ | 1 | 22.10.2008 12:14 |