AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Übersetzung Class MagneticWindow

Ein Thema von EWeiss · begonnen am 9. Okt 2006 · letzter Beitrag vom 18. Dez 2006
Antwort Antwort
EWeiss
(Gast)

n/a Beiträge
 
#1

Re: Übersetzung Class MagneticWindow

  Alt 11. Okt 2006, 15:18
Original
Code:
        'Convert the string from hex pairs to bytes and store in the machine code buffer
        i = 1
        Do While j < CODE_LEN
            j = j + 1
            sc_aBuf(j) = CByte("&H" & Mid$(sSubCode, i, 2)) 'Convert a pair of hex characters to an eight-bit value and store in the static code buffer array
            i = i + 2
        Loop                                               'Next pair of hex characters
Übersetzt.
Delphi-Quellcode:
        //Convert the string from hex pairs to bytes and store in the machine code buffer
        i := 1;
         While j < CODE_LEN Do
            inc(j);
            sc_aBuf[j] := byte(MidStr('$' + sSubCode, i, 2)); //Convert a pair of hex characters to an
                                                              //eight-bit value and store in the static code buffer array
            i := i + 2;
Delphi-Quellcode:
function MidStr(Const Str: String; From, Size: Word): String;
begin
  MidStr := Copy(Str, From, Size)
end;
Fehler!
Zitat:
[Pascal Error] Magnetic.pas(850): E2089 Invalid typecast
Wie kann ich den String MidStr('$' + sSubCode, i, 2); nach byte convertieren ?

gruß
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:20 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz