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

Fetching uninitialzed values from arrays

8 views
Skip to first unread message

Simon Glover

unread,
Jan 2, 2005, 12:44:04 PM1/2/05
to perl6-i...@perl.org

Does Parrot make any guarantee about the value of an uninitialzed array
element, or should I expect the value returned by:

new P0, .FixedBooleanArray
set P0, 1
set I0, P0[0]

to be garbage? (Just to be clear - I think it's fine if it is garbage,
but I couldn't find an explicit statement of policy in the docs).

Simon

Matt Fowles

unread,
Jan 2, 2005, 6:55:52 PM1/2/05
to Simon Glover, perl6-i...@perl.org
Simon~

When I wrote the Fixed*Arrays, I left garbage values for all of the
value type arrays and put in NULLs for String arrays and PMCNULLs for
PMC arrays. The idea was to make them as simple as possible.

Matt
--
"Computer Science is merely the post-Turing Decline of Formal Systems Theory."
-???

0 new messages