Build with ifdef problem

(jeremy) #1

This used to work, now it doesn’t like it:

      if section=0 then begin
        if (fDetailItem.bars:count>1) then inc(result);
      {$IFDEF TestCounts}
      end else if section=2 then begin
        exit 1;
      end else exit 4;
      end else exit 4;

(ENDIF expected, it doesn’t like the ‘end’ after the definition). In latest stable is OK, it’s just 10. beta

(jeremy) #2

This is probably related:

method siteMenuTableViewController.tableView(tableView: UITableView) titleForHeaderInSection(section: NSInteger): NSString;
  case section of
    0: exit 'Site Menu';
  {$IFDEF TestCounts}
    2: exit 'Generate Counts';
    else exit 'Site Details';

Error is in the line with the IFDEF:
(E374) colon (:) or comma (,) expected, got "exit"

(marc hoffman) #3


(jeremy) #4

Thanks marc, missed that. Makes sense. In a lot of ways, it’s more readable anyway.

(Carlo Kok) #5

That said; the “case” should work. I’ll log that one.

(RemObjects) #6

Thanks, logged as bugs://79354

(RemObjects) #7

bugs://79354 got closed with status fixed.