Thread Arrays are not lists (14 answers)
Opened by KurtZ at 2008-02-23 17:30

KurtZ
 2008-02-23 19:25
#106301 #106301
User since
2007-12-13
411 Artikel
BenutzerIn
[default_avatar]
betterworld+2008-02-23 18:17:22--
Du meinst eine leere Liste. Der Trick ist, dass bei einer Listenzuweisung die Anzahl der Elemente zurueckgegeben wird.


argh ... das heißt im listenkontext kommt nix an

Code (perl): (dl )
1
2
3
4
5
print ret_array(@A);                    #: abc
print ret_list(@A);                             #: abc
print ret_slice_arr1(@A);               #: abc
print ret_slice_arr2(@A);               #: abc
print ret_slice_arr3(@A);               #: nix, nada, nothing BUMM!
TMTOWTDYOG (there's more than one way to dig your own grave)

View full thread Arrays are not lists