Yesterday I made the if command. You aren't able to put code in like LB does
Code:if var$ = "var" then
print "You can't do this with Feather"
end if
but you can go to a label. It's like this
Code:if {
@ var
=
("var")
//ifstat\\
}
break()
//ifstat\\
window.text {
_WS_NORMAL
("IF stat")
}
embe ("This is how it's done in Feather.")
break()
Here is an example that uses the IF command (this will be included in the Feather 1.3 example file with the name "Greater or lesser.fth)
Code:console.off()
prompt.user {
("Enter a number between 1 and 10")
num
}
window.text {
_WS_NORMAL
("Greater or Lesser")
}
embeml {
Now you will find out if the number
you entered is greater, lesser or equal
to 5.
}
if {
@ num
<
("1")
//error\\
}
if {
@ num
<
("5")
//lesser\\
}
if {
@ num
>
("10")
//error\\
}
if {
@ num
>
("5")
//greater\\
}
if {
@ num
=
("5")
//equal\\
}
break()
//error\\
embe ("The number is invalid!")
break()
//lesser\\
embe ("The number is lesser then 5")
break()
//greater\\
embe ("The number is greater then 5")
break()
//equal\\
embe ("The number is equal to 5")
break()