Version 7 of RKzn

Updated 2016-09-29 23:55:57 by RKzn

Ricardo (from Portugal) also at kozmate.net (in Portuguese). Not sure I'll edit much, so no need for more presentations for now.

Conversations

Tcl and octal numbers

PYK 2016-04-03: Hi Ricardo, just wondering what your rationale was for this change . I thought the content made sense.

RKzn 2016-04-03: I also think it makes sense, it helped me recently, as I forgot about octals and got that very same "unexpected" behaviour. That is why I read the page with care, and noticed that this was duplicated with the "Misc" section a little below on that page. Curiously, it is so since you add it twice some 5 years ago .

PYK 2016-0403: Ah, I see. I've just modified the page to remove the duplicate parts under "Misc" instead.

Test

RKzn 2016-09-28: the previous proc works provided the first list does not have duplicate elements. Otherwise all elements from the first list that match at least one element from the second list will be included in the result:

tcl> lintersect {a b} {a c}
a
tcl> lintersect {a a b} {a c}
a a

By the way, lists without duplicates (or ignoring the ones that may exist) can be seen as sets. For those, there are implementations for intersection in tcllib: '::struct::set intersect' and '::struct::set intersect3'