Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
guides:objects:classes [2025-03-31 19:34] – [Function Objects] Rename to "Functions as Objects" geek | guides:objects:classes [2025-03-31 19:40] (current) – [Functions as Objects] Increase detail on function variable assignment example geek | ||
---|---|---|---|
Line 215: | Line 215: | ||
} | } | ||
+ | MyVar := MyFunction ; Put MyFunction into a different variable | ||
+ | |||
+ | ; MsgBox is an Object and a Function | ||
MsgBox IsObject(MsgBox) ", " Type(MsgBox) | MsgBox IsObject(MsgBox) ", " Type(MsgBox) | ||
+ | |||
+ | ; MyFunction is an Object and a Function | ||
MsgBox IsObject(MyFunction) ", " Type(MyFunction) | MsgBox IsObject(MyFunction) ", " Type(MyFunction) | ||
- | MyVar := MyFunction | + | ; MyVar, which contains |
- | MyVar() ; Call the function | + | MsgBox IsObject(MyVar) ", " Type(MyVar) |
+ | |||
+ | ; We can call the function inside MyVar easily | ||
+ | MyVar() | ||
</ | </ | ||