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



Users browsing this thread: 5 Guest(s)