Results 1 to 10 of 22

Thread: visibility of variables

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #21
    I think I need to be able to allocate memory and to assign a pointer to it, i.e., dynamic arrays.
    This is one way of creating a dynamic array in Oxygen:

    Supposing you wanted to create a dynamic array of vectors:

    type vector single x,y,z
    
    
    dim as vector byref v
    
    
    @v=getmemory 1000*sizeof vector
    
    
    v[100]<=10,11,12, 20,21,22
    
    
    print v[101].y 'displays 21
    
    
    freememory @v
    
    It is possible to overlay an array onto any memory space, but you have to take care of bounds checking. Oxygen's arrays are primeval
    Last edited by Charles Pegge; 09-10-2011 at 18:00.

Similar Threads

  1. Do you know: Logical variables
    By ErosOlmi in forum Do you know ...
    Replies: 1
    Last Post: 06-05-2011, 17:27

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

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