Page 1 of 1

Pass string with filename to gsave

Posted: Fri Oct 25, 2019 10:29 am
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

Re: Pass string with filename to gsave

Posted: Tue Oct 29, 2019 5:13 pm
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