Results 1 to 5 of 5

Thread: Set Array = Nothing???

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Question

    How can one make an array empty? Once I am finsished with a rather large array I would like to complete wipe all values (I think, but don't know, that this would provide more free memory for the system).

    Can someone help?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  2. #2
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274

    Smile

    erase myarray (or whatever your array is named. It's that easy!

    Cheers

  3. #3
    Guest

    Talking Another Array Question

    If i have a situation like this

    Name(1)="Hi"
    Name(2)="Hi2"

    if i want to print both together , can i have it like this

    picture1.print name()?

    i know i can use loop like this
    for i = 1 to 2
    picture1.print name(i)
    next i
    wonder if the first one is correct

    thanks

  4. #4
    Hyperactive Member barrk's Avatar
    Join Date
    Sep 2000
    Location
    My own little world
    Posts
    274
    Nope!!! The first instance will not work. If you want them both to print on the same line separated by commas do something like this:

    Name(1)="Hi"
    Name(2)="Hi2"


    for i = 1 to 2
    allnames = allnames & ", " & name(i)
    next i

    printer.print allnames

    allnames should look like this Hi, Hi2


    (I notice you have picture1.print in your code. Do you know that you cannot print to a picture?)

  5. #5
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    Assumin Picture1 is a picture box and you are just printing
    to a picture box.
    Name is a reserved word so use sName

    Dim sName(1 To 2) As String
    sName(1) = "Hi"
    sName(2) = "Hi2"

    Picture1.Print sName(1) & "," & sName(2)

    If you have information stored in an array you don't need to loop through the array to read the elements. You merely call them by index.
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width