newLISP Fan Club

Forum => newLISP in the real world => Topic started by: newdep on March 10, 2006, 04:04:41 AM

Title: more contexts
Post by: newdep on March 10, 2006, 04:04:41 AM
Probably a real easy one, but i cant find it ;(



How can I see how many and what contexts are currently active?



Norman.
Title:
Post by: pjot on March 21, 2006, 09:26:37 AM
Maybe like this (run from MAIN context):




(dotimes (x (length (symbols))) (if (context? (eval (nth x (symbols)))) (println (nth x (symbols)))))



Or is this not what you are looking for?



Peter
Title:
Post by: pjot on March 21, 2006, 09:50:32 AM
Even faster:




(dotree (s MAIN)(if (context? (eval s)) (println s)))





Peter