[ADMB Users] Question about vectors

dave fournier davef at otter-rsch.com
Thu Dec 11 16:02:39 PST 2014

There is one difference between () and []

[] can only take one argument while () can take any number of arguments.

So for a matrix you would have to write M[i][j] rather than M(i,j)

since it is nice to have M(i,j) one might as well have v(i) for a vector 
as well,

otherwise you would be asking why  use [] for vectors and () for matrices.

It was a conscious decision  by me to permit arbitary  offsets in 
arrays. ADMB had nothing to do with it.

You are free to use 0 offset vectors if you want.  It may uncover the 
odd bug where there is code
that relies on the offset being 1. if so report it and it will get fixed.

The stl wasn't even a bad idea yet when admb was written. All was done 
on DOS with a 32 bit DOS extender coming
along.  First compiler was Turbo C++ from Borland.  User had about 350KB 
memory to play with. Then came Zortech
with a Dos extender.  Also at some point microsoft.  They all had 
different IO and different bugs in the compiler.

More information about the Users mailing list