Harry Jackson <[EMAIL PROTECTED]> wrote:

> Can someone tell me if there is an error in the code below.

The code is fine.

> it repeatedly from the command line it sometimes freezes ie it prints
> the contents of the array and then just stops and I need to do a CTRL-C
> to get back to the command line.

Your are sure that there is no hardware problem? Run memcheck for a
couple of hours for example.

> ...I have noticed that

> set a[0], "one"

> or

> a[0] = "one"

> appear to do the same thing. I cannot confirm that they do due to the
> bug above.

They are the same. The first one is PASM syntax, the second is PIR
syntax.

E.g. running your "imc trouble" code
$ parrot -o- hj.imc
_MAIN:
        new P16, 31      # .PerlArray
        new P17, 36      # .PerlString
        set P16, 10
        set P16[0], "Zero"
        ...

yields the generated PASM code (with variables names allocated to Parrot
registers).

> Harry

leo

Reply via email to