Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re (tilly) 1: What Happened...(perils of porting from c)

by Madams (Monk)
on Jan 05, 2001 at 19:10 UTC ( #50070=note: print w/ replies, xml ) Need Help??


in reply to Re (tilly) 1: What Happened...(perils of porting from c)
in thread What Happened...(perils of porting from c)

Hey thanx for the critique ...

Added "use strict" , switched to a perl aware editor (boy that caught alot just switching editors)(changed @curlevel to $curlevel..the GOOD editor caught that)

split up the stmt that had the "||" in it (that somehow fixed that), fixed the munged comments, and that oneline for loop. Now no syntax errors (yeah!)

Mostly i am looking for someone to tell me if i got the pointer arithmetic related crap ported right .. when i use the module i'm getting some nonsense output (examples are uploaded to here).

One thing why get rid of the "return 1;" at the end? every example of writing a module says it should return "1" to signal proper loading.


Comment on Re: Re (tilly) 1: What Happened...(perils of porting from c)
Re (tilly) 3: What Happened...(perils of porting from c)
by tilly (Archbishop) on Jan 05, 2001 at 22:35 UTC
    The reason for removing the return statement is that you are not supposed to use that outside of functions (eval, do).

    Just end with:

    1;
    and it will work.

    As for the pointer logic, sorry. No energy to go through it. It looked like a mess FWIW. I would just use recursion for this problem. (OK, so you take a performance hit.)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-09-30 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (372 votes), past polls