Skip to content

More Coding in Delphi book update #4

@jpluimers

Description

@jpluimers

I missed this while reviewing your book (:

Page 92 on paper (103 in the PDF), current code:

procedure DoIt;
var
  A, B, C: TFraction;
begin
  A := TFraction.Create(1, 2);
  B := TFraction.Create(1, 3);
  C := A + B;
end;

Page 92 on paper (103 in the PDF), new code:

procedure DoIt;
var
  A, B, C: TFraction;
begin
  A := TFraction.CreateFrom(1, 2); // 1/2
  B := TFraction.CreateFrom(1, 3); // 1/3
  C := A + B; // 5/6
end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions