Thorsten Jolitz
writes:
> so somehow my understanding of read macros is false here:
>
> (class ~(any (pack '+ ClsNm)))
Grrr ... of course when reading (de foo (ClsNm) ...) ClsNm is still NIL,
so the outcome of the above is (class +) which can't work. Sorry for the
noise.
--
Hi Thorsen, what about using (class) and (dm) instead?
joebo@joebo:~/dev/picoLisp$ pil +
: (class +Test)
-> +Test
: (dm T (Hi) (=: hi Hi))
-> T
: (dm hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,"))
-> hi>
: (setq Foo (new '(+Test) "Hi @1"))
-> $177463554467256
: (hi> Foo "Alex")
-> "Hi Alex"
Thorsten Jolitz
writes:
> Alexander Burger writes:
Ok, this works ;-)
: (de foo2 (ClsNm MethNm) (class +Bar) (dm plus> (X) (+ 1 X)))
-> foo2
: (foo2)
-> plus>
: (setq B (new '(+Bar)))
-> $177641167640474
: (plus> B 3)
-> 4
'))
so somehow my
Alexander Burger writes:
Hi Alex,
>> : (de +Test
>>(T (Hi) (=: hi Hi))
>>(hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) )
>> -> +Test
>
> .. while this is half of the lunch ...
>
>> : (hi> Foo "Alex")
>> !? (hi> Foo "Alex")
>> hi> -- Undefined # => WHY?
>
Joe Bogner writes:
HiJoe,
> Hi Thorsen, what about using (class) and (dm) instead?
>
> joebo@joebo:~/dev/picoLisp$ pil +
> : (class +Test)
> -> +Test
> : (dm T (Hi) (=: hi Hi))
> -> T
> : (dm hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,"))
> -> hi>
> : (setq Foo
Hi List,
playing around a bit wih Pil classes/object, here is something I don't
understand:
#+BEGIN_SRC picolisp
: (de +Test
(T (Hi) (=: hi Hi))
(hi> (Nm) (or (text (: hi) Nm) "Dear Sir or Madam,")) )
-> +Test
: (setq Foo (new '(+Test) "Hi @1"))
-> $176777024346263
: (hi> Foo