Hi, Lutz!
The function, you suggested eraly isn't working anymore and always returns nil.
(define (global? s)
"(global? 'sym) - return 'sym if it is global, otherwise - nil"
(let (mask (if (= (pack "d" 1) " 00 01") 0x02000000 0x00000200))
(= (& (get-int (last (dump s))) mask) mask)))
The global bit has moved, this corrected version works:
(define (global? s)
(let (mask (if (= (pack "d" 1) " 00 01")
0x00200000 0x00000020))
(= (& (get-int (last (dump s))) mask) mask)))
(global? 'x) => nil)
(global 'x)
(global? 'x) => true)
Lutz
Thanks!!!!
Maybe, we could add 'global?' to the newLISP core.
Fanda