Figuring out the log mode

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Figuring out the log mode

Postby jaylamb20 » Sat Apr 02, 2016 6:34 pm

Hello,

Is there a way to get the current logmode in a string variable? When I write helper programs to exec into larger projects, I like to write them in a way that leaves the workfile as they found it, and I also like to allow myself the option to pass in the program option "quiet" to suppress log messages. For example:

Code: Select all

'--- Environment ---' %original_sample = @pagesmpl '--- Potentially change logmode ---' if @hasoption("quiet") then logmode -logmsg endif '--- Some useful thing or set of things that the program does ---' stuff stuff stuff '--- Clean up before returning to the calling program ---' smpl {%original_sample}
I'm currently just assuming logmode was set to logmsg before the program was exec'd and just resetting to logmsg before exiting. For completeness, I'd like to be able to do something like:

Code: Select all

%logmode = @logmode ... '--- Clean up before returning to the calling program ---' logmode {%logmode}
Thoughts?

Thanks,

-James

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13603
Joined: Tue Sep 16, 2008 5:38 pm

Re: Figuring out the log mode

Postby EViews Gareth » Sat Apr 02, 2016 9:26 pm

No.

jaylamb20
Posts: 37
Joined: Mon Mar 17, 2014 10:07 am

Re: Figuring out the log mode

Postby jaylamb20 » Sun Apr 03, 2016 6:02 pm

No worries. Thanks Gareth.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest