Разработка программы на языке Borland Object Pascal (Ide Borland Delphi)

Курсовой проект - Компьютеры, программирование

Другие курсовые по предмету Компьютеры, программирование

PanelClients=CodeExplorer@EditWindow0

LeftPanelData=00000400010000000C000000436F64654578706C6F72657200000000000000000000000000000000000100000000000000000C000000436F64654578706C6F726572FFFFFFFF

RightPanelSize=0

BottomPanelSize=0

BottomPanelClients=MessageView@EditWindow0

BottomPanelData=00000400010000000B0000004D657373616765566965770000000000000000000000000000000000FFFFFFFF

 

[View0]

Module=D:\Projects\Delphi\sti\check_goto\Unit1.pas

CursorX=13

CursorY=57

TopLine=64

LeftCol=1

 

[Watches]

Count=0

 

[WatchWindow]

WatchColumnWidth=100

WatchShowColumnHeaders=1

Create=1

Visible=0

State=0

Left=0

Top=138

Width=265

Height=638

MaxLeft=-1

MaxTop=-1

ClientWidth=257

ClientHeight=612

TBDockHeight=612

LRDockWidth=257

Dockable=1

 

[Breakpoints]

Count=0

 

[AddressBreakpoints]

Count=0

 

[Main Window]

Create=1

Visible=1

State=0

Left=0

Top=0

Width=1280

Height=112

MaxLeft=-1

MaxTop=-1

ClientWidth=1272

ClientHeight=78

 

[ProjectManager]

Create=1

Visible=0

State=0

Left=369

Top=372

Width=438

Height=303

MaxLeft=-1

MaxTop=-1

ClientWidth=430

ClientHeight=277

TBDockHeight=303

LRDockWidth=438

Dockable=1

 

[CPUWindow]

Create=1

Visible=0

State=0

Left=96

Top=114

Width=959

Height=635

MaxLeft=-1

MaxTop=-1

ClientWidth=951

ClientHeight=601

DumpPane=79

DisassemblyPane=187

RegisterPane=231

FlagPane=64

 

[AlignmentPalette]

Create=1

Visible=0

State=0

Left=200

Top=107

Width=156

Height=84

MaxLeft=-1

MaxTop=-1

ClientWidth=150

ClientHeight=60

 

[PropertyInspector]

Create=1

Visible=1

State=0

Left=9

Top=203

Width=274

Height=559

MaxLeft=-1

MaxTop=-1

ClientWidth=266

ClientHeight=533

TBDockHeight=429

LRDockWidth=190

Dockable=1

SplitPos=144

ArrangeBy=Name

SelectedItem=Name

ExpandedItems=

HiddenCategories=

 

[ObjectTree]

Create=1

Visible=0

State=0

Left=958

Top=125

Width=190

Height=669

MaxLeft=-1

MaxTop=-1

ClientWidth=182

ClientHeight=643

TBDockHeight=290

LRDockWidth=190

Dockable=1

 

[CodeExplorer@EditWindow0]

Create=1

Visible=0

State=0

Left=0

Top=12

Width=140

Height=459

MaxLeft=-1

MaxTop=-1

ClientWidth=140

ClientHeight=459

TBDockHeight=305

LRDockWidth=140

Dockable=1

 

[MessageView@EditWindow0]

Create=1

Visible=0

State=0

Left=-100

Top=-534

Width=443

Height=85

MaxLeft=-1

MaxTop=-1

ClientWidth=443

ClientHeight=85

TBDockHeight=85

LRDockWidth=443

Dockable=1

 

[DockHosts]

DockHostCount=0

 

 

Приложение К

 

object Form1: TForm1

Left = 320

Top = 139

Width = 520

Height = 500

Caption = #1055#1088#1086#1074#1077#1088#1082#1072 Goto

Color = clBtnFace

Font.Charset = DEFAULT_CHARSET

Font.Color = clWindowText

Font.Height = -11

Font.Name = MS Sans Serif

Font.Style = []

OldCreateOrder = False

PixelsPerInch = 96

TextHeight = 13

object lbRezultat: TLabel

Left = 210

Top = 424

Width = 52

Height = 13

Caption = #1056#1077#1079#1091#1083#1100#1090#1072#1090

end

object Memo1: TMemo

Left = 8

Top = 48

Width = 497

Height = 353

ScrollBars = ssBoth

TabOrder = 0

end

object buOpen: TButton

Left = 16

Top = 8

Width = 169

Height = 33

Caption = #1054#1090#1082#1088#1099#1090#1100 #1092#1072#1081#1083

TabOrder = 1

OnClick = buOpenClick

end

object buProverka: TButton

Left = 16

Top = 416

Width = 185

Height = 33

Caption = #1055#1088#1086#1074#1077#1088#1082#1072 Goto

TabOrder = 2

OnClick = buProverkaClick

end

object buClose: TButton

Left = 365

Top = 8

Width = 137

Height = 33

Caption = #1042#1099#1093#1086#1076

TabOrder = 3

OnClick = buCloseClick

end

object odFile: TOpenDialog

Filter = C++ #1092#1072#1081#1083|*.cpp

Left = 208

Top = 16

end

end

 

 

Приложение Л

 

unit Unit1;

 

interface

 

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls;

 

type

TForm1 = class(TForm)

Memo1: TMemo;

buOpen: TButton;

buProverka: TButton;

lbRezultat: TLabel;

odFile: TOpenDialog;

buClose: TButton;

procedure buOpenClick(Sender: TObject);

procedure buProverkaClick(Sender: TObject);

procedure buCloseClick(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

 

var

Form1: TForm1;

implementation

 

{$R *.dfm}

 

procedure TForm1.buOpenClick(Sender: TObject);

begin

if odFile.Execute then

begin

Memo1.Lines.Clear;

Memo1.Lines.LoadFromFile(odFile.FileName);

lbRezultat.Caption:= ;

end;

end;

 

procedure TForm1.buProverkaClick(Sender: TObject);

var

sFile, sLabelName: string;

i, iKol, j: integer;

begin

sFile:= Memo1.Lines.Text;

if sFile<> then

begin

iKol:= 0;

i:= pos(goto , sFile);

while i<>0 do

begin

delete(sFile, 1, i+4);

i:= pos(;, sFile);

j:= pos(#13, sFile);

if ((j<>0)and(j<i))or(i=0) then

begin

lbRezultat.Caption:= Ошибка: Отсутсвует ;;

lbRezultat.Font.Color:= clRed;

Exit;

end;

sLabelName:= copy(sFile, 1, i-1);

if not (sLabelName[1] in [A..Z, a..z])then

begin

lbRezultat.Caption:= Ошибка: Неверное имя метки + sLabelName;

lbRezultat.Font.Color:= clRed;

Exit;

end;

for i:= 2 to length(sLabelName) do

if not(sLabelName[i] in [0..9, A..Z, a..z]) then

begin

lbRezultat.Caption:= Ошибка: Неверное имя метки + sLabelName;

lbRezultat.Font.Color:= clRed;

Exit;

end;

i:= pos(sLabelName+: ,sFile);

if i=0 then

begin

lbRezultat.Caption:= Ошибка: Отсутствует переход на метку + sLabelName;

lbRezultat.Font.Color:= clRed;

Exit;

end;

inc(iKol);

i:= pos(goto , sFile);

end;

if lbRezultat.Caption= then

begin

lbRezultat.Caption:= Правильное задание + IntToStr(iKol)+ инструкций безусловного перехода;

lbRezultat.Font.Color:= clNavy;

end;

end;

end;

 

procedure TForm1.buCloseClick(Sender: TObject);

begin

Close;

end;

 

end.