Mercurial > octave
view test/fcn-handle/shared_ctx.m @ 31200:075443476dfb stable
nextpow2.m: Add bug number tag to regression BIST tests (bug #62947)
* nextpow2.m: Add '<*62947>' to BIST tests for bug #62947.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 24 Aug 2022 08:55:14 -0700 |
parents | 8dd50efa3c47 |
children |
line wrap: on
line source
function [add, sub, mul, div] = shared_ctx (val) add = @add_fun; sub = @sub_fun; mul = @mul_fun; div = @div_fun; function r = add_fun (x) val += x; r = val; endfunction function r = sub_fun (x) val -= x; r = val; endfunction function r = mul_fun (x) val *= x; r = val; endfunction function r = div_fun (x) val /= x; r = val; endfunction endfunction