Computer Science Canada I need some help with a project. |
Author: | Nemo296 [ Sat Apr 04, 2009 11:23 pm ] |
Post subject: | I need some help with a project. |
Well, I'm just wondering if its possible to add a OR statement into a if statement Here's an example. if GAMES = "Points" or "points" then Please Help me =D |
Author: | Dusk Eagle [ Sat Apr 04, 2009 11:33 pm ] | ||||||
Post subject: | Re: I need some help with a project. | ||||||
Your statements must be written like this:
What that means is you must do something like the following:
However, it looks like what you want to do is check for capitalization. This can be accomplished much better through the use of Str.Upper() or Str.Lower().
|
Author: | Tony [ Sat Apr 04, 2009 11:47 pm ] |
Post subject: | RE:I need some help with a project. |
there's an example in documentation of using an or -- if. |
Author: | Nemo296 [ Sun Apr 05, 2009 1:15 am ] | ||||||
Post subject: | Re: I need some help with a project. | ||||||
Dusk Eagle @ Sat Apr 04, 2009 11:33 pm wrote: Your statements must be written like this:
What that means is you must do something like the following:
However, it looks like what you want to do is check for capitalization. This can be accomplished much better through the use of Str.Upper() or Str.Lower().
Thanks that helped me, I got it working. |
Author: | Nemo296 [ Sun Apr 05, 2009 2:45 am ] |
Post subject: | RE:I need some help with a project. |
Ok, So i fixed that issue. Now I have a new issue. My Elsif statements don't go past the second one if BLA = "grrr" then %CODE elsif BLA = "Grrr2" then %CODE2 elsif BLA = "Grrr3" then %CODE THAT DOESNT WORK elsif BLA = "Grrr4" then %CODE THAT DOESNT WORK end if Things in bold are what needs fixing |
Author: | Tony [ Sun Apr 05, 2009 3:03 am ] |
Post subject: | RE:I need some help with a project. |
what is the value of variable BLA when the bolded code doesn't work? |
Author: | Nemo296 [ Sun Apr 05, 2009 7:43 am ] | ||
Post subject: | RE:I need some help with a project. | ||
This is my code.
It says all the variables don't have a value when i make VOID1 ice arrow or ice arrows. |
Author: | TheGuardian001 [ Sun Apr 05, 2009 12:02 pm ] | ||
Post subject: | Re: I need some help with a project. | ||
if you want your strings to have a space in them (like in ice arrows) you must either surround them in quotes when inputting them, or use
by default, Turing stops reading input after a space. adding :* will stop this from happening. |
Author: | Nemo296 [ Sun Apr 05, 2009 12:19 pm ] |
Post subject: | RE:I need some help with a project. |
Omfg, thank you so much =D It worked. |
Author: | Nemo296 [ Sun Apr 05, 2009 4:36 pm ] | ||
Post subject: | RE:I need some help with a project. | ||
Ok, one more thing. I thank everyone who's helped me. I get this error when I try to run the stand alone program. Bad object File Header in "project.exe" . (2) Heres my FULL program.
|
Author: | TheGuardian001 [ Sun Apr 05, 2009 6:08 pm ] |
Post subject: | Re: I need some help with a project. |
The bad object header error means that you are using the version of Turing in which compiling is broken. Downloading a slightly older version (I think the one linked to at the top of the compsci.ca page works) and recompiling should fix this problem. |
Author: | Tallguy [ Mon Apr 06, 2009 12:46 pm ] |
Post subject: | RE:I need some help with a project. |
i'm just very curious wat is the point of this code? |
Author: | blankout [ Mon Apr 06, 2009 3:04 pm ] |
Post subject: | Re: I need some help with a project. |
hmmm, i asked this same question about a week ago, how funny |