Boolean values: Difference between revisions

(Added Dyalect programming language)
Line 307:
print true
</lang>
 
 
=={{header|Batch File}}==
The closest thing to Boolean values in batch files is using <code>if defined</code>.
If a variable has any value, it will evaluate to true.
 
You can make a variable false by clearing its value <code>set "var="</code>.
 
<lang dos>
@echo off
 
::true
set "a=x"
::false
set "b="
 
if defined a (
echo a is true
) else (
echo a is false
)
if defined b (
echo b is true
) else (
echo b is false
)
 
pause>nul
</lang>
 
'''Output:'''
<pre>
a is true
b is false
</pre>
 
=={{header|BBC BASIC}}==