DATA Step, Macro, Functions and more

if ^( (code='4')...... what does the ^ do?

Reply
Contributor
Posts: 55

if ^( (code='4')...... what does the ^ do?

while reading somebody else's code I see if ^( (format_code='4'). I'm not familiar with the ^ before the (.

Does anybody know of a purpose for the ^?
Trusted Advisor
Posts: 2,116

Re: if ^( (code='4')...... what does the ^ do?

"^" is the "NOT" infix operator.

^(code='4') is the same as NOT (code='4').

See the description of logical operators in the base SAS documentation.

Doc Muhlbaier
Duke
Ask a Question
Discussion stats
  • 1 reply
  • 98 views
  • 0 likes
  • 2 in conversation