Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Boolean as elements in Array?

Status
Not open for further replies.

pete

Member level 2
Member level 2
Joined
Aug 21, 2005
Messages
48
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,785
Hi to all! Is this possible? I need either 1 or 0 as elements in array.
 

in what language? c? of course.

however, you don't say how you want to use it so there is no way to know what you really need.
 

Hi, i think this is depend not only from the language, but also from compiler and procesor. For example, in Keil for x51 you can't do this, you cant make the area of bool, and cant put bool in structure or unit. Actually have the way to made area of bool, but can put it to the structure or unit. The reason, if i undersoot right is that or bit variable they use not a memory and on a registry.
 

yes, that is true but he didn't say what size he wanted the element to be (or what language or what processor). if it's one bit then it is totally dependent on the compiler (and language and processor).
 

Sorry, i mean CCSC compiler and using a PIC. If an array could handle other number types, why can't it handle 1 and 0 as array elements?
 

No, in CCS area of bit is not permit, but i memory that in a several project using the bit area ...... i not suare how exactly ... will be check later.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top