Board Logo
« New IF command »

Welcome Guest. Please Login or Register.
Nov 22nd, 2009, 8:40pm




Pages: 1  Notify Send Topic Print
 thread  Author  Topic: New IF command  (Read 230 times)
Ļe Fŕenastø Apiyano
Administrator
ImageImageImageImageImage

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 103
thumbup New IF command
« Thread started on: Apr 4th, 2007, 2:08pm »

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()
 
« Last Edit: Apr 4th, 2007, 2:48pm by Ļe Fŕenastø Apiyano » User IP Logged

User Image
Caplet
Newbie Member
Image

member is offline

Avatar




PM


Posts: 11
xx Re: New IF command
« Reply #1 on: Apr 4th, 2007, 3:28pm »

wow thats pretty cool
User IP Logged

Ļe Fŕenastø Apiyano
Administrator
ImageImageImageImageImage

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 103
xx Re: New IF command
« Reply #2 on: Apr 4th, 2007, 4:34pm »

I have tried to make it so many times and I failed. But this time, I suceeded grin cool
User IP Logged

User Image
SS
Administrator
ImageImageImageImageImage

member is offline

Avatar




PM


Posts: 38
xx Re: New IF command
« Reply #3 on: Apr 4th, 2007, 9:31pm »

Copy Cat, lol, Nice Syntax. But I was not fast to post mine before yours.
User IP Logged

User Image
Ļe Fŕenastø Apiyano
Administrator
ImageImageImageImageImage

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 103
xx Re: New IF command
« Reply #4 on: Apr 4th, 2007, 10:30pm »

on Apr 4th, 2007, 9:31pm, SS wrote:
Copy Cat, lol, Nice Syntax. But I was not fast to post mine before yours.

grin Well, I guess I'm lucky grin grin grin
User IP Logged

User Image
SS
Administrator
ImageImageImageImageImage

member is offline

Avatar




PM


Posts: 38
xx Re: New IF command
« Reply #5 on: Apr 8th, 2007, 12:45am »

What other things can Father do with the IF command?
User IP Logged

User Image
nitesh201
Newbie Member
Image

member is offline

Avatar




PM


Posts: 14
xx Re: New IF command
« Reply #6 on: Apr 8th, 2007, 01:39am »

ImageFEATHER Image is coming along great! i can't wait till GB is ready for release!
User IP Logged

Ļe Fŕenastø Apiyano
Administrator
ImageImageImageImageImage

member is offline

Avatar




Homepage PM

Gender: Male
Posts: 103
xx Re: New IF command
« Reply #7 on: Apr 8th, 2007, 10:55pm »

Here is why the If command is so useful grin
http://feather999.conforums.com/index.cgi?action=display&board=code&num=1176065514&start=0#1176065514
User IP Logged

User Image
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »


New Monthly Ad-Free Plan!

$6.99 Gets 50,000 Ad-Free Pageviews!
| Hookah | Free Shoutboxes |

This Board Hosted For FREE By Conforums ©
Get Your Own Free Message Board!