Announcement

Collapse
No announcement yet.

Filling Arrays

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Filling Arrays

    I know this must be simple, but I can not find it, and my VB corruption may be the reason why.

    Is there some easy way to do the following?
    Code:
    Redim TempArray(UBOUND(RealArray))
    TempArray() = RealArray()
    Or do I have to loop through the elements of the array and fill the TempArray 1 element at a time?

    (No big, its only 4 lines of code vs 2 lines, but I thought I would ask.
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    Cliff,
    look in the help file under MAT
    Code:
    MAT a1() = a2()          'Assignment
    Paul.

    Comment


    • #3
      Also, check out the PEEK function information in the Help file. It has an example of exactly what you want to do (copy one array to another).
      Paul Squires
      FireFly Visual Designer (for PowerBASIC Windows 10+)
      Version 3 now available.
      http://www.planetsquires.com

      Comment

      Working...
      X