|
|
View previous topic :: View next topic |
Author |
Message |
hyuga isao Guest
|
Warning 203 "test.c" Line 10(1,1): Condition alway |
Posted: Wed Jun 04, 2003 9:01 am |
|
|
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 |
Posted: Wed Jun 04, 2003 10:25 am |
|
|
:=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 |
Posted: Wed Jun 04, 2003 9:39 pm |
|
|
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 |
Posted: Thu Jun 05, 2003 7:56 am |
|
|
The problem was solved.
Thank you very much.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515047 |
|
|
|
|
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
|