method_overloading
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
method_overloading [2018/01/24 12:51] – created wolfgangriedmann | method_overloading [2018/01/24 12:55] – wolfgangriedmann | ||
---|---|---|---|
Line 25: | Line 25: | ||
oClass:Foo( 1234 ) | oClass:Foo( 1234 ) | ||
</ | </ | ||
- | Please note: a different return type is not a different, so this will not compile: | + | Please note: a different return type is not a different |
< | < | ||
.... | .... | ||
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: | ||
+ | < | ||
+ | |||
+ | constructor( cFullName as string ) | ||
+ | return | ||
+ | | ||
+ | constructor( cSurname as string, cName as string ) | ||
+ | super( cName + " " + cSurname ) | ||
+ | return</ | ||
+ | |||
+ | |||
method_overloading.txt · Last modified: 2018/01/24 12:56 by wolfgangriedmann