| Randomize Procedures? 
 
	 
	
		| Author | Message |   
		| WesWes 
 
 
 
 
 | 
			
				|  Posted: Thu Dec 19, 2002 12:54 am    Post subject: Randomize Procedures? |  |   
				| 
 |  
				| I feel like an idiot, asking you dudes all these moronic questions, but I need help. I'm a fool. 
 How might I randomize procedures?
  |  
				|  |  |   
		|  |  |  
	  
		|  |   
		| Sponsor Sponsor
 
  
   |  |   
		|  |   
		| Dan 
 
  
 
 
 | 
			
				|  Posted: Thu Dec 19, 2002 1:32 am    Post subject: hummm |  |   
				| 
 |  
				| not 100% shure what you mean, but this is what  think you whont. 
 
 	  | code: |  	  | 
var num : int %var to  store ran num
 
 %procedures
 procedure hello
 put "hi"
 end hello
 
 procedure bye
 put "bye"
 end bye
 
 procedure swat
 put "swat rules"
 end swat
 
 %main loop
 loop
 num := Rand.Int (1, 3) %get ran number
 
 %if staments to figer out wich procdure to run
 if num = 1 then
 hello
 
 elsif num = 2 then
 bye
 
 elsif num = 3 then
 swat
 end if
 
 delay (100) %makes it so all the output dose not go by at onec
 end loop
 
 | 
 
 i hope that hellped
 |  
				| Computer Science Canada
Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more! |  |   
		|  |  |  
	  
		|  |   
		| WesWes 
 
 
 
 
 | 
			
				|  Posted: Thu Dec 19, 2002 9:23 pm    Post subject: (No subject) |  |   
				| 
 |  
				| Awesome! Thanks dude! 
 My program is complete!!
 
 Thanks!!!
  |  
				|  |  |   
		|  |  |  
	  
		|  |   
		|  |  
 |