Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 예제
- MySQL
- 인스톨
- Visual Basic
- 셋업
- 시리얼 통신
- WIN32 SDK
- 델파이
- SDK
- SQL
- MFC
- c#
- VB.NET
- 데이터베이스
- 문자열
- 설치
- xml
- vb
- 기초
- dll
- winsock
- Delphi
- 파라미터
- 입문
- Visual Studio 2005
- 초보
- Firebird
- PostgreSQL
- 파이어버드
- 소니
Archives
- Today
- Total
프로그래밍 노트
델파이에서의 VB의 ByRef같이 참조로 변수를 넘기는 방법 본문
델파이에서의 VB의 ByRef같이 참조로 변수를 넘기는 방법
unit Unit1;
interface
uses
Forms, StdCtrls, Controls, Classes;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure RefParam(var sParam : string);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
sTest : string;
begin
sTest := '';
RefParam(sTest);
Button1.Caption := sTest;
end;
procedure TForm1.RefParam(var sParam: string);
begin
sParam := '참조변수';
end;
end.
함수의 파라미터를 정의할 때 var를 쓰면 그 파라미터는 참조형식으로 된다.
Comments