Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-697

Add macro default parameters

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • Engine
    • None

    Description

      Add the ability to specify default parameters to macros, for example:

      #macro(foo $x $y="legit")$x$y#end

      calling this with #foo(2) would give:

      2legit

      Any number of default parameters can be specified, but no non-default parameters can not follow default parameters. Assignment of calling values begins from left to right and all left over default arguments are assigned their default values.

      Attachments

        Activity

          People

            Unassigned Unassigned
            byronvf Byron Foster
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: