Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
suggestion: initialize array values within the DIM statement
#13
(12-21-2022, 09:37 PM)Spriggsy Wrote: I always dim all my arrays as MyArray(0 to 5) or whatever. I want 0 to be my first element and I want to be doubly sure that my array is the exact size that I'm wanting.

What about a program that lists the names of the months? Zero for January and eleven for December seems a bit confusing.

It would be just the way it is in C, but one do not necessarily have to imitate it in Basic.
Reply


Messages In This Thread
RE: suggestion: initialize array values within the DIM statement - by Kernelpanic - 12-21-2022, 09:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Preserving multi-dim arrays Pete 5 432 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,873 10-17-2024, 02:01 PM
Last Post: mdijkens
  An Array v's A Dictionary Dimster 10 1,920 10-08-2024, 06:59 PM
Last Post: TempodiBasic

Forum Jump:


Users browsing this thread: 1 Guest(s)