Need to use # on a keypad

Good day everyone!
I was wondering on how do i use the swtich() case '#' function to allow an output thereafter. I have no idea why i cant seem to get it to work. Also note that i am using the ASCII table for value input.
The code would look something like this:

//
key=key-48
myValue= (myValue * 10 ) + key // that would give me 12 if i enter 1 then 2
if (key != NO_KEY)
{
switch(I dont know what goes in this parenthesis) 
{
case '#' :
digitalWrite ( conveyor , HIGH ) ;
}

But i just cant seem to get '#' to do something. Am i doing something wrong? All help is greatly appreciated!
}

And also another question i have is that why cant i use lcd.clear()? Is it because my code goes like this?
lcd.setCursor(0, 0);
lcd.write("Select item");
lcd.display();

Anything i display after the first wouldnt go off after i use lcd.clear() .
Again all help is greatly appreciated !

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

bob112112:

switch(I dont know what goes in this parenthesis)

Whatever variable you're testing the value of in your case statements. See:

bob112112:
And also another question i have is that why cant i use lcd.clear()?

Impossible to say from the information you've provided. Post your full sketch.

switch(I dont know what goes in this parenthesis)

The variable containing the value you want to switch on.
See switch...case - Arduino Reference

The code would look something like this:

Something like this is not good enough we need to know exactly what your code is so we can point out where you are going wrong.

Think about it, at the moment you do not know even the syntax of the language so what makes you think you have the skill to miss out irrelevant stuff.

Edit:- Pert beat me to the draw.

bob112112:
key=key-48
[...]
But i just cant seem to get '#' to do something.

Maybe you should try

switch '#'-48:

instead.

pert:
Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.
Whatever variable you're testing the value of in your case statements. See:
switch...case - Arduino Reference
Impossible to say from the information you've provided. Post your full sketch.

oh thank you i have been wondering on how to do it. Anyways i will reupload the questions !

wvmarle:
Maybe you should try

switch '#'-48:

instead.

And also:

   if (key != (NO_KEY-48))

Or better yet:

  if (key != NO_KEY)
  {
    if (key >= '0' && key <= '9')
      myValue = (myValue * 10 ) + (key - '0');  // that would give me 12 if i enter 1 then 2
    switch (key)
    {
      case '#' :
        digitalWrite ( conveyor , HIGH ) ;
    }