Mercurial > octave
view NEWS @ 29572:aef11bb4e6d1
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
Files affected: make_int.cc, file-editor-tab.cc, octave-qscintilla.cc,
Cell.cc, Cell.h, call-stack.cc, call-stack.h, cellfun.cc, data.cc,
debug.cc, dlmread.cc, error.cc, event-queue.h, fcn-info.cc,
fcn-info.h, file-io.cc, ft-text-renderer.cc, gl2ps-print.cc,
graphics.cc, graphics.in.h, help.cc, hex2num.cc, input.cc,
latex-text-renderer.cc, load-path.cc, load-save.cc, load-save.h,
ls-hdf5.cc, ls-mat-ascii.cc, ls-mat5.cc, ls-oct-text.cc, mex.cc,
mexproto.h, mxarray.h, oct-map.cc, oct-stream.cc, oct-stream.h,
pager.cc, pager.h, pr-output.cc, regexp.cc, settings.h,
stack-frame.cc, stack-frame.h, strfns.cc, syminfo.cc, symrec.h,
symscope.cc, symscope.h, symtab.cc, sysdep.cc, toplev.cc, utils.cc,
utils.h, variables.cc, __fltk_uigetfile__.cc, __init_fltk__.cc,
audioread.cc, gzip.cc, cdef-class.cc, cdef-manager.cc, cdef-method.cc,
cdef-object.cc, cdef-object.h, ov-base-diag.cc, ov-base-diag.h,
ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc, ov-base-scalar.h,
ov-base-sparse.h, ov-base.cc, ov-base.h, ov-cell.cc, ov-cell.h,
ov-ch-mat.cc, ov-class.cc, ov-class.h, ov-classdef.cc,
ov-fcn-handle.cc, ov-java.cc, ov-lazy-idx.h, ov-perm.cc, ov-perm.h,
ov-range.h, ov-str-mat.cc, ov-struct.cc, ov-struct.h, ov-usr-fcn.cc,
ov-usr-fcn.h, ov.cc, ov.h, ovl.cc, octave.cc, bp-table.cc, jit-ir.cc,
jit-ir.h, jit-typeinfo.cc, jit-typeinfo.h, jit-util.h, lex.h, lex.ll,
oct-lvalue.cc, oct-parse.yy, parse.h, profiler.h, pt-eval.cc,
pt-eval.h, pt-jit.cc, pt-jit.h, pt-pr-code.cc, pt-tm-const.cc,
pt-tm-const.h, Array.h, CMatrix.cc, DiagArray2.h, PermMatrix.h,
Sparse.h, dMatrix.cc, fCMatrix.cc, fMatrix.cc, bsxfun-defs.cc,
oct-fftw.cc, oct-fftw.h, randpoisson.cc, sparse-chol.cc,
mx-inlines.cc, file-ops.cc, lo-sysdep.cc, oct-env.cc, oct-time.cc,
action-container.cc, action-container.h, base-list.h, caseless-str.h,
cmd-edit.cc, cmd-hist.cc, data-conv.cc, data-conv.h, f77-fcn.h,
file-info.cc, file-info.h, kpse.cc, kpse.h, lo-cutils.h, lo-hash.h,
lo-regexp.cc, oct-base64.cc, oct-base64.h, oct-binmap.h, oct-glob.cc,
oct-shlib.cc, oct-shlib.h, oct-sort.cc, oct-sparse.h, oct-string.cc,
quit.cc, unwind-prot.h, url-transfer.cc, main.in.cc, mkoctfile.in.cc,
and shared-fcns.h.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 28 Apr 2021 22:57:42 -0400 |
parents | 2ae4764180c6 |
children | 1564f617da7e |
line wrap: on
line source
Summary of important user-visible changes for version 7 (yyyy-mm-dd): ---------------------------------------------------------------------- ### General improvements - Many functions in Octave can be called in a command form---no parentheses for invocation and no return argument assignment---or in a functional form---parentheses and '=' for assignment of return values. **Command Form Example** `mkdir new_directory` **Function Form Example** `status = mkdir ("new_directory")` Octave now handles errors that occur in a consistent manner. If called in command form and there is a failure, an error is thrown and a message printed. If called in functional form, no error or message is printed and the failure is communicated to the programmer via the output status variable. The following list of functions have been modified. * `copyfile` * `fcntl` * `fileattrib` * `kill` * `link` * `mkfifo` * `movefile` * `rename` * `rmdir` * `symlink` * `unlink` - Calling a user-defined function with too many inputs or outputs is now an error. The interpreter makes this check automatically. If a function uses varargin then the check is skipped for function inputs, and if a function uses varargout then the check is skipped for function outputs. Input validation for functions typically begins with checking that the number of inputs and outputs match expectations. Existing code can be simplified by removing these checks which are now done by the interpreter. Typically, code blocks like the following can simply be deleted. ## Checking number of inputs if (nargin > 2) print_usage (); endif ## Checking number of outputs if (nargout > 1) print_usage (); endif - Binary and hexadecimal constants like `0b101` and `0xDEADBEEF` now create integers (unsigned by default) with sizes determined from the number of digits present. For example, `0xff` creates a `uint8` value and `0xDEADBEEF` creates a `uint64` value. You may also use a suffix of the form `u8`, `u16`, `u32`, `u64`, `s8`, `s16`, `s32`, or `s64` to explicitly specify the data type to use (`u` or `s` to indicate unsigned or signed and the number to indicate the integer size). Binary constants are limited to 64 binary digits and hexadecimal constants are limited to 16 hexadecimal digits with no automatic rounding or conversion to floating point values. Note that this may cause problems in existing code. For example, an expression like `[0x1; 0x100; 0x10000]` will be uint8 (because of the rules of concatenating integers of different sizes) with the larger values truncated (because of the saturation semantics of integer values). To avoid these kinds of problems either: 1) declare the first integer to be of the desired size such as `[0x1u32; 0x100; 0x10000]`, or 2) pad constants in array expressions with leading zeros so that they use the same number of digits for each value such as `[0x00_00_01; 0x00_01_00; 0x01_00_00]`. - For Octave on Windows OS, the minimum required version of the Windows API is now 6.1 (Windows 7 or newer). - As part of GSoC 2020, Abdallah K. Elshamy implemented the `jsondecode` and `jsonencode` functions to read and write JSON data. - By default, the history file is now located at $DATA/octave/history, where $DATA is a platform dependent location for (roaming) user data files (e.g., ${XDG_DATA_HOME} or, if that is not set, ~/.local/share on Unix-like operating systems or %APPDATA% on Windows). ### Graphical User Interface - Turkish translation added. - In debug mode, symbol values are now shown in tooltips when hovering variables in the editor panel. ### Graphics backend - Support for Qt4 for both graphics and the GUI has been removed. - If a working LaTeX tool chain is found on the path, including `latex`, `dvipng`, and `dvisvgm` binaries, then text strings can now be rendered properly when using the `"latex"` value for the text objects' `"interpreter"` property and axes objects' `"ticklabelinterpreter"`. Type `doc "latex interpreter"` for further info. - The additional property `"contextmenu"` has been added to all graphics objects. It is equivalent to the previously used `"uicontextmenu"` property which is hidden now. - Additional properties have been added to the `axes` graphics object: * `"alphamap"` (not yet implemented) * `"alphascale"` (not yet implemented) * `"colorscale"` (not yet implemented) * `"fontsizemode"` (not yet implemented) * `"innerposition"` (equivalent to `"position"`) * `"interactions"` (not yet implemented) * `"layout"` (not yet implemented) * `"legend"` (not yet implemented) * `"nextseriesindex"` (read-only, used by `scatter` graphics objects) * `"positionconstraint"` (replacement for `"activepositionproperty"` which is now a hidden property. No plans for removal.) * `"toolbar"` (not yet implemented) * `"xaxis"` (not yet implemented) * `"yaxis"` (not yet implemented) * `"zaxis"` (not yet implemented) ### Matlab compatibility - The function `griddata` now implements the `"v4"` Biharmonic Spline Interpolation method. In adddition, the function now accepts 3-D inputs by passing the data to `griddata3`. - Coordinate transformation functions `cart2sph`, `sph2cart`, `cart2pol`, and `pol2cart` now accept either row or column vectors for coordinate inputs. A single coordinate matrix with one variable per column can still be used as function input, but a single output variable will now contain just the first output coordinate, and will no longer return the full output coordinate matrix. Output size matches the size of input vectors, or in the case of an input matrix will be column vectors with rows corresponding to the input coordinate matrix. - The function `dec2bin` and `dec2hex` now support negative numbers. - The functions `quantile` and `prctile` now permit operating on dimensions greater than `ndims (x)`. - The function `importdata` now produces more compatible results when the file contains a 2-D text matrix. - The `FMT` format argument for plot commands now accepts long forms for color names which may be more understandable than the existing one-letter codes. For example, the RGB value `[0 0 0]` can now be specified by `"black"` in addition to `"k"`. - The color graphics properties, for example `"EdgeColor"` or `"FaceColor"`, now accept HTML specifications. An HTML specification is a string that begins with the character '#' and is followed by either 3 or 6 hexadecimal digits. For example, magenta which is 100% red and blue values can specified by `"#FF00FF"` or `"#F0F"`. - `uicontrol` objects now fully implement the `"Off"` and `"Inactive"` values of the `"Enable"` property. When the value is `"Off"`, no interaction with the object occurs and the `uicontrol` changes color (typically to gray) to indicate it is disabled. When the value is `"Inactive"`, the object appears normally (no change in color), but it is not possible to change the value of the object (such as modifying text in an `Edit` box or clicking on a `RadioButton`). - The functions `scatter` and `scatter3` now return a handle to a scatter graphics object. For compatibility, they return an `hggroup` of patch graphics objects when the `"gnuplot"` graphics toolkit is used. In previous versions of Octave, these functions returned an `hggroup` of patch graphics objects for all graphics toolkits. - The functions `bar` and `barh` now handle stacked negative bar values in a Matlab-compatible manner. Negative values now stack below the zero axis independently of a positive value bars in the same stack. Previously the negative bars could overlap positive bars depending on drawing order. - The functions `bar` and `barh` now use colors from the `"ColorOrder"` axes property rather than the `"Colormap"` figure property unless one of the histogram options (@qcode{"hist"}, @qcode{"histc"} was specified. - The function `saveas` now defaults to saving in Octave figure format (.ofig) rather than PDF (.pdf). - A new warning ID (`"Octave:unimplemented-matlab-functionality"`) has been added which prints a warning when Octave's parser recognizes valid Matlab code, but for which Octave does not yet implement the functionality. By default, this warning is enabled. ### Alphabetical list of new functions added in Octave 7 * `cospi` * `getpixelposition` * `endsWith` * `fill3` * `jsondecode` * `jsonencode` * `listfonts` * `matlab.net.base64decode` * `matlab.net.base64encode` * `memory` * `ordqz` * `rng` * `sinpi` * `startsWith` * `streamribbon` * `turbo` * `uniquetol` * `xtickangle` * `ytickangle` * `ztickangle` ### Deprecated functions and properties The following functions and properties have been deprecated in Octave 7 and will be removed from Octave 9 (or whatever version is the second major release after 7): - Functions Function | Replacement -----------------------|------------------ | - Properties Object | Property | Value -----------------|---------------|------------ | | - Interpreter * The use of `'...'` for line continuations *inside* double-quoted strings has been deprecated. Use `'\'` for line continuations inside strings instead. * The use of `'\'` as a line continuation *outside* of double-quoted strings has been deprecated. Use `'...'` for line continuations instead. * Any trailing whitespace after a `'\'` line continuation has been deprecated. Delete unnecessary trailing whitespace. ### Removed functions and properties The following functions and properties were deprecated in Octave 5 and have been removed from Octave 7. - Functions Function | Replacement -------------------------|------------------ `output_max_field_width` | `output_precision` `is_keyword` | `iskeyword` - Properties Object | Property | Value -----------------|---------------|------------ `text` | `fontangle` | `"oblique"` `uibuttongroup` | `fontangle` | `"oblique"` `uicontrol` | `fontangle` | `"oblique"` `uipanel` | `fontangle` | `"oblique"` `uitable` | `fontangle` | `"oblique"` ### Old release news - [Octave 6.x](etc/NEWS.6) - [Octave 5.x](etc/NEWS.5) - [Octave 4.x](etc/NEWS.4) - [Octave 3.x](etc/NEWS.3) - [Octave 2.x](etc/NEWS.2) - [Octave 1.x](etc/NEWS.1)