http://qs321.pair.com?node_id=330072


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.