Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-16723

Why does this Macro not compile?

    XMLWordPrintable

    Details

    • Type: Question
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.2
    • Fix Version/s: 6.4.0
    • Component/s: eclcc
    • Labels:
    • Environment:
      N/A

      Description

      I have the most simple MACRO that I cannot get to work.

      This compiles:

      STRING str := 'aaa';

      irow() := MACRO

      {'str',str}
      ENDMACRO;

      d := DATASET([{'str',str}

      ]
      ,

      {STRING one,STRING two});

      This does not:

      STRING str := 'aaa';

      irow() := MACRO
      {'str',str}
      ENDMACRO;

      d := DATASET([irow()]
      ,{STRING one,STRING two}

      );

      The ECL ref manual says 'A macro behaves as if you had typed the tokenstream into the exact position you use it, using lexical substitution'
      I'm not even using any lexical substitution so why does this macro not work, and how can I get it to work?

      Yours
      Allan

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              allan Allan Francis Wrobel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: