Frage

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?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top