Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
suggestion: initialize array values within the DIM statement
#5
(12-21-2022, 03:59 PM)mnrvovrfc Wrote: Wait a moment -- @bobalooie why do you want to initialize an array with subscript zero as the first element? :O

Well, in this case I am interested in just iterating through the array as a lookup table of sorts, so it doesn't really matter if the first element is at 0 or 1. If I was working in C, I could use the syntax I showed or perhaps make a doubly-linked list so I could iterate either direction.

Your example works well, but I perceive that I would need a new fill function for every data type I want to store. Not really a challenge of course, except for a list of CONST values.

Soldiering on.
Reply


Messages In This Thread
RE: suggestion: initialize array values within the DIM statement - by bobalooie - 12-21-2022, 05:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Preserving multi-dim arrays Pete 5 433 12-19-2025, 03:17 PM
Last Post: Dimster
  Arbitrary CONST values Unseen Machine 31 2,973 10-29-2025, 05:44 AM
Last Post: bplus
  Array out of passing arrays... Pete 2 417 09-22-2025, 08:53 PM
Last Post: ahenry3068
  Huge array of variable length strings mdijkens 9 1,875 10-17-2024, 02:01 PM
Last Post: mdijkens
  An Array v's A Dictionary Dimster 10 1,922 10-08-2024, 06:59 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)