Pass string with filename to gsave

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
Calle
Posts: 3
Joined: Tue Oct 08, 2019 6:01 am

Pass string with filename to gsave

Unread post by Calle »

Hi,

How can I pass a string containing the name of the file to environment?

com the_file = "C:\folder\myfile.eps"
environment gsave=the_file

Thanks,
Carl
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Pass string with filename to gsave

Unread post by TomDoan »

ENVIRONMENT doesn't allow that as it's designed to mimick a command line (which wouldn't have access to variables within the program). Newer versions of RATS have the GSAVE instruction which allows use of indirect strings, as in

com the_file = "C:\folder\myfile.eps"
gsave(format=portrait) &the_file
Post Reply