![]() |
|
#1
|
|||
|
|||
![]() Задача выборка из мемо .
решил начать с самого простого . с выборки со строки , как написано в документации и не работает а точнее скорее не правильно обращаюсь , с function Код:
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *.dfm} function AnsiPos ( const Substr, S: string ): Integer; procedure TForm1.Button1Click(Sender: TObject); var Substr, S: string; I: Integer; begin S:= 'Исходная строка'; Substr:= 'ход'; I:= AnsiPos(Substr, S); // I:= 3 end; end. Последний раз редактировалось u.s.fire, 01.10.2017 в 21:38. |