Page 3 of 3 FirstFirst 123
Results 21 to 22 of 22

Thread: visibility of variables

  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.

  2. #22
    thinBasic MVPs danbaron's Avatar
    Join Date
    Jan 2010
    Location
    California
    Posts
    1,378
    Rep Power
    152
    Nothing wrong with that at all.

    I didn't see that way.

    "You can't cheat an honest man. Never give a sucker an even break, or smarten up a chump." - W.C.Fields

Page 3 of 3 FirstFirst 123

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
  •