Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Just a Few Questions
#14
Quote:Just curious, where would a stack be handy in QB64 programming?
A stack is used where there are an arbitrary number of temporary values that need to be retained for an arbitrary length of time. Or, in English Wink , When you have one or more values that you think will be needed at a later point in the program but you don't know the exact number of values that will need retaining. The other thing to note is that the values are retrieved from a stack in reverse order to how they were added - i.e. the last value added is the first retrieved (Last In, First Out aka LIFO).

In QB64PE, emulated stacks are less useful due to not being able to add an array to to user-defined type. This in effect limits you to a single global (emulated) stack.

TR
Reply


Messages In This Thread
Just a Few Questions - by TarotRedhand - 09-09-2023, 09:44 AM
RE: Just a Few Questions - by mnrvovrfc - 09-09-2023, 10:14 AM
RE: Just a Few Questions - by bplus - 09-09-2023, 11:20 AM
RE: Just a Few Questions - by SMcNeill - 09-09-2023, 12:19 PM
RE: Just a Few Questions - by bplus - 09-09-2023, 12:42 PM
RE: Just a Few Questions - by mnrvovrfc - 09-09-2023, 01:02 PM
RE: Just a Few Questions - by SMcNeill - 09-09-2023, 02:05 PM
RE: Just a Few Questions - by bplus - 09-09-2023, 02:41 PM
RE: Just a Few Questions - by mnrvovrfc - 09-09-2023, 08:37 PM
RE: Just a Few Questions - by TarotRedhand - 09-10-2023, 07:09 AM
RE: Just a Few Questions - by TarotRedhand - 09-10-2023, 01:45 PM
RE: Just a Few Questions - by TerryRitchie - 09-10-2023, 02:47 PM
RE: Just a Few Questions - by bplus - 09-10-2023, 02:57 PM
RE: Just a Few Questions - by mnrvovrfc - 09-11-2023, 10:58 AM
RE: Just a Few Questions - by TarotRedhand - 09-11-2023, 09:11 AM
RE: Just a Few Questions - by DSMan195276 - 09-11-2023, 12:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Half baked pipe dream questions - hardware and os Parkland 9 1,333 05-23-2025, 03:00 PM
Last Post: madscijr
  _IIF limits two questions doppler 18 3,064 05-14-2025, 04:33 PM
Last Post: madscijr
  IDE suggestions / editor questions madscijr 14 2,361 05-01-2025, 12:56 PM
Last Post: madscijr
  Questions about INSTR Circlotron 7 1,037 04-27-2025, 03:12 PM
Last Post: mdijkens
  Questions on style justsomeguy 23 4,452 06-28-2023, 08:31 PM
Last Post: CharlieJV

Forum Jump:


Users browsing this thread: 1 Guest(s)