method_overloading
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| method_overloading [2018/01/24 12:52] – wolfgangriedmann | method_overloading [2018/01/24 12:56] (current) – wolfgangriedmann | ||
|---|---|---|---|
| Line 29: | Line 29: | ||
| .... | .... | ||
| method Foo( cString as string ) as int</ | method Foo( cString as string ) as int</ | ||
| + | |||
| + | Of course this applies also to longer parameter lists. Here a sample piece of code that uses overloaded constructors and chains them: | ||
| + | < | ||
| + | protect _cFullName as string | ||
| + | |||
| + | constructor( cFullName as string ) | ||
| + | _cFullName := cFullName | ||
| + | return | ||
| + | | ||
| + | constructor( cSurname as string, cName as string ) | ||
| + | super( cName + " " + cSurname ) | ||
| + | return</ | ||
| + | |||
| + | |||
method_overloading.1516798328.txt.gz · Last modified: 2018/01/24 12:52 by wolfgangriedmann