> > Um, gack. You could do it with replication instead of shifts with >> something like: >> >> rights = ((old_mode & 0777 & who_masks[what_letter]) * 0111111) >> 9 >> value = rights & 0777 & who_masks[who_letter] >> >> > (oops, hit send by mistake) Gack! That seems overly clever. Maybe something like: rights = (old_mode & 0777) / digits[what_letter] value = rights * digits[who_letter] (where digits maps [ugo] to 0100, 010, 01) ?
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to puppet-...@googlegroups.com. To unsubscribe from this group, send email to puppet-dev+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.