[vienna.pm] scalar(Hash)
Toni Andjelkovic
toni at soth.at
Thu Oct 18 12:47:37 CDT 2001
* * * vienna-pm-list * * *
Peter J . Holzer wrote on Thu, Oct 18 2001 (19:23:43 +0200):
> print scalar(%x), "\n";
> für diverse Werte von $ARGV[0] aus, und warum?
pp.c:166
else if (gimme == G_SCALAR) {
SV* sv = sv_newmortal();
if (HvFILL((HV*)TARG))
Perl_sv_setpvf(aTHX_ sv, "%ld/%ld",
(long)HvFILL((HV*)TARG), (long)HvMAX((HV*)TARG) + 1);
else
sv_setiv(sv, 0);
SETs(sv);
dann perldoc perlapi: /HvFILL
"number of hash buckets that happen to be in use" vs.
"total number of hash buckets".
warum sie es so machen weiss ich nicht, es soll sich
aber ändern: http://dev.perl.org/rfc/196.html
cu,
--
Toni Andjelkovic
<toni at soth.at>
###
You are subscribed to vienna-pm-list as Toni Andjelkovic <toni at soth.at>
http://www.fff.at/fff/vienna.pm/
More information about the Vienna-pm
mailing list