Author |
Message |
Banished_Outlaw
![](http://compsci.ca/v3/uploads/user_avatars/1352570945f49e05dadcb.jpg)
|
Posted: Fri Apr 13, 2007 10:34 pm Post subject: Can Procedures Be Disabled? |
|
|
Is there any command in Turing that can disable a procedure.
I have an if condition in my program and when the if condition is true, I want all the procedures that follow it, to be disabled or not to show on the run screen.
I would really appreciate any suggestions. ![Neutral Neutral](http://compsci.ca/v3/images/smiles/icon_neutral.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sat Apr 14, 2007 12:31 am Post subject: RE:Can Procedures Be Disabled? |
|
|
You could do something like
Turing: |
procedure foo()
if global_flag then
return
end if
...
end foo
|
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
ericfourfour
|
Posted: Sat Apr 14, 2007 1:13 am Post subject: RE:Can Procedures Be Disabled? |
|
|
Or, you can only call the procedure if a certain condition is true.
Turing: | if condition then
procedure_call()
end if |
|
|
|
|
|
![](images/spacer.gif) |
Superskull85
|
Posted: Sat Apr 14, 2007 7:10 pm Post subject: Re: Can Procedures Be Disabled? |
|
|
I'd go the condition option.
P.S. This is off topic but, what does "..." do in Turing? |
|
|
|
|
![](images/spacer.gif) |
Clayton
![](http://compsci.ca/v3/uploads/user_avatars/1718239683472e5c8d7e617.jpg)
|
Posted: Sat Apr 14, 2007 8:10 pm Post subject: RE:Can Procedures Be Disabled? |
|
|
It does nothing... have you ever tried running code with ... in Turing? It just means "put your code here" |
|
|
|
|
![](images/spacer.gif) |
neufelni
|
Posted: Sat Apr 14, 2007 8:33 pm Post subject: RE:Can Procedures Be Disabled? |
|
|
I think that he may mean .. which causes the next line of output to be put on the same line rather than a new line. |
|
|
|
|
![](images/spacer.gif) |
Superskull85
|
Posted: Sat Apr 14, 2007 9:53 pm Post subject: Re: RE:Can Procedures Be Disabled? |
|
|
Clayton @ Sat Apr 14, 2007 8:10 pm wrote: It does nothing... have you ever tried running code with ... in Turing? It just means "put your code here"
I have and it just gives me an error. I just wanted to know because I've seen it around a lot and I wanted to know maybe I was using it wrong. I was putting it by itself, but there are other words/symbols like; and, or, of, end, exit, (,), .., : etc. that need to be accompanied by other words/symbols to work properly. I just wanted to know if this was one of them, but now I know it isn't. |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Sat Apr 14, 2007 10:01 pm Post subject: RE:Can Procedures Be Disabled? |
|
|
Indeed ... is usually a placeholder for more text. It often represents silence when speech is expected, such as in Final Fantasy games Here it could be read as "your code goes here". |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
|