IF function syntax error

For questions regarding programming in the EViews programming language.

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

peli
Posts: 1
Joined: Thu Oct 23, 2014 7:25 am

IF function syntax error

Postby peli » Thu Oct 23, 2014 7:30 am

Hi all,

Im trying to set up an IF-function but get the following message:

"Syntax error in control statment in IF"

And thisis my code:

if
2 < gap < 10 then
CCB = 0,3125*(kreditgap - 2)
else
if
gap <= 2 then
CCyB = 0
else
kreditgap >= 10 then
CCyB = 2,5
endif
endif

Any advise would be great!

Best,

Petra

startz
Non-normality and collinearity are NOT problems!
Posts: 3798
Joined: Wed Sep 17, 2008 2:25 pm

Re: IF function syntax error

Postby startz » Thu Oct 23, 2014 7:52 am

try putting the logical condition on the same line as the if


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests