Re: subroutine

"Patrick Dupre" <[email protected]>
Newsgroups gmane.comp.graphics.gnuplot.user
Message-ID <trinity-e2dc07aa-a5e4-4738-ac44-095b310afe83-1564591245275@3c-app-mailcom-bs14>
Hello Dan,

Thank for the response.
Can I also pass parameter to a subroutine?
Like a in in your example.

Thanks.

===========================================================================
 Patrick DUPRÉ                                 | | email: [email protected]
 Laboratoire interdisciplinaire Carnot de Bourgogne
 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE
 Tel: +33 (0)380395988
===========================================================================


> Sent: Wednesday, July 31, 2019 at 6:16 PM
> From: "Dan" <[email protected]>
> To: "Patrick Dupre" <[email protected]>
> Cc: gnuplot <[email protected]>
> Subject: Re: [Gnuplot-info] subroutine
>
> On Thu, 27 Jun 2019, Patrick Dupre wrote:
> 
> > Can I make a subroutine like
> > sub F () {
> > list of gnuplot calls ;
> > }
> 
> Yes.  In Gnuplot 5.0, you can define such a subroutine by, for example
> 
> mysub = "set terminal x11 1; plot x**a; set terminal x11 2; plot x**b"
> 
> then call that subroutine by
> 
> a = 2.0
> b = 3.0
> @mysub
> 
> -- 
> 
> Kind regards,
> 
> Dan
>


_______________________________________________
gnuplot-info mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.