Haha
Member 10118706
Posts
-
I am a Beginner, could you help please?. -
I am a Beginner, could you help please?.Prissy, Thank you very much for the code I appreaciate the help im glad Dave explained it to me as this would of been cheating :P :-O
-
I am a Beginner, could you help please?.Dear Dave, Many thanks for explaining it to me as well instead of just giving me the code, My teacher will be impressed haha Many Thanks 101
-
I am a Beginner, could you help please?.Hi guys this is simple but I'm a novice trying to cache the getMyresult function but I'm struggling to find the code to do so, could you help please? :|. I don't want the answer just some of the methods and syntax.
Sub Main
console.writeline(getmyresult(2)) 'takes a while'
console.writeline(getmyresult(3)) 'takes a while'
console.writeline(getmyresult(2)) 'Should be instant'
console.writeline(getMyresult(3)) 'Should be instant'
End Subfunction getMyresult(X as interger) as integer
dim Y as integer=LongCompute(X)
return Y
end functionfunction LongCompute(X as integer) as integer
system.threading.thread.sleep(1000)
return x^2
end function