Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Master202010
20년 12월 3일
최종 프로젝트를 아직 진행중이라서 예전에 올린 과제만 먼저 보냈습니다.
교육일정은 끝났지만 꾸준히 제작하여 꼭 완성본 수료프로젝트를 업로드 하겠습니다!
107 changes: 54 additions & 53 deletions 과제/M1_델파이문법/10_Variable/VariableForm.dfm
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
object Form1: TForm1
Left = 0
Top = 0
Caption = #48320#49688#49324#50857' '#49892#49845' '#50696#51228
ClientHeight = 144
ClientWidth = 267
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 24
Top = 24
Width = 47
Height = 13
Caption = #49707#51088' '#51077#47141
end
object Label2: TLabel
Left = 24
Top = 77
Width = 58
Height = 13
Caption = #49707#51088#46308#51032' '#54633
end
object edtNum: TEdit
Left = 24
Top = 43
Width = 121
Height = 21
TabOrder = 0
end
object Button1: TButton
Left = 143
Top = 41
Width = 75
Height = 25
Caption = #51077#47141'(*)'
TabOrder = 1
OnClick = Button1Click
end
object edtSum: TEdit
Left = 24
Top = 96
Width = 121
Height = 21
TabOrder = 2
end
end
object Form1: TForm1
Left = 0
Top = 0
Caption = #48320#49688#49324#50857' '#49892#49845' '#50696#51228
ClientHeight = 144
ClientWidth = 267
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 24
Top = 24
Width = 47
Height = 13
Caption = #49707#51088' '#51077#47141
end
object Label2: TLabel
Left = 24
Top = 77
Width = 58
Height = 13
Caption = #49707#51088#46308#51032' '#54633
end
object edtNum: TEdit
Left = 24
Top = 43
Width = 121
Height = 21
TabOrder = 0
end
object Button1: TButton
Left = 143
Top = 41
Width = 75
Height = 25
Caption = #51077#47141'(*)'
TabOrder = 1
OnClick = Button1Click
end
object edtSum: TEdit
Left = 24
Top = 96
Width = 121
Height = 21
TabOrder = 2
end
end
20 changes: 12 additions & 8 deletions 과제/M1_델파이문법/10_Variable/VariableForm.pas
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit VariableForm;
unit VariableForm;

interface

Expand All @@ -15,13 +15,14 @@ TForm1 = class(TForm)
Label2: TLabel;
procedure Button1Click(Sender: TObject);
private
// �� ��(����)������ ����ϴ� ������ �Լ��� ����
// 이 폼(유닛)에서만 사용하는 변수와 함수를 선언

{ TODO : (1) ���� �� FSum ������ �����ϼ���. }
{ TODO : (1) 정수 형 FSum 변수를 선언하세요. }
FSum: Integer; //(1)FSum 변수 선언

function AddNum(ANum: Integer): Integer;
public
// �ٸ� ���ֿ��� ������ �� �ִ� ������ �Լ� ����
// 다른 유닛에서 참조할 수 있는 변수와 함수 선언
end;

var
Expand All @@ -34,19 +35,22 @@ implementation
function TForm1.AddNum(ANum: Integer): Integer;
begin
{ TODO :
(2) FSum ������ �Ķ���� ANum ���� ���մϴ�.
FSum ���� ��ȯ }
(2) FSum 변수에 파라메터 ANum 값을 더합니다.
FSum 변수 반환 }
Result := 0;

FSum := FSum + ANum; //(2)두 값 계산
Result := FSum;
end;

procedure TForm1.Button1Click(Sender: TObject);
var
Num, Sum: Integer; // �̰��� ����� ������ �� �Լ������� ����մϴ�.
Num, Sum: Integer; // 이곳에 선언된 변수는 이 함수에서만 사용합니다.
begin
Num := StrToInt(edtNum.Text);
Sum := AddNum(Num);

edtSum.Text := IntToStr(Sum);
end;

end.
end.
28 changes: 14 additions & 14 deletions 과제/M1_델파이문법/10_Variable/VariableSample.dpr
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
program VariableSample;

uses
Vcl.Forms,
VariableForm in 'VariableForm.pas' {Form1};

{$R *.res}

begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
program VariableSample;
uses
Vcl.Forms,
VariableForm in 'VariableForm.pas' {Form1};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
Loading