Author |
Message |
Banished_Outlaw
|
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. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
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. |
|
|
|
|
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 |
|
|
|
|
|
|
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? |
|
|
|
|
|
Clayton
|
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" |
|
|
|
|
|
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. |
|
|
|
|
|
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. |
|
|
|
|
|
Tony
|
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. |
|
|
|
|
Sponsor Sponsor
|
|
|
|