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

What is the default #option for BEGINC++ functions?

    Details

    • Type: Question
    • Status: Resolved
    • Priority: Minor
    • Resolution: Timed Out
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.4.x
    • Component/s: Documentation
    • Labels:
      None
    • Compatibility:
      Minor

      Description

      integer4 mkRandom1 :=
      BEGINC++
      //default as 'action'
      return rtlRandom();
      ENDC++;
      
      output(mkRandom1);
      output(mkRandom1);
      

      will give, for example:

      1683916540
      1683916540
      

      The LRM (and perhaps common sense) suggest that the default should be that of an 'action', yet this does not seem to be the case.

      "By default, embedded C++ functions are assumed to have side-effects,..."

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jamesdefabia Jim DeFabia
                Reporter:
                jamienoss Jamie Noss
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: