Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

converting signed to unsigned integer

Status
Not open for further replies.

youstron

Newbie level 6
Joined
Mar 5, 2012
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,372
how to convert signed to unsigned integer using mikroC?
 

Is it a positive signed integer?

If so then a simple typecasting would do the job

Code:
unsigned_var = (unsigned int)signed_var

If it is a negative number then typecasting will give a wrong result.

Alex
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top