gnuplot: differences between script and interactive mode in macro processing -


iam using windows version of gnuplot

version 4.6 patchlevel 3    last modified april 2013 

i have problem running gnuplot script via "load ..."

if execute following gnuplot commandline

set macro test1 = "@test2" test2 = "sin(x)" pl @test1 

it work expected. if put code script , execute commandline

gnuplot> load 'test.gp' 

i error

gnuplot> pl @test2             ^          "test.gp", line 4: invalid character @' 

it seems macro processor work differently (macro nesting depth) between script , interactive mode. there possibility solve this?

edit:

i change script follows:

set macro test1 = "sin(x)" test2 = "@test1" test3 = "@test2" test4 = "@test3" pl @test1 pl @test2 pl @test3 pl @test4 

in interactive mode aborts @ pl @test4 too many levels of nested macros. on scriptexecution aborts on second plot command after first preprocessing step with:

gnuplot>     pl @test1                 ^          "test.gp", line 7: invalid character @ 

the issue load command bug, see #1246 load command , macro expansion, fixed in development version of 2013-06-28.

the limitation in interactive mode intended behavior, changelog says above bug fix:

  • src/misc.c (load_file): expand macros 3 levels deep when stepping through "load" operation. matches depth allowed use @ top level command line. bug #1246

Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -