I32
Perl_looks_like_number(pTHX_ SV *sv)
{
register char *sbegin;
STRLEN len;
if (SvPOK(sv)) {
sbegin = SvPVX(sv);
len = SvCUR(sv);
}
else if (SvPOKp(sv))
sbegin = SvPV(sv, len);
else
return 1;/* Historic. Wrong? */
return grok_number(sbegin, len, NULL);
}
Mmmm, funky backwards indenting and amusing comment with two returns in a row...
Blocks in C (Score:3, Informative)
Reply to This
Re:Blocks in C (Score:1)
The great thing about multitasking is that several things can go wrong at once.
Re:Blocks in C (Score:4, Informative)
For example, if SvPOK returns true, then sbegin and len are set and the program execution moves to the first statement _after_ the if/else block, i.e. the "return grok_number".
It's been a loong time since I wrote C, and my memory could be fading, but I'm pretty sure I'm right here.
Reply to This
Parent
Re:Blocks in C (Score:1)
The great thing about multitasking is that several things can go wrong at once.
tabstops (Score:3, Informative)
It looks to me like the source uses tab characters to indent code, and your editor shows it as 3 spaces instead of the traditional 8.
Reply to This
Tabs must die. (Score:3, Funny)