user3036922
user3036922

Reputation: 71

SAS: conditional statement error?

Could you please help me understand why this statement is incorrect (from a quiz). For some reason I can't see a problem.

if total = 140 then status EQ 'works';

Thanks!

Upvotes: 2

Views: 55

Answers (1)

Joe
Joe

Reputation: 63424

eq is the comparison equals operator, not the assignment equals operator. = performs both roles.

So,

if total eq 140 then status='works';

would be perfectly legal.

Upvotes: 4

Related Questions