Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10628
Posted: 03:09pm 08 Oct 2022
Copy link to clipboard
Print this post
Print fred() Function fred() Do i=i+1 If i=50 Then fred=i Exit Function EndIf Loop Until i=1000 End Function
Nimue Guru Joined: 06/08/2020 Location: United KingdomPosts: 425
Posted: 03:12pm 08 Oct 2022
Copy link to clipboard
Print this post
I think what I was doing was forgetting to set the value of the function in the function -- the below now works. Thank you.
function check_pwd() for x = 1 to 1000 for y = 1 to 1000 for z = 1 to 1000 if x*y*z = 1500 then print x,y,z check_pwd=1500 exit function end if next z next y next x end function