https://trans.onionmixer.net/mediawiki/index.php?title=StartprogrammingusingObjectPascal:Parameters&feed=atom&action=historyStartprogrammingusingObjectPascal:Parameters - Revision history2024-03-29T08:21:45ZRevision history for this page on the wikiMediaWiki 1.38.1https://trans.onionmixer.net/mediawiki/index.php?title=StartprogrammingusingObjectPascal:Parameters&diff=296&oldid=prevOnionmixer: SPOP 인자 페이지 추가2012-07-26T10:26:58Z<p>SPOP 인자 페이지 추가</p>
<p><b>New page</b></p><div>===인자===<br />
<br />
다음 예제에서는 프로시저를 호출할 때 변수를 전달하는 '''''인자'''''를 도입합니다.<br />
<br />
<syntaxhighlight lang="pascal"><br />
procedure WriteSumm(x, y: Integer);<br />
begin<br />
Writeln('The summation of ', x,' + ', y, ' = ', x + y)<br />
end;<br />
<br />
begin<br />
WriteSumm(2, 7);<br />
Write('Press enter key to close');<br />
Readln;<br />
end.<br />
</syntaxhighlight><br />
<br />
메인 프로그램에서 ''WriteSumm'' 프로시저를 호출했고 값 ''2''와 ''7''을 프로시저에 전달했으며, 프로시저는 이 값들에 대한 합계 결과를 기록하기 위해 ''x'', ''y'' 정수형 변수로 받을 것입니다.<br />
<br />
다음 예제에서는 프로시저를 사용하여 식당 프로그램을 다시 작성했습니다.<br />
[[Category:StartprogrammingusingObjectPascal]]</div>Onionmixer