Computer Science Canada procedure |
Author: | gilbamy [ Thu Jun 15, 2006 11:58 am ] | ||
Post subject: | procedure | ||
alright i am having trouble getting my stupid imaginary company logo to appear first and yes this the first time i have relly used procedures
i know i need forks though right |
Author: | Tony [ Thu Jun 15, 2006 12:24 pm ] | ||
Post subject: | |||
you are not allowed to use forks. you just call procedures by their name
|
Author: | Delos [ Thu Jun 15, 2006 3:07 pm ] |
Post subject: | |
There is an error in Tony's code there. However, this is a very constructive error. Locate it, and see if you can figure out how to fix it. As a hint, procedures, functions, and so forth, act just like regular variables. In fact, both procedures and functions are first-class values - they are quite analagous to ints and reals and booleans. To that effect, they are just as sensitive when it comes to their naming and (possible) inclusion of parameters. |
Author: | Tony [ Thu Jun 15, 2006 4:03 pm ] |
Post subject: | |
you know you've been writing more Ruby than Turing when... Edit: and I'm not refering to the use of parameters.. though ya, what Delos said. |
Author: | gilbamy [ Thu Jun 15, 2006 4:57 pm ] | ||
Post subject: | |||
well i got my log to appear except my name of my company won't appear and that its in a constant rotaion how do i fix that
|
Author: | Bored [ Thu Jun 15, 2006 5:07 pm ] | ||
Post subject: | |||
Look at these two lines, think about what they do and you'll figure it out. This is the type of problem you should be learning to figure out on your own. It's very simple, so I won't tell you, though my hint may make it VERY obvious.[/code] |
Author: | Tony [ Thu Jun 15, 2006 5:08 pm ] |
Post subject: | |
you have 8 seconds worth of delays inside a 0..800 loop. So it will take about 2 hours for that procedure to complete. |
Author: | gilbamy [ Thu Jun 15, 2006 5:31 pm ] |
Post subject: | |
i know Font.Draw puts my name in and drawline draws a bloody line but it would not work outside of my for loop and how to i make its so it well only take a few sec |
Author: | Bored [ Thu Jun 15, 2006 5:34 pm ] | ||
Post subject: | |||
Well to make it only take a couple of seconds well
well with 8 seconds of delays, 800 loops will take a VERY long time. And yes Font.Draw draws your name but what does the command right after it do, think about it, it's not a drawline now is it? |
Author: | gilbamy [ Thu Jun 15, 2006 5:43 pm ] |
Post subject: | |
oh yeah i forgot about that for loop thing opps i am an idiot thing but my text still won't appear though |
Author: | gilbamy [ Thu Jun 15, 2006 6:26 pm ] |
Post subject: | |
never mind i got now thx for your help everyone |
Author: | wtd [ Thu Jun 15, 2006 6:43 pm ] | ||
Post subject: | |||
Holy lack of loops Batman!
Sure ya can't figure out any way to automate this a bit more? |
Author: | Clayton [ Thu Jun 15, 2006 9:03 pm ] |
Post subject: | |
use nested for loops and a clever idea to cut that down to about 5 lines, or even better, use TOTG's idea that he posted in ur other thread to cut it down to about 3 lines, optimization is the king @Tony: wow, um i dont know what to say about that lol |
Author: | Tony [ Thu Jun 15, 2006 11:05 pm ] |
Post subject: | |
SuperFreak82 wrote: @Tony: wow, um i dont know what to say about that lol
what can I say, I haven't programed with Turing in years. Someone should get me an Intel Mac |