Computer Science Canada

get the values??

Author:  appling [ Tue Nov 04, 2003 10:13 pm ]
Post subject:  get the values??

Sad how could i get the values from the main program when i am using the procedure?? Question


i really don't know how to do that.

Author:  Homer_simpson [ Tue Nov 04, 2003 10:23 pm ]
Post subject: 

code:
procedure times2(i:int)
put i*2
end times2


%main program...
var number:int
number:=4
times2(number)

Author:  Tony [ Tue Nov 04, 2003 11:27 pm ]
Post subject: 

you should read a tutorial on procedures. It talks about arguments and how to use them.

There're also globab variables, but turing is kind of sketchy on everything, so I donno... Confused

Author:  appling [ Wed Nov 05, 2003 12:34 pm ]
Post subject: 

thanks a lot..... i'm so happy that u can help me.

Author:  Tony [ Wed Nov 05, 2003 4:07 pm ]
Post subject: 

mail me a check to pay for next month's hosting Laughing

I'm j/k, you dont have to do that... Dan pays for it Twisted Evil


: