<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Am 24.09.2013 15:50, schrieb Xiangrong
      Fang:<br>
    </div>
    <blockquote
cite="mid:CAP93jB0gbGW_wCeFk4ezcNpOjjGWTbrNU5UHKsuOkxn7AyX4aw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">Hi Sven,<br>
            <br>
            2013/9/23 Xiangrong Fang <span dir="ltr"><<a
                moz-do-not-send="true" href="mailto:xrfang@gmail.com"
                target="_blank">xrfang@gmail.com</a>></span><br>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir="ltr">
                <div class="gmail_extra">
                  <div class="gmail_quote">
                    <div class="im">
                      <blockquote class="gmail_quote" style="margin:0px
                        0px 0px 0.8ex;border-left:1px solid
                        rgb(204,204,204);padding-left:1ex">
                        <p>Short answer: you can't. The same would
                          happen with normal classes.</p>
                        <p>Long answer: You could add an additional
                          method "Next" to your "TIntTree" which returns
                          a "TIntTree" and just do "Result :=
                          TIntTree(inherited Next);" there. <br>
                        </p>
                      </blockquote>
                    </div>
                  </div>
                </div>
              </div>
            </blockquote>
            <div>I still have problem with this strange issue.   See the
              demo program below:<br>
              <br>
              <span style="font-family:courier new,monospace">program
                test;<br>
                {$mode objfpc}{$H+}<br>
                uses treap;<br>
                type<br>
                  TStringMapper = class(specialize TTreap<string,
                string>)<br>
                  end;<br>
                var<br>
                  sm1, sm2: TStringMapper;<br>
                  n: TStringMapper.PNode;<br>
                begin<br>
                  sm1 := TStringMapper.Create;<br>
                  for n in sm1.Reversed do WriteLn(n^.Key);   <-- but
                NOT here<br>
                  sm2 := sm1.Reversed;                        <--
                error here<br>
                end.<br>
              </span></div>
          </div>
        </div>
      </div>
    </blockquote>
    How is PNode declared? What is the exact error?<br>
    <blockquote
cite="mid:CAP93jB0gbGW_wCeFk4ezcNpOjjGWTbrNU5UHKsuOkxn7AyX4aw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div class="gmail_extra">
          <div class="gmail_quote">
            <div><span style="font-family:courier new,monospace">Why is
                this?  Also, I found that the keyword "specialize" is
                recognized in fpc mode, but "class" is only valid in
                objfpc mode, is that correct?<br>
              </span></div>
          </div>
        </div>
      </div>
    </blockquote>
    "specialize" is used in all modes except mode Delphi for
    specializations. "class" is available in all modes except "iso",
    "tp" and "fpc", but can be enabled there using {$modeswitch class}.<br>
    <br>
    Regards,<br>
    Sven<br>
    <br>
  </body>
</html>