language · keyword ·
if
Start a boolean branch
Use if for a small number of ordered decisions. Use match when one value has several named shapes or cases.
ifStatus: 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