AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Suchfunktion Ergebnis der Suchanfrage

Ergebnis der Suchanfrage


Datum des Suchindex: Heute, 23:32

Parameter dieser Suchanfrage:

Suche in Thema: C++ pointer to byte array --> Delphi
Suche alle Beiträge, die von "Namenloser" geschrieben wurden
• Suchmethode: "Suche nach allen Begriffen"
• Nach Datum (firstpost) sortiert
• Zeige Treffer als Beiträge
Zeige 3 von insges. 3 Treffern
Suche benötigte 0.002s

Es liegen Ergebnisse in folgenden Bereichen vor:

  • Forum: Object-Pascal / Delphi-Language

    AW: C++ pointer to byte array --> Delphi

      Delphi
      by Namenloser, 2. Dez 2013
    I think in Delphi the upcast is done automatically by the compiler when the result is stored in a variable that is bigger than the operands.


    var
    b: Byte;
    i: integer;
    begin
    b := 255;
    i := b shl 2;
    // i should now hold the value 510
  • Forum: Object-Pascal / Delphi-Language

    AW: Re: C++ pointer to byte array --> Delphi

      Delphi
      by Namenloser, 2. Dez 2013
    I am not sure what you mean by that sentence, "whare" was not a word last time I checked ;).

    I assume you wanted to say that the typecasts are unnecessary, which may be true. I didn't examine the code that closely, I was just saying that you should pay attention to that.
  • Forum: Object-Pascal / Delphi-Language

    AW: C++ pointer to byte array --> Delphi

      Delphi
      by Namenloser, 2. Dez 2013
    Looks mostly good to me, but I would pay some extra attention to the type casts. I am not sure if ord() always gives the correct result here. In some places the type cast might be done to truncate a value. For example, (ushort)foo gives us the lowest 16 bits of foo.

    And in the top code, I think you can get rid of ord() entirely, if you've correctly translated char as byte.


URL zu dieser Suchanfrage:

https://www.delphipraxis.net/dp_search.php?do=usersearch&search_username=Namenloser&search_exact_username=1&search_sortby=dateline&search_resulttype=post&search_matchmode=0&searchthreadid=177855
Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:46 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz