Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4286

Composite Constants Defined by Other Constants

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Compiler (General)
    • None

    Description

      We would like to define constants by using previously defined constants.

      Example 1:
      const string PREFIX = "prefix/path"
      const string SUFFIX = "suffix/path"
      const string CONCATENATION = PREFIX + "/" + SUFFIX
      // which will yield to prefix/path/suffix/path

      Example 2:
      const i32 MULTIPLICAND = 25
      const i32 MULTIPLIER = 4
      const i32 PRODUCT = MULTIPLICAND * MULTIPLIER

      Attachments

        Activity

          People

            Unassigned Unassigned
            merter Merter Sualp
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: