|
From: Thomas S. <t.s...@fz...> - 2010-07-19 14:33:32
|
call 'scriptname' 0 1 2 3 m treats 'm' as variable name. either you specify 'm' as a string: call 'scriptname' 0 1 2 3 "'m'" and test for it using 'strstrt()', or you define variables: m=1; c=2; i=3 call "scriptname" 0 1 2 3 m call "scriptname" 0 1 2 3 c call "scriptname" 0 1 2 3 i babelproofreader wrote: > >>I think what I will need is some sort of block conditional: > >>if parameter 4 is m plot.............(currently one script) >>if parameter 4 is c plot.............(currently a different script) >>if parameter 4 is i plot.............(currently a third script) > > Have figured this out: this does what I want > > if ($4 == 1) plot....script_1......................; else > if ($4 == 2) plot....script_2......................; else > if ($4 == 3) plot....script_3......................; else > etc... > > However, I would like to use more meaningful letters in the conditional > statement rather than numbers, but something like if ($4 == "m") doesn't > work. Any suggestions? > -- View this message in context: http://old.nabble.com/Passing-different-%22call%22-script-parameters-tp29197500p29205357.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |