view test/local-functions/local_function_eval.m @ 30249:bc22395f60fa

maint: merge stable to default.
author John W. Eaton <jwe@octave.org>
date Fri, 22 Oct 2021 12:05:59 -0400
parents 1fbd8afcf625
children
line wrap: on
line source

function status = local_function_eval ()
  eval ("y = 5;");
  status = local_fcn ("y = 6;");
endfunction

function status = local_fcn (expr)
  eval (expr);
  status = exist ("y", "var");
endfunction