Design Scripting Documentation
     
 
     
  Arrays Joining  
     
     
  Inputs:  
     
two arrays
     
  Outputs:  
     
a joint array
     
  Implementation
01  function array_join( aa, ab )
02    if( ( not isarray( aa ) ) or ( not isarray( ab ) ) ) then
03      array_join = vbnull
04      exit function
05    end if
06  
07    dim result: result = array_allocate( _
08      array_length( aa ) +       _
09      array_length( ab )         _
10    )
11  
12    dim index_out
13    index_out = lbound( result )
14  
15    dim index_in
16    for index_in = lbound( aa ) to ubound( aa )
17      result( index_out ) = aa( index_in )
18      index_out = index_out + 1
19    next
20  
21    for index_in = lbound( ab ) to ubound( ab )
22      result( index_out ) = ab( index_in )
23      index_out = index_out + 1
24    next
25  
26    array_join = result
27  end function
 
     

Creative Commons License
The Design Scripting Library, including its sources, online documentation and graphics, are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License.

Online Documentation generated by { vbdoclib } version 1.0
Color-Coding generated by { vbcc } version 2.0
Page timestamp: { Feb. 2, 2006 }





 
     
     
 
Documentation
Cover Page
Expand
Collapse
 
Array
 
Bitmap File
 
Bounding Box
 
Color
 
Container
 
Doclet
 
Ellipse
 
Intersection
 
Language
 
Map
 
Matrix
 
Number
 
Nurbs
 
Range
 
STL File
 
Streams
 
String
 
Surface
 
Text File
 
Triangle
 
Vector
 
Vertex
 
Wave File