Loading ...
Sorry, an error occurred while loading the content.

181Expected a 'break' statement before 'case'

Expand Messages
  • Fred Lorrain
    Aug 20, 2008
    • 0 Attachment
      Hello,

      I know that break is recommended before a case but it's not mandatory.
      In the following example there is nothing wrong, right?

      switch (this.layout) {
      case 'calendarmonth2':
      ...
      this.generateMonth = this.generateMonth_finonline;
      case 'calendarmonth':
      this.drawMonthTabs();
      break;
      case 'calendarteaser':
      ...
      break;
      default:
      ...
      }

      Omitting the break before calendarmonth is done on purpose.
      Isn't it the right way to do it?

      Maybe the word Warning should be used instead of problem.

      Warning at line 732 character 66: Expected a 'break' statement before
      'case'.

      Instead of

      Problem at line 732 character 66: Expected a 'break' statement before
      'case'.


      [Non-text portions of this message have been removed]
    • Show all 3 messages in this topic