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 | 31 |
Tags
- 소니
- dll
- WIN32 SDK
- PostgreSQL
- 기초
- 데이터베이스
- c#
- Firebird
- 파이어버드
- 시리얼 통신
- MySQL
- 인스톨
- 문자열
- vb
- 설치
- 파라미터
- xml
- Visual Basic
- winsock
- 입문
- 초보
- Visual Studio 2005
- 셋업
- VB.NET
- SDK
- SQL
- MFC
- Delphi
- 예제
- 델파이
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