From: glen herrmannsfeldt on 9 Feb 2010 19:36 I was just noticing that the bitwise logical functions IAND, IOR, and IEOR only allow for two arguments. It is not unusual to use these functions on more than one argument, such as ORing, ANDing, or ExclusiveORing more than two values. Note, for comparison, that the MIN and MAX functions do allow for more than two arguments, though one could nest the two argument versions for similar functionality. As a side note, exclusive OR is commonly abbreviated XOR, and rarely, if ever, EOR. -- glen
From: Richard Maine on 9 Feb 2010 19:41 glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote: > I was just noticing that the bitwise logical functions IAND, > IOR, and IEOR only allow for two arguments. It is not > unusual to use these functions on more than one argument, > such as ORing, ANDing, or ExclusiveORing more than two values. > > Note, for comparison, that the MIN and MAX functions do allow > for more than two arguments, though one could nest the two > argument versions for similar functionality. > > As a side note, exclusive OR is commonly abbreviated XOR, > and rarely, if ever, EOR. The bit logical functions were "imported" from the MIL STD. -- Richard Maine | Good judgment comes from experience; email: last name at domain . net | experience comes from bad judgment. domain: summertriangle | -- Mark Twain
From: glen herrmannsfeldt on 9 Feb 2010 20:05 Richard Maine <nospam(a)see.signature> wrote: > glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote: >> I was just noticing that the bitwise logical functions IAND, >> IOR, and IEOR only allow for two arguments. It is not >> unusual to use these functions on more than one argument, >> such as ORing, ANDing, or ExclusiveORing more than two values. >> Note, for comparison, that the MIN and MAX functions do allow >> for more than two arguments, though one could nest the two >> argument versions for similar functionality. >> As a side note, exclusive OR is commonly abbreviated XOR, >> and rarely, if ever, EOR. > The bit logical functions were "imported" from the MIL STD. I suppose the MIL STD version should not have variable argument functions, as that would preclude user level implementation of them. It would seem that the standard could have extended them, but I suppose I am not surprised that it didn't. Also, IXOR as an alias for IEOR would have been nice. Cryptography likes to do multiple such operations, where the 'more than two argument' functions are very useful. -- glen
From: Richard Maine on 9 Feb 2010 20:29 glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote: > IXOR as an alias for IEOR would have been nice. Note that it is easy to make your own aliases for intrinsic functions. No need for it to be in the standard. Doing it that way has the advantage that you don't have to argue with other people about what the best choices of names are. I personally think IXOR is abominable, though that's for the same reason I dislike IAND and IOR as names. If I were going to redo things instead of just importing the MIL STD as is, the first thing I'd do would be to lose the spurious "I" prefixes. XOR would be fine, but not IXOR. As long as you are doing it in user code instead of in the standard, you don't need to care about what I might think. Put an intrinsic statement in a module to make the intrinsic accessible via USE. Then use the RENAME feature of USE. If you don't wnat to have to do such a rename alll over the place, you could encapsulate it in another level of module. -- Richard Maine | Good judgment comes from experience; email: last name at domain . net | experience comes from bad judgment. domain: summertriangle | -- Mark Twain
From: Ron Shepard on 10 Feb 2010 00:52
In article <hksv2c$1tg$1(a)naig.caltech.edu>, glen herrmannsfeldt <gah(a)ugcs.caltech.edu> wrote: > As a side note, exclusive OR is commonly abbreviated XOR, > and rarely, if ever, EOR. IEOR() was part of the milstd standard in 1979, and has been included in the fortran standard since f90. With that long pedigree, I would not call the notation "rare". The odd thing is that this is the second post today where I referenced milstd 1753. $.02 -Ron Shepard |