This shows you the differences between two versions of the page.
en:ifthen [2016/01/01 22:41] 127.0.0.1 external edit |
en:ifthen [2020/02/28 10:46] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== If / Then ===== | ||
- | ==== Format ==== | ||
- | **if** // | ||
- | ---- | ||
- | **if** // | ||
- | (tab)// | ||
- | **end if** | ||
- | ---- | ||
- | **if** // | ||
- | (tab)// | ||
- | **else**\\ | ||
- | (tab)// | ||
- | **end if** | ||
- | |||
- | ==== Description ==== | ||
- | A single line IF evaluates // | ||
- | ==== Example ==== | ||
- | < | ||
- | print "Guess my letter - press a key" | ||
- | # wait for the user to press a key | ||
- | do | ||
- | a = key | ||
- | pause .01 | ||
- | until a <> 0 | ||
- | # | ||
- | if chr(a) = " | ||
- | print " | ||
- | else | ||
- | print "darn, you pressed something else." | ||
- | end if | ||
- | # | ||
- | end | ||
- | </ | ||
- | |||
- | ==== See Also ==== | ||
- | {{page> | ||
- | |||
- | ==== New To Version ==== | ||
- | 0.9.4g | ||