guides:objects:classes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
guides:objects:classes [2025-03-31 19:34] – [Function Objects] Rename to "Functions as Objects" geekguides: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 ; Put MyFunction into different variable +MyVar, which contains MyFunction, is also now an object and function 
-MyVar() ; Call the function object stored inside MyVar+MsgBox IsObject(MyVar) ", " Type(MyVar) 
 + 
 +We can call the function inside MyVar easily 
 +MyVar()
 </runner> </runner>