Programmin custom, 1 and 0 for Yes and No

C

Cyont

Hi,
Is there a programming custom for Yes and No when we convert them into
numeric? Is usually 1 for Yes and 0 for No, or vice versa?

Cyont
 
C

CJM

It varies across platforms and languages...

Most often it is:

Zero = False
Non-Zero = True

Some are more specific: 0 = False, 1 = True
Alternatives include: 0 = False, -1 = True

Are you talking generally or about a specific instance?

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top