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

Report a warning on inefficient use of alien TYPE

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2.42, 7.4.18
    • Component/s: Code Generator
    • Labels:
      None

      Description

      There are several examples in the code as follows:

      vdata(integer i) := TYPE
          export integer physicallength(data s) := i;
          export data load(data s) := s[1..i];
          export data store(data s) := s;
      END;
      
      rawLayout := record
          string20 dl;
          string8 date;
          unsigned4 imgLength;
          vdata(SELF.imgLength) jpg;
      end;
      

      they would be much better represented as:

      rawLayout := record
          string20 dl;
          string8 date;
          DATA jpg;
      end; 
      

      which also has an identical binary representation.

       

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              ghalliday Gavin Halliday
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: