Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Application just dies

by rpike (Scribe)
on Feb 27, 2009 at 18:25 UTC ( [id://746988]=note: print w/replies, xml ) Need Help??


in reply to Application just dies

I can't recall ever getting this before but the nature of the application I have the loops set up differently. If I were to have an array of 40 long (0-39) but used a loop from 0-50 what would happen normally if you try and access the 40 to 50th elements of the array? Normally I have the loop condition based on the max limit of the array. Thanks.

Replies are listed 'Best First'.
Re^2: Application just dies
by almut (Canon) on Feb 27, 2009 at 20:37 UTC
    If I were to have an array of 40 long (0-39) but used a loop from 0-50 what would happen normally if you try and access the 40 to 50th elements of the array?

    With read access, you'd get an undef value, and with write access, the element at the respective index would be set to whatever you set it to (with automatic resizing of the array, under the hood).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://746988]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-18 03:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found