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
Author Message
chriss2000
Guest

 Array Problems ! Posted: Tue Feb 11, 2003 5:10 am hi i want to compare the long int "code" with an array of 4 long integer how can i do this ? long const werte [4] = { 0x3800,0x3000, 0x3801,0x3001 }; ???? if(code == werte [i]) { } ___________________________ This message was ported from CCS's old forum Original Post ID: 11514
zag
Guest

 Re: Array Problems ! Posted: Tue Feb 11, 2003 9:33 am :=hi :=i want to compare the long int "code" with an array of 4 long integer :=how can i do this ? := :=long const werte [4] = { := 0x3800,0x3000, := 0x3801,0x3001 := }; :=???? :=if(code == werte [i]) :={ := :=} for (i=0;i<3;i++) if(code == werte[i]) /*Your code*/ If I have understood the problem. Byez ___________________________ This message was ported from CCS's old forum Original Post ID: 11529
Dale Botkin
Guest

 Re: Array Problems ! Posted: Tue Feb 11, 2003 10:30 am :=:=hi :=:=i want to compare the long int "code" with an array of 4 long integer :=:=how can i do this ? :=:= :=:=long const werte [4] = { :=:= 0x3800,0x3000, :=:= 0x3801,0x3001 :=:= }; :=:=???? :=:=if(code == werte [i]) :=:={ :=:= :=:=} := := :=for (i=0;i<3;i++) := if(code == werte[i]) := /*Your code*/ := :=If I have understood the problem. :=Byez ___________________________ This message was ported from CCS's old forum Original Post ID: 11534
Dale Botkin
Guest

 Re: Array Problems ! Posted: Tue Feb 11, 2003 10:33 am :=:=hi :=:=i want to compare the long int "code" with an array of 4 long integer :=:=how can i do this ? :=:= :=:=long const werte [4] = { :=:= 0x3800,0x3000, :=:= 0x3801,0x3001 :=:= }; :=:=???? :=:=if(code == werte [i]) :=:={ :=:= :=:=} := := :=for (i=0;i<3;i++) := if(code == werte[i]) := /*Your code*/ Or: for (i=0;i=sizeof(werte)/2;i++) { if(code == werte[i]) { /*do whatever*/ } } I think... ___________________________ This message was ported from CCS's old forum Original Post ID: 11535
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT - 6 Hours Page 1 of 1

 Jump to: Select a forum Software----------------General CCS C DiscussionCode LibraryEZ App LynxBest Of Hardware----------------CCS ICD / Mach X / Load-n-Go
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