<
Next version of Ox>
<
Previous version of Ox>
Ox 8.0: new features and fixes
New features and enhancements in version 8.0
Fixed problems in version 8.0
Fixed problems in version 8.01
Fixed problems in version 8.10
Fixed problems in version 8.20
New features and enhancements in version 8.0
- Changes to Modelbase mean that oxo files of Modelbase derived classes need to be recompiled:
- GetOx* functions have additional sClass argument; also introduced GetOxDecl,GetOxDatabase.
- Y_VAR constants have been moved into the class (derived classes should do the same with their constants).
This avoids clashes when using multiple classes in one project. So we need to write (e.g.)
model.Select(Arfima::Y_VAR, ...
instead of
model.Select(Y_VAR, ...
(Inside the class no prefix is needed.)
For convenience a mechanism has been added to use strings instead of constants:
model.Select("Y", ...
model.SetMethod("NLS");
To support this, Modelbase has two new virtual functions FindGroup,FindMethod which rely on the new virtual functions
GetGroupLabels,GetMethodLabels. The derived class should override GetGroupLabels,GetMethodLabels to return the correct
array of strings.
- Can save graphs as SVG file.
- savesheet to save two-dimensional array as Excel file (counterpart to loadsheet)
- Improved handling of array entries with no value (.Null):
- when created using new, array elements will be .Null
- can test .Null equality (only) using arr[i] == .Null
- can assign arr[i] = .Null
- but using a variable with a .Null value in an expression remains a run-time error.
- The three dots in a function header, indicating variable number of arguments, can now
be followed by a variable name. E.g:
func(...args)
{
decl a = 1;
}
is convenient shorthand for
func(...)
{
decl args = va_arglist();
decl a = 1;
}
(Unless used in main, as in main(...args), in which case arglist is called to
get the command line arguments.)
-
Three dots in a function call spreads an array, so
func1(...a) equals func1(a[0], a[1], a[2]) if a is an array with three elements.
The array cannot have more than 256 elements.
- Read Stata 13 and 14 .dta files
- Can skip items in multiple assignment, as well as use it in decl, e.g.:
decl [a, b, c] = {1, 2, 3};
[a,,c] = {1, 3};
- %#v on array of strings: omit top level {} (useful for generating code)
- fwrite/fread can have a filename as the first argument. E.g.,
fread("filename", &s, 's') reads an entire file into one string,
fwrite("filename", s) saves a string as a file.
- diagcat(a, b, ...); to concatenate more than two matrices.
- Added p-value format for printing: e.g. print("%9.3P", 1e-6)
prints "[0.000]***". The format is three stars for significance below 0.001,
two for below 0.01, one for below 0.05.
- The default line length for output is now 1024 (was 80 before). This can be changed using
the format function.
- using G,E,F format to print . for .NaN.
- Added %rs and %cs to matrix format to specify row and column separator
Fixed problems in version 8.20:
- Using "%C" print format in matrix printing and then for scalar in subsequent print
added extra spaces to the scalar print.
- replace or find on empty string leads to crash
- The following type of expression would lead to a memory leak: A[m][] += x, but only when m is a matrix.
Fixed problems in version 8.10:
- ranmc.ox: added check for argument zero in t,F,exponential distribution
- Simula class: if true parameters not specified: using .NaN instead of 0, and omitting from bias report.
- Svg graphics format also sets default font
- External declaration without any arguments followed by a proper declaration could lead to crash.
- Removed warning on extension for import. #import "abc.ox" now works as expected:
include abc.oxh, and then link abc.ox at the end.
- oxli.exe was omitted from Ox Professional on 64-bit Windows.
- The DPD package is in ox/package/DPD (not lowercase, which matters for Linux).
Fixed problems in version 8.01:
Fixed problems in version 8.0:
- confusion with norm: using 'F' on vector computes l_70 instead of l_2,
now using l_2 for 'F' (assuming l_70 is never needed).
- continue in switch can lead to stack overflow (missing a pop).
- It is safe to redeclare constants within a class (provided they don't change value), but that symbol was counted eventhough not
added, resulting in NULL symbol at the end of the list of class symbols, which crashed.
Ox version 8.00.
©
JA Doornik
This file last changed .