Computer Science Canada Procedure Greet Help |
| Author: | storm2713687 [ Mon Feb 25, 2013 2:55 pm ] | ||
| Post subject: | Procedure Greet Help | ||
What is it you are trying to achieve? I'm trying to fix my code, but I'm not sure what's wrong with it. What is the problem you are having? I can't get the script to run because r is not declared. Describe what you have tried to solve this problem I've actually tried to fix it already, but I just can't get it to run, and I'm just trying to make my script shorter without repeating things over and over again. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using I'm using version 4.1.1 for windows. P.S. I read that this version of Turing can't generate a stand-alone program. Which version should I use then? I'm using a 64 bit windows 8 computer. Thanks for helping. |
|||
| Author: | Insectoid [ Mon Feb 25, 2013 3:07 pm ] |
| Post subject: | RE:Procedure Greet Help |
You declared r inside greet. That means you can only use it from inside greet. If you want to use it anywhere else, you need to declare it globally (ie not inside any procedure). |
|
| Author: | storm2713687 [ Tue Feb 26, 2013 8:38 am ] |
| Post subject: | Re: RE:Procedure Greet Help |
Insectoid @ Mon Feb 25, 2013 3:07 pm wrote: You declared r inside greet. That means you can only use it from inside greet. If you want to use it anywhere else, you need to declare it globally (ie not inside any procedure).
Should I declare r from outside the greet procedure? Also, thanks for helping and posting here in my thread. Edit: OHH NVM, I FOUND OUT WHY IT DIDN'T WORK. Thanks for all the help though, guys! |
|