[ create a new paste ] login | about

Link: http://codepad.org/YDgnraoi    [ raw code | output | fork ]

phuquy12 - C++, pasted on Jun 11:
if (clrscn)
  {
    clrscn = 0;    
    lcd_print(0,0,"Welcome to UTE",1);
    lcd_print(2,1,"Smart Library");
  }
  
  if (stringComplete)
  {
    stringComplete = false;
    getcommand(0, 6);
    if (commandString.equals("r_sttb"))
    {
      status = getdata(6, 9);
      endstring = getdata(9, 11);
      Serial.println(endstring);
      if (status == "off")
      {
        Serial.println("Alarm on");
        TIMER1_START_IT();
        /** ideas ??
         * int namelen = inputString.length() - 11
         * String namebook = getdata(11,namelen);
         * lcd.print(namebook);
        */
        String namebook = inputString.substring(11,inputString.length()-1);
        lcd_print(0,0,"Warning:",1);
        lcd_print(3,1,namebook);
        Serial.println("Warning:" + namebook);        
      }
      else if (status == ERR)
      {
        Serial.println("Alarm on");
        TIMER1_START_IT();
        lcd_print(0,0,"Error!!!",1);
      }
      // status = "";
    }
    inputString = "";
  }


Output:
1
2
Line 1: error: expected unqualified-id before 'if'
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: