Case-sensitive @equaloption()

For making suggestions and/or requests for new features you'd like added to EViews.

Moderators: EViews Gareth, EViews Moderator

paues
Posts: 169
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Case-sensitive @equaloption()

Postby paues » Wed May 08, 2013 6:14 am

I have noticed that @equaloption ignores the case of arguments. It would be great if the case of arguments would be respected. That is, I want these two lines to be interpreted differently:

Code: Select all

exec myfile.prg(phrase="HI!")
exec myfile.prg(phrase="hi!")

while these two should be interpreted identically:

Code: Select all

exec myfile.prg(phrase="HI!")
exec myfile.prg(PHRASE="HI!")

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

Re: Case-sensitive @equaloption()

Postby EViews Gareth » Wed May 08, 2013 8:16 am

A quick test seems to indicate that that behaviour is already seen.

I have a program called test.prg:

Code: Select all

create u 10
string p = @equaloption("foo")


If I issue this command:

Code: Select all

run test(foo="Hello")

Then p is equal to "Hello".

Code: Select all

run test(foo="hello")

results in p = "hello"


Code: Select all

run test(FOO="Hello")

p = "Hello"

Code: Select all

run test(FOO="hello")

p = "hello"
Follow us on Twitter @IHSEViews

paues
Posts: 169
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Re: Case-sensitive @equaloption()

Postby paues » Wed May 08, 2013 8:30 am

Sorry about writing an untested example. I guess I have been working with unquoted arguments. Is there any difficulty with supporting the same behavior for them?

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

Re: Case-sensitive @equaloption()

Postby EViews Gareth » Wed May 08, 2013 8:43 am

Well that's somewhat un-EViews like. All non-quoted options in EViews are non-case-sensitive.
Follow us on Twitter @IHSEViews

paues
Posts: 169
Joined: Fri Apr 15, 2011 7:16 am
Location: Stockholm, Sweden

Re: Case-sensitive @equaloption()

Postby paues » Wed May 08, 2013 9:31 am

Ah, I see. Then it would be unwise to change it. And also, thank you! This help me resolve an earlier inquiry.


Return to “Suggestions and Requests”

Who is online

Users browsing this forum: No registered users and 27 guests