문제

Imagine you have a list of variable names A,B,C,D,E saved in a local macro:

loc l1 "A B C D E"

You also have a different list of variable names A,C saved in a different macro:

loc l2 "A C"

How would you get the (set) difference of those, namely, a list of variable names B,D,E?

도움이 되었습니까?

해결책

local l1  "A B C D E"
local l2 "A C"
local l3 : list l1 - l2
di "`l3'"

for more see: help extended fcn, and especially help macrolists.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top