mixed case option values

For questions regarding programming in the EViews programming language.

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

TimGrun
Posts: 36
Joined: Wed Sep 16, 2009 8:01 am

mixed case option values

Postby TimGrun » Wed Sep 08, 2010 4:48 am

Add-ins along with the exec command, pass the values of options in upper case.
How do I pass mixed case option values without creating new variables stored in a workfile?

My add-ins sometimes pass filenames, which might be mixed case. They also pass title or footnote options which definitely will be mixed case.
Forcing users of our add-ins to create string variables stored in a workfile just to pass mixed case option values seems cumbersome.

Option values from the @uidialog are returned in mixed case. It would be nice if add-in option values retrieved with the @equaloption command did the same.

Thanks,
Tim

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

Re: mixed case option values

Postby EViews Gareth » Wed Sep 08, 2010 6:34 am

I'm not sure I follow.

In the following program, which I've given a proc name of MYTEST:

Code: Select all

create u 100 string a = @equaloption("mystr")
If I call that program with:

Code: Select all

MYTEST(mystr="Hello World")
Then the created string will contain "Hello World", i.e. case is kept.

TimGrun
Posts: 36
Joined: Wed Sep 16, 2009 8:01 am

Re: mixed case option values

Postby TimGrun » Wed Sep 08, 2010 9:40 am

Thanks Gareth for the reply.

I am guessing that you are calling your add-in, MYTEST, from the EViews command line. That also works for me.
However, calling an add-in from within another program appears to behave differently. All option values are upper cased.
I have an add-in which @uiprompt will show the values of the options after the @equaloption retrieves the values. When the add-in is called at the EViews command prompt, the values remain mixed case.
But when a program is executed at the EViews command prompt, which then calls the add-in, the option values are all upper cased.


I am using EViews version 7.1, Enterprise Edition - Jun 25 2010 build.
I will be upgraded to the August 27 2010 build this afternoon. I will let you know if the same add-in option behavior continues in the new version.

Thanks,
Tim

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

Re: mixed case option values

Postby EViews Gareth » Wed Sep 08, 2010 9:42 am

You are correct. We'll get that fixed.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests