LCD Keypad Shield – Entering and Storing Numbers

Berdine:
A very good example from jurs!

I have a question: How do you set a variable = to value?

'value' is already a variable, it is a char array.

If you want to save the 'value' into a different variable, you could either:

  • declare a second char array and use the strcpy() function to copy the contents.

Or if you want to save the 'value' into a 'long' integer value, you can also:

  • declare a 'long' variable and use the atol() function to convert the variable contents in the char array 'value' into a numeric long variable type.