CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Uchar problems

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Franz
Guest







Uchar problems
PostPosted: Wed Apr 07, 2004 9:29 am     Reply with quote

Hello I have a problems.
If I write:


void tipol ( ulong misura, uchar offset )
{
uchar var ;

var = 0xff&(misura >> 24) ;
............

Can i do it in a uchar?

............
Is the code correct?
Thanks in advance.
Sorry for my bad english.
Question
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: Uchar problems
PostPosted: Wed Apr 07, 2004 9:41 am     Reply with quote

Franz wrote:
Hello I have a problems.
If I write:


void tipol ( ulong misura, uchar offset )
{
uchar var ;

var = 0xff&(misura >> 24) ;
............

Can i do it in a uchar?

............
Is the code correct?
Thanks in advance.
Sorry for my bad english.
Question


Change ulong to int32 and uchar to int8. It helps to keep things straight when changing between compilers.
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

UChar Problems
PostPosted: Wed Apr 07, 2004 10:06 am     Reply with quote

This compiler is not an embeedded compiler and not a full blown C compiler so there are differences in the syntax.

The CCS C manual page 64 covers all the valid data types and the entire sections on Data Types and Function Definitions should be read to better understand the limitations.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group