Deletions are shown with the strike-through style. Insertions are shown in boldface.
Thanks to everyone who found errors and reported them:
If you find more errors or problems with Delphi in a Nutshell, please tell me about them. (Send email to nutshell AT tempest-sw.com) Thank you.
The floating-point hardware usually uses the full precision of the Extended type for its computations, ...
Currency64Scale = 10000; // 10**DecimalCurrency64Decimals
Data[LengthHigh(Data)] := Value;
functions, so the function calls are not checked for correctness untilat runtime.
safe, if your function returns a string, interface, dynamic array, or Variant
reducing the Currency
type to 5354 or fewer bits.
you can use threadvar
variables when attackingattaching the DLL to a new
thread
[must be a Freudian slip...]
if GetModuleFileName(Instance, FileName, SizeOf(FileName)) > 0 then
TIntArray = array ofTntegerInteger;
TSingleVector = class(TVector)
FillChar(Result[1], Length,CharFill);
1. Members of records, ...
2. Local variables and subroutine parameters...
3. Members of Self...
4. Global variables in the same unit...
5. Global variables declared in other units...
{$B-} // default {$BoolEval Off} // default {$B+} {$BoolEval On}{$B+} // default {$BoolEval On} // default {$B-} {$BoolEval Off}
p. 439, Note, line 2
disabledenabled. Do not enabledisable this option unless you know
the code does
p. 439, Example, line 3
{$BoolEval On}{$BoolEval Off}
p. 440, Example 1, line 3
{$BoolEval Off}{$BoolEval On}
p. 477, paragraph 7
Default is -$B+
-$B-
-$V
, first paragraph,var
string parameters to allow short string arguments
StringReplace
returns a copy of S
, where New
OldSubStr
is replaced by Old
NewSubStr
.AnsiTrim
function, (changes are on lines 5, 6, 26, 36, below) (2000-Dec-12):
// Trim space and control characters. // Handle multi-byte strings correctly. function AnsiTrim(const S: string; TrimType: TTrimTypes): string; var Left, Right:10..MaxInt; I:10..MaxInt; begin Left := 1; Right := Length(S); if ttLeft in TrimType then begin I := 1; while I <= Length(S) do begin if S[I] in LeadBytes then Inc(I) else if Ord(S[I]) > Ord(' ') then Break; Inc(I); end; Left := I; end; if ttRight in TrimType then begin I := Length(S); while I >= Left do begin if ByteType(S, I) = mbTrailByte then Dec(I) else if Ord(S[I]) > Ord(' ') then Break; Dec(I); end; Right := I; end; Result := Copy(S, Left, Right-Left+1); end;
ValueType
(that is, ft
fvCurrency
or ft
fvExtended
).
If the ValueType
and the
be ft
fvCurrency
or ft
fvExtended
and must match the type of Value
. The
ifdwWin32MinorVersion = 0 then
p. 540, Example, line 16 (append semicolon):
Win32BuildNumber and $FFFF]);