Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data list list/dog cat mouse frog bird (5f1).
- begin data
- 1 0 0 1 0
- 0 1 0 1 0
- 0 0 0 1 1
- 0 1 0 0 0
- 1 1 1 1 1
- 1 0 1 0 1
- 0 0 0 0 0
- end data.
- compute mult_categoryN = 10000*dog + 1000* cat +100*mouse +10* frog + bird.
- string mult_categoryT (a50).
- compute #=0.
- do repeat vr=dog cat mouse frog bird/ct="dog" "cat" "mouse" "frog" "bird".
- do if vr=1.
- if #=0 mult_categoryT=ct.
- if #>0 mult_categoryT=concat(rtrim(mult_categoryT), " and ", ct).
- compute #=#+1.
- end if.
- end repeat.
- exe.
Add Comment
Please, Sign In to add comment