Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Element 0 in arrays
#6
This can become problematic if you pass the address of the arrays to C functions IMO.

A safer and better way to declare arrays is by always using the `TO` keyword.

Like `DIM myArray(1 TO 1024) AS DOUBLE`.

That way the arrays aways have the exact number of elements regardless of the `OPTION BASE` setting.
Reply


Messages In This Thread
Element 0 in arrays - by PhilOfPerth - 09-18-2023, 06:35 AM
RE: Element 0 in arrays - by RhoSigma - 09-18-2023, 07:14 AM
RE: Element 0 in arrays - by PhilOfPerth - 09-18-2023, 11:17 AM
RE: Element 0 in arrays - by SMcNeill - 09-18-2023, 07:40 AM
RE: Element 0 in arrays - by RhoSigma - 09-18-2023, 12:58 PM
RE: Element 0 in arrays - by a740g - 09-18-2023, 01:40 PM
RE: Element 0 in arrays - by RhoSigma - 09-18-2023, 02:05 PM
RE: Element 0 in arrays - by mnrvovrfc - 09-18-2023, 02:31 PM
RE: Element 0 in arrays - by PhilOfPerth - 09-19-2023, 06:36 AM



Users browsing this thread: 3 Guest(s)