Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: cvs commit: parrot/languages/tcl/lib/macros boolean.imc

0 views
Skip to first unread message

Leopold Toetsch

unread,
Oct 15, 2004, 3:34:34 AM10/15/04
to Will Coleda, perl6-i...@perl.org
Will Coleda <co...@cvs.perl.org> wrote:
>
> Given a pmc, set a register to indicate whether
> it is true or false from Tcl's POV.

inline op istrue(out INT, in PMC) {

with an approprate get_bool() vtable slot.

leo

William Coleda

unread,
Oct 15, 2004, 8:05:28 AM10/15/04
to l...@toetsch.at, perl6-i...@perl.org
Danke. Making this a macro was, at least, a step up from the function call I had.

I haven't done anything real with the PMCs yet (just cargo-culted them mostly from their Perl* counterparts)

Though I have to wonder how this will work with inter-language-operability.

Thanks, Leo.

Leopold Toetsch

unread,
Oct 15, 2004, 2:52:09 PM10/15/04
to William Coleda, perl6-i...@perl.org
William Coleda <wi...@coleda.com> wrote:

> Though I have to wonder how this will work with inter-language-operability.

bool = istrue(some_pmc)

is exactly that. Your PMC can answer 1 if it's "true" or such. A
lispish PMC might evaluate "t" and "nil"...

> Thanks, Leo.

Welcome,
leo

0 new messages