Hi,
I don't understand why the answer to this is a and not b?
WORD is set when AMOUNT=7.
It is not reset when AMOUNT changes.
Hi @pri26
If you execute the code step by step:
NB: it would have been better to have a LENGTH statement to define the word variable. As it is missing here, the length is set by default to 3, as it is the length of the first value proposed for this variable in the IF condition ('CAT'). It doesn't matter here as 'DOG' has the same number of letters than 'CAT'. But you can test to set amount to 3 for example, you will see that the 'ELSE' statement is true and that is displays 'NoN' and not 'NoNE !!!'
Best,
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.