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 support@ccsinfo.com

delay_ms(time)? variable? constant?

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



Joined: 20 Feb 2004
Posts: 4

View user's profile Send private message

delay_ms(time)? variable? constant?
PostPosted: Fri Mar 05, 2004 12:53 pm     Reply with quote

What does it mean that we can do delay_ms() for a variable 0-255 or a constant 0-65535?

I assume we can only have an int in the argument there, right? Otherwise, a hard-coded number will be interpreted by the compiler as valid anywhere from 0-65535?

So the following is invalid?

Code:

long x;
...
delay_ms(x);


I compiled it and there is no warning or error. So CCS then just truncates the variable?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Mar 05, 2004 5:40 pm     Reply with quote

Quote:
long x;
...
delay_ms(x);

I compiled it and there is no warning or error.
So CCS then just truncates the variable?

Based on looking at the .LST file output, apparently so.

Here is one of my old posts with a routine that accepts
a 16-bit parameter.
http://www.ccsinfo.com/forum/viewtopic.php?t=375
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