Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
phone number to words
#12
I avoid making recursive calls within a sub to avoid stack space issues. Those were a big deal in QB, but not so much in QB64. I would assign a variable, exit the sub, and the next statement would determine to either re-loop the subroutine or move on.

Code: (Select All)
Do
MySub x
If x = 1 Then Exit Do
Loop

Sub MySub (x)
a = Int(Rnd * 20)
If a = 5 Then x = 1
End Sub

Pete
Reply


Messages In This Thread
phone number to words - by Jack - 06-30-2024, 02:44 AM
RE: phone number to words - by SMcNeill - 06-30-2024, 05:54 AM
RE: phone number to words - by Jack - 06-30-2024, 07:56 AM
RE: phone number to words - by bplus - 06-30-2024, 10:18 AM
RE: phone number to words - by bplus - 06-30-2024, 11:42 AM
RE: phone number to words - by SMcNeill - 06-30-2024, 12:31 PM
RE: phone number to words - by xerxes - 06-30-2024, 01:33 PM
RE: phone number to words - by Jack - 06-30-2024, 01:08 PM
RE: phone number to words - by SMcNeill - 06-30-2024, 01:45 PM
RE: phone number to words - by Pete - 07-02-2024, 06:22 PM
RE: phone number to words - by bplus - 07-02-2024, 07:40 PM
RE: phone number to words - by Pete - 07-02-2024, 08:05 PM
RE: phone number to words - by bplus - 07-02-2024, 10:52 PM
RE: phone number to words - by Pete - 07-03-2024, 01:46 AM



Users browsing this thread: 3 Guest(s)