This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
tutorial:proceduraltype [2018/09/21 10:50] admin |
tutorial:proceduraltype [2018/10/28 12:23] admin [Function of Object] |
||
---|---|---|---|
Line 105: | Line 105: | ||
---- | ---- | ||
- | ====Function of Object==== | + | =====Function of Object===== |
ตัวอย่างข้างบนนั้น ใช้ได้กับกรณีที่ function ถูกประกาศเป็น Global Scope เท่านั้น (จะสังเกตว่า func ไม่ได้อยู่ภายใต้ Class หรือ Object ใดๆ) ในกรณีที่ function ถูกประกาศเป็น Local Scope ภายใต้ Class หรือ Object ใดๆ จะต้องเปลี่ยนการประกาศ Type ใหม่เป็นดังนี้ | ตัวอย่างข้างบนนั้น ใช้ได้กับกรณีที่ function ถูกประกาศเป็น Global Scope เท่านั้น (จะสังเกตว่า func ไม่ได้อยู่ภายใต้ Class หรือ Object ใดๆ) ในกรณีที่ function ถูกประกาศเป็น Local Scope ภายใต้ Class หรือ Object ใดๆ จะต้องเปลี่ยนการประกาศ Type ใหม่เป็นดังนี้ | ||
+ | |||
+ | Type | ||
+ | TFunc = function(x:real):real of object ; | ||
<hidden Example-3: Function of Object (TForm)> | <hidden Example-3: Function of Object (TForm)> | ||
Line 176: | Line 179: | ||
</hidden> | </hidden> | ||
---- | ---- | ||
+ | =====Function is Nested===== | ||