language · keyword ·

else

Provide the next or fallback branch

complete-programcpukeywordlogicyeho

Use if for a small number of ordered decisions. Use match when one value has several named shapes or cases.

else

Status: stable

File choose runtime

Use if for a small number of ordered decisions. Use match when one value has several named shapes or cases.

cpu · complete-program · type checked

text chosen = File.Choose("Choose a file for the Yeho test")
if Text.Length(chosen) == 0 { Console.Log("file-choose-cancel-ok") }
else { Console.Log("file-choose-selected-ok") }
project.mech
package = "tests.compiler.kyber.fileChooseRuntime"
version = "0.1.0"
backend = "kyber"
osTarget = "windows"
archTarget = "x64"
selfContainedApp = false
Notes and source

The condition must be bool.

Keep the most specific or highest-priority branch first.

yeho/parser_statements.cpp parseIfStatement; conformance control.boolean-conditions