How to concatanate integers in mikroC

Status
Not open for further replies.
Joined
Jul 25, 2012
Messages
1,192
Helped
171
Reputation
342
Reaction score
162
Trophy points
1,343
Activity points
0
Hello!

In my project I am entering 0-9 throygh keypad. I want to know how to concatanate Integers, i.e., if I press 2 and 5 it should be stored as 25 in a integer variable.
 

Hi,
'Character' can be used to store the key pressed, instead of 'Integer'. It would be easy and simple to concatenate 'Character' than 'Integer'.
Hope this helps...
 

Hi,
'Character' can be used to store the key pressed, instead of 'Integer'. It would be easy and simple to concatenate 'Character' than 'Integer'.
Hope this helps...

Can you give me an example code?
 

Hi,
What type of keypad you are using, how it is interfaced.. library routines for keypad is available in mikroC help. open "mikroC PRO for PIC Help" from start menu or from mikroc IDE. Go to "mikroC PRO for PIC Libraries" -> "Hardware Libraries" -> "Keypad Library". The example code may help you..
 

I know about keypad library and I am using that, but I want to know how to convert the entered char to int. If I enter 2 and then 5 it should be stored in a int variable as 25.

----------Update------------------

OK. The problem solved.
 
Last edited:

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…