query to run this function
I have created a programme to run a function. This program will run for 10 times. My question is I want system to run the program less than 10 times ( for example 6 times) and stop immediately . I do not want to change the condition in while statement. Please guide me.
public class Script
public static void Run(Tekla.Technology.Akit.IScript akit)
while ( a < 10 )
akit.Callback("acmd_update_marks_all", "", "main_frame");
akit.Callback("acmdRemoveAllMarkChangeSymbols", "", "main_frame");
akit.Callback("grOpenNextDrawingCB", "", "main_frame");
please send your reply to email@example.com
Re: query to run this function
> please send your reply to
Sorry, that doesn't work here. You post here, you read your answer here.
> Posts: 1
Ah, I see. At a guess you're just spamming all the programming forums you can find with the same question and hoping we'll just drop the answer directly into your inbox. Good luck with that. Most people can see through such laziness (and in fact most don't bother replying to such a timewaster).
OK, only one other. That's not bad; I've seen posts to a lot more than that in the past.
Well, anyway, I do have an actually useful comment to make. If you can't change the while, is there something else you can change to make the loop only execute 6 times? What if a isn't initialised to 1, for example? But why wouldn't you want to change the while; this obfuscates the code, and a isn't used in the loop so the values don't really matter; it's just a mechanism for repeating the loop contents the required number of times. Is this an academic exercise?
|All times are GMT +5.5. The time now is 21:50.|