| Various stuff: Trinary operator, clone-on-assignment functions and more. |
|
Five overloaded functions (all named IFF) that allow for simple conditional
expression evaluation but don't offer full functionality of the ?: operator.
Although IFF can be used in expressions like a := IFF(b > 0, 2*b,
b div 2), it has the deficiency of all its parameters being evaluated
every time. That makes it impossible to use IFF when one of the parameters
cannot be evaluated like in a := IFF(b <> 0, 1/b, 0) (in
that case because 1/b is evaluated even when b is zero).
Also contains four overloaded Asgn functions that clone an input parameter to output parameter and function result.
Plus more - read the source.
Released under the BSD
License.
Files
Last modifications
1.21: 2010-04-13
- Implemented overloads for Increment and Decrement in
TGp4AlignedInt and TGp8AlignedInt64.
- Implemented Add/Subtract methods in TGp4AlignedInt and
TGp8AlignedInt64.
- OpenArrayToVarArray supports vtUnicodeString variant type.
1.19: 2009-07-15
- Added EnumPairs string array enumerator.
- Added EnumList string enumerator.
- Added EnumStrings enumerator.
- InterlockedIncrement/InterlockedDecrement deal with
integers, therefore
TGp4AlignedInt.Increment/Decrement must return integers.
All other functions in TGp4AlignedInt also changed to work with
integers.
- Implemented function CAS (compare and swap) in TGp4AlignedInt and
TGp8AlignedInt64 records.
- TGp8AlignedInt renamed to TGp8AlignedInt64.
- TGp8AlignedInt.Addr must be PInt64, not PCardinal.
- Implemented IGpTraceable interface.
|