BUCL.io / if
Prüft eine Texte oder Variablen auf einen bestimmten Inhalt.
Beispiel
if "Text" = "Text"
{res} = "Text ist gleich Text"
Quellcode
#This function is native code.
Prüft eine Texte oder Variablen auf einen bestimmten Inhalt.
if "Text" = "Text"
{res} = "Text ist gleich Text"
#This function is native code.
#Ich bin ein Kommentar
length
length "Hallo Welt."
{var1} length "Hallo Welt."
{var2} = "Länge ist: {var1}"{variable} = "Text1" "Text2"{r} random 0 10if "Text" = "Text"
{res} = "Text ist gleich Text"if "Text" = "Anderes"
{res} = "Text ist gleich Text"
elseif "Text" = "Text"
{res} = "Irgendwas anderes"if "Text" = "Anderes"
{res} = "Text ist gleich Text"
else
{res} = "Irgendwas anderes"{r} repeat 5
{res} = "{r/index} von 5 mal Hallo!"{e} each "Hans" "Peter" "Marie"
{res} = "Hallo {e/value}!"{res} writefile "test.txt" "Sample content"