sketch seems to skip lines..

Sorry for the formating issue,

Second:[quote author=James C4S link=topic=104677.msg785227#msg785227 date=1336332058]
Second, you've defined analog inputs for the buttons, is this what you meant to do?
[/quote]

I used analog input because my actual project needs LCD and motor controls as well as interrupts, thus since I was using most of the other pins for those, I decided to use the analog pin as digital input pins for the switches.

Yes it has the same issues, I wrote this code to experiment with when the actual project code gave me the problem as a trouble shooting measure. with some modification (the actual does not have an infinite loop before reaching the main loop function but one of the button would ask if you want to go back to previous step which would then bring you to the start otherwise proceed to the next step.)

If there is a fundamental flaw, please do point it out, I have been looking at this for some time now, but can't really notice it. To make things worse, it does work sometimes but rather erratic... Since i am new to MCU programming and electronics as a whole, I hope someone can provide some guidance or suggest some alternatives to try. Thanks . below is the reformatted code....

// Initialize LCD
#include <LiquidCrystal.h>
LiquidCrystal lcd (8,9,10,11,12,13);

// define variables
int yes = A0;
int no = A1;



// setup
void setup(){

  pinMode (yes, INPUT); 
  pinMode (no, INPUT); 
  lcd.begin (16,2);
  start();  // call (start) function
}
void start()
{                                  // start function (introduction screen)
  lcd.clear();
  lcd.print ("WELCOME");
  delay (1000);
  lcd.clear();
  lcd.print (" 1    2");
  while (digitalRead (yes)== LOW && digitalRead (no) ==LOW)
  {                                  //waits for button to be pressed
    if (digitalRead (yes) == HIGH)
    {                                 // what to do if yes is pressed
      delay (500);                    // to give enough time to unpressed the button

      button_one();                  // to call (button one) function
    }

    if (digitalRead (no) == HIGH)
    {                              // What to do if no button was pressed
      delay (500);                    // to give enough time to unpressed the button
      button_two();
    }
  }
}

// button one                // button one function
void button_one()
{
  lcd.clear ();
  lcd.print ("BUTTON ONE");
  delay (500);
  start();                    // goes back to start
}

// button two

void button_two()
{                              // button two function
  lcd.clear ();
  lcd.print ("BUTTON two");
  delay (500);
  start();                      // goes back to start
}


// main loop
void loop()
{

  lcd.clear();
  lcd.print ("MAIN LOOP");
  delay (1000);



}