The following PIR code produces "NCI" as the output on my system:

    $ cat lower.pir
    .sub main @MAIN
        $P0 = find_name "lower"
        $S0 = typeof $P0
        print $S0
        print "\n"
    .end

    $ parrot lower.pir
    NCI
    $

I somewhat expected find_name to return a 'not found' error, 
as it does below for "alpha":

    $ cat alpha.pir
    .sub main @MAIN
        $P0 = find_name "alpha"
        $S0 = typeof $P0
        print $S0
        print "\n"
    .end

    $ parrot alpha.pir
    Name 'alpha' not found
    current instr.: 'main' pc 0 (alpha.pir:2)
    $ 

What symbol entry am I managing to accidentally grab for "lower", 
and where is it coming from?  I've tried find_global and don't 
seem to find it:

    $ cat lower2.pir
    .sub main @MAIN
        $P0 = find_global "lower"
        $S0 = typeof $P0
        print $S0
        print "\n"
    .end

    $ parrot lower2.pir
    Global 'lower' not found
    current instr.: 'main' pc 0 (lower2.pir:2)
    $

Suggestions?

Pm

Reply via email to