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

Re: Re: Unwanted Octal to Decimal Conversion

by djantzen (Priest)
on Feb 18, 2004 at 21:44 UTC ( #330072=note: print w/replies, xml ) Need Help??


in reply to Re: Unwanted Octal to Decimal Conversion
in thread Unwanted Octal to Decimal Conversion

The reason I like this is that it makes evaluation of permissions in the code much simpler because they are already in octal form. Thus my permssions checking can do bitwise operations without having to reformat them. The code that writes to the database now uses oct so in the db the permissions are in decimal form.


"The dead do not recognize context" -- Kai, Lexx
  • Comment on Re: Re: Unwanted Octal to Decimal Conversion

Replies are listed 'Best First'.
Re: Re: Re: Unwanted Octal to Decimal Conversion
by duff (Parson) on Feb 18, 2004 at 22:29 UTC
    The reason I like this is that it makes evaluation of permissions in the code much simpler because they are already in octal form. Thus my permssions checking can do bitwise operations without having to reformat them.

    Why would you have to "reformat" them to do bitwise operations? octal 040 and decimal 32 have exactly the same bit pattern.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2020-06-07 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?



    Results (42 votes). Check out past polls.

    Notices?