Author Topic: Macro Groups / Dotted Macros  (Read 1778 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Guest
Macro Groups / Dotted Macros
« on: February 05, 2015, 01:28:39 PM »
These allow macros to be grouped together, and acessed using the familiar dot notation, used in UDTs and OOP.

Available for both kinds of macro:

Code: OxygenBasic
  1. macro m()
  2.   macro .a(v)
  3.     print "A: " v
  4.   end macro
  5.   '
  6.  macro .b(v)
  7.     print "B: " v
  8.   end macro
  9. end macro
  10.  
  11. '#recordof m
  12. m.a 123
  13. m.b 123
  14.  

Code: OxygenBasic
  1. def m
  2.   def .a
  3.     print "A: " %1
  4.   end def
  5.   '
  6.  def .b
  7.     print "B: " %1
  8.   end def
  9. end def
  10.  
  11. '#recordof m
  12. m.a 456
  13. m.b 456
  14.  
  15.  

[