This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
tutorial:procedureandfunction [2019/01/04 15:17] admin [Passing Parameters] |
tutorial:procedureandfunction [2019/01/04 15:56] admin |
||
---|---|---|---|
Line 135: | Line 135: | ||
writeln('X = ',X); | writeln('X = ',X); | ||
end; | end; | ||
- | </sxh> | + | </sxh> \\ |
- | + | ||
- | อย่างไรก็ตาม เราสามารถระบุ const หน้า Parameter ได้เช่นกัน | + | |
- | + | ||
- | <sxh delphi;> | + | |
- | procedure DoItA(const X:integer); | + | |
- | begin | + | |
- | X:=10; | + | |
- | writeln('X = ',X); | + | |
- | end; | + | |
- | </sxh> | + | |
- | \\ | + | |
====By Reference==== | ====By Reference==== |