Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
suggestion: initialize array values within the DIM statement
#1
How difficult would it be to implement something similar to this in QB64PE? 

OPTION _EXPLICIT
DIM AS LONG LNUMS(5) = {1, 2, 5, 8, 4000}

This is syntax similar to C, and it is also supported to an extent by FreeBASIC. I have used this construct in FreeBASIC, and I have found it useful when initializing short arrays of 'fixed' data in a program.

(I always use OPTION _EXPLICIT, it has saved me more than a few times from fat-fingered typing.)
Reply


Messages In This Thread
suggestion: initialize array values within the DIM statement - by bobalooie - 12-21-2022, 03:36 AM



Users browsing this thread: 6 Guest(s)