<Next version of Ox> <Previous version of Ox>

# Ox 2.10: new features and fixes

## New features and enhancements

- Created `iseq()`. Now can use `isfeq()` for case-insensitive string comparison. Also created `strifind()` as case-insensitive version of `strfind()`.
- `"aa"+"bb"` is now the same as `"aa"~"bb"`
- Allowing k `x` T input for: `DrawCorrelogram()`, `DrawBoxPlot()`, `DrawSpectrum()`, `DrawQQ()`, `DrawDensity()` Also created 2 argument `Draw()` function.
- created:
  `Database::Load`,
  `Sample::GetFrequency`, and
  `Database::RemoveObsIf`,
- Modelbase class
- Read Stata 4-6 .dta files (`loadmat`, `Database::LoadDta`)
- The comma in a matrix constant to seperate elements within a row was made optional in Ox 2.00. However, this could lead to to errors which are difficult to find, and has been made compulsary again.
- Other new and enhanced functions:
  - `cerf()` (Complex error function)
  - `erf()` (Error function)
  - `randirichlet()`,
  - `ranwishart()`
  - `today()` to get current time/date as double (no of secs since 1970).
    `timing``(mtimes,1)` to go from doubles to year,month,...
  - `NumJacobian()`: Now using vec in the returned function value, so can be used for matrix-valued functions.
- assignment of array to part of array (i.e. using selection on right-hand side) now uses array contents of rhs. Previously, when both as1 and as 2 are arrays (of strings e.g.)

          as1[0:1] = as2

  was executed as

          as1[0] = as2, as1[1] = as2;

  thus going up one array level in as1[0] and as1[1]. Now it is executed as:

          as1[0] = as2[0], as1[1] = as2[1];

  thus preserving the array level in as1.

## Known problems in version 2.00a which are fixed in version 2.10:

- assignment using one index on the left-hand side doesn't works as expected when the lhs is indexed as row (or column) and the right-hand side is a column (or row). For example:

          decl vp = <1;2;3;4>;
          vp[0:1] = <-1,-2>;	// WRONG!
          vp[0:1] = <-1;-2>;	// OK

  The first should set vp to -1;-2;3;4, but only did -1;2;3;4.
- OxRun: GiveWin keeps grabbing focus when a new window is specified. Now this is only happening the first time; the window is brought to the foreground within GiveWin after SetTextWindow/SetDrawWindow, but GiveWin grabs focus only first time.
- `<0.1;0.7;>` would lead to an infite loop of error messages. Now the trailing semicolon or colon is allowed.
- Error in PcFimlDgp.ox prevented use of more than one lag.
- Small improvement to XLS reading. Also fixed problem with large negative numbers (which were mapped to an integer by Excel).
- In rare occasions concatenation with a NULL string would lead to a crash.
- `Database::Remove()` did not remove the variable name.
- `invertgen(x, 0)` is wrong if x is not square.
- Bug in `NumJacobian()`: dimensions of returned matrix are wrong.
- Problem with scanning from a string: `sscan(&s, ...)` doesn't advance string correctly, resulting in a crash. `sscan(s, ...)` only works for first scanned element (again, the string location is not moved forward before reading the second element). As a consequence, the example on page 187 will not work.
- `sortbyc()` when sorting by multiple columns is likely to go wrong. The only version which works is when the sort column indices are of the form: 0,1,2,... (i.e. starting at 0, and consecutive range).

## Known problems in version 2.00 which were fixed in version 2.00a:

- There is a problem with using [] directly on the return value of a function when the function returns an array. Also when a function returns part of an array which resides in a local variable. For example:

          func1()
          {   return {"a", "b"};
          }
          print(func1()[1]);
          func2()
          {   decl x = {"a", "b"};
              return x[0:1];
          }
          print(func2());

  In the first case `x=func1()` is fine. In the second case, assigning `x[0:1]` to a local variable which is then returned works without problems.
- Saving as in7: base name with more than 12 chars causes problems (when trying to derive default project name) and could result in a crash. Can be avoided by using a base name (ie. file name without path and extension) with fewer than 13 characters.
- `a[0][x] * b[x][1]` crashes, but only when the first dimension of `a` is 0 and the second dimension of `b` is 1.
- Problem with reassigning different zero sized matrix. For example:

          decl x = zeros(0,5);
          println(rows(x), " x ", columns(x));
          x = zeros(0,6);
          println(rows(x), " x ", columns(x));

  prints:

          0 x 5
          0 x 5

  but should be

          0 x 5
          0 x 6

Ox version 2.10. This file last changed 26-Feb-1999. © JA Doornik
<Doornik home>