Documentation topicsBooleans
Lexical Structure
Control Flow
Functions & Scope
Lists & Built-ins
Reference
MarathiCode v0.2.0
Booleans
खरे / खोटे
The two boolean values are खरे (true) and खोटे (false). Comparisons produce booleans, and they print in Marathi.
booleans.mr
चल पास = खरे
छापा(पास)
छापा(5 > 10)
छापा(नाही पास)Output (आउटपुट)
खरे खोटे खोटे
Truthiness
Conditions accept any value. These values count as false: खोटे, 0, "" (empty string), [] (empty list) and the empty result of a function that does not return a value. Everything else counts as true.
truthiness.mr
चल यादी = []
जर यादी तर {
छापा("यादीत काहीतरी आहे")
} नाहीतर {
छापा("यादी रिकामी आहे")
}Output (आउटपुट)
यादी रिकामी आहे
Booleans are not numbers:
1 == खरे is खोटे, and arithmetic on booleans is an error.