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

Warning 203 "test.c" Line 10(1,1): Condition alway

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







Warning 203 "test.c" Line 10(1,1): Condition alway
PostPosted: Wed Jun 04, 2003 9:01 am     Reply with quote

Why!
Tell me.

#include <16F877.h>
#fuses
#use delay(CLOCK=20000000)
#fuses HS,WRT,NOPROTECT,NOWDT
#include <lcd.c>

main(){
lcd_init();

while(1){

lcd_putc("message001");
delay_ms(1000);
}
}


Deleting intermediary files... done.
Executing: "C:\Program files\Picc\CCSC.exe" "test.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
>>> Warning 203 "test.c" Line 10(1,1): Condition always TRUE
Memory usage: ROM=3\% RAM=3\% - 9\%
0 Errors, 1 Warnings.
Loaded D:\test\test.cof
BUILD SUCCEEDED
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515030
Tomi
Guest







Re: Warning 203 "test.c" Line 10(1,1): Condition a
PostPosted: Wed Jun 04, 2003 10:25 am     Reply with quote

:=Why!
:=Tell me.

Because "1" never becomes "0": while (1)
The TRUE state in C means "non zero".
:=
:=#include <16F877.h>
:=#fuses
:=#use delay(CLOCK=20000000)
:=#fuses HS,WRT,NOPROTECT,NOWDT
:=#include <lcd.c>
:=
:=main(){
:= lcd_init();
:=
:=while(1){
:=
:= lcd_putc("message001");
:= delay_ms(1000);
:=}
:=}
:=
:=
:=Deleting intermediary files... done.
:=Executing: "C:\Program files\Picc\CCSC.exe" "test.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
:=>>> Warning 203 "test.c" Line 10(1,1): Condition always TRUE
:= Memory usage: ROM=3\% RAM=3\% - 9\%
:= 0 Errors, 1 Warnings.
:=Loaded D:\test\test.cof
:=BUILD SUCCEEDED
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515031
Dave Yeatman
Guest







Re: Warning 203 "test.c" Line 10(1,1): Condition a
PostPosted: Wed Jun 04, 2003 9:39 pm     Reply with quote

These are just typical precautionary warnings that many compilers issue to make sure you know this was done.

Notice it says "Build Succeeded" which means the program copiled normally.

Another warning you may see is one for unused variables (#202) which may or may not be handy for you. I use it when I am in the "clean up" stages, otherwise I keep it turned off.

To hide these messages put in a line near the top of the code like:

#IGNORE_WARNINGS 202, 203
// turn off Unused Variables (202)
// and Always True (203) warnings

Regards,
Dave

:=Why!
:=Tell me.
:=
:=#include <16F877.h>
:=#fuses
:=#use delay(CLOCK=20000000)
:=#fuses HS,WRT,NOPROTECT,NOWDT
:=#include <lcd.c>
:=
:=main(){
:= lcd_init();
:=
:=while(1){
:=
:= lcd_putc("message001");
:= delay_ms(1000);
:=}
:=}
:=
:=
:=Deleting intermediary files... done.
:=Executing: "C:\Program files\Picc\CCSC.exe" "test.c" +FM +DF +LN +T -A +M +Z +Y=9 +EA
:=>>> Warning 203 "test.c" Line 10(1,1): Condition always TRUE
:= Memory usage: ROM=3\% RAM=3\% - 9\%
:= 0 Errors, 1 Warnings.
:=Loaded D:\test\test.cof
:=BUILD SUCCEEDED
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515041
isao hyuga
Guest







Re: Warning 203 "test.c" Line 10(1,1): Condition a
PostPosted: Thu Jun 05, 2003 7:56 am     Reply with quote

The problem was solved.
Thank you very much.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515047
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