Skip to content

True and False

What are true and false?

In programming, true and false are the most fundamental values that indicate whether a condition is met or not.

  • "Is 1 equal to 1?" → True (yes)
  • "Is 1 equal to 2?" → False (no)
  • "Is it raining today?" → True or false depending on the situation

Most programming languages have a dedicated type called boolean (true and false) to represent these two values. Conditionals and loops look at these true/false values to decide what to do next.

How booleans are represented in other programming languages
javascript
true
false
python
True
False
java
true
false
cpp
true
false
rust
true
false
go
true
false
ruby
true
false
haskell
True
False
r
TRUE
FALSE

True and False in Junlang

Junlang has no separate boolean type like true or false. Instead, all values are treated as numbers, and truth or falsehood is determined by whether the value is zero or not.

Evaluation Rules

ValueMeaning
Any number other than 0True (truthy)
0False (falsy)

In other words, (1), 오오(2), ?오(-1), and 오ㅋ오오오오오(1.5) are all evaluated as true, while only 오?(0) is false.

Comparison Results

The results of comparison operators (@, , , etc.) are also expressed as numbers.

ResultJunlang NotationValue
True1
False오?0

INFO

Junlang uses only two values to represent true and false: (1) and 오?(0). Therefore, if you output the result of a comparison directly, it will always be either or 오?.

Examples

junlang
@

The above code evaluates 1 == 1, so the result is (1, true).

junlang
@오오

The above code evaluates 1 == 2, so the result is 오?(0, false).

Usage in Conditionals

Conditionals treat the result of an expression as true if it is not 0. This means you can branch using just numbers or variables, without an explicit comparison.

junlang
준서야 맞냐?
  오준서오

The condition in this code is (1), which is not 0, so it always evaluates to true and the statements inside the block are executed.

junlang
준서야 오? 맞냐?
  오준서오

In contrast, the condition here is 오?(0), which is false, so the statements inside the block are not executed.

 Not sure what comparison operators and conditionals are?

 — Don't worry!
 The comparison operators and conditionals mentioned in this document will be explained in detail later.