how to test the type of a variable

For questions regarding programming in the EViews programming language.

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

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

how to test the type of a variable

Postby melamel » Tue Jun 21, 2016 5:42 am

Hello,
I want to test the type of a program argument to see if it's a date or not, just to prompt a message error if it's not a date. How can I do this please ? which function can give me the type of a variable?
Thank you in advance !

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

Re: how to test the type of a variable

Postby EViews Gareth » Tue Jun 21, 2016 6:08 am

Use @dateval and see if it returns NA

melamel
Posts: 30
Joined: Tue May 10, 2016 3:49 am

Re: how to test the type of a variable

Postby melamel » Wed Jun 22, 2016 2:41 am

Thank you !


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests