Computer Science Canada Clac won't work |
Author: | Big_Tom [ Mon Mar 22, 2004 11:12 am ] |
Post subject: | Clac won't work |
I've tried everything and i can't get this to work...please help. |
Author: | Delos [ Mon Mar 22, 2004 12:42 pm ] | ||||||||||
Post subject: | |||||||||||
1) In your procs/fcns, since you want to alter your parameters, declare them as variable...
2) You cannot initialize vars/parameters at their declaration within a proc. Only after...
3) All fuctions must return a value:
If you don't know how that worked, press F10 for more syntaxial help. 4) You cannot call a function, only umm...'reference' it (I'm not sure of the technical term here...)
That's all I could find. Update and repost, will check again. |
Author: | Thuged_Out_G [ Mon Mar 22, 2004 3:52 pm ] | ||
Post subject: | |||
Delos wrote: var ans : string var number : int := 4 put "Yes or no?" get ans if ans = "y" then % number := fcn(number) % end if % This however, will work. put number the section i commented out doesnt really work isntead of "number:=fcn(number)" do it like this put fcn(number) where fcn is the name of your function ex:
|
Author: | Delos [ Mon Mar 22, 2004 7:52 pm ] |
Post subject: | |
Thanks! I was in a rush when I typed it so I put 'fcn' instead of 'h' for those 2 examples. I editted the post, so it reads correctly now. |