Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!
From: Hanford Carr (_at_lmcinvestments.com)
Date: 09/02/04
- Next message: AlanGLLoyd: "Re: TDateTime Question"
- Previous message: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- In reply to: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- Next in thread: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- Reply: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 02 Sep 2004 18:07:36 GMT
Kris Leech wrote:
>
> Thats what i suspected.
> So what do i put instead of the string? a const?
>
> eg.
>
> const MinValue = $O5DC
Yes MinValue now is stored as a binary number and every four binary
digits can also be viewed as one hexadecimal digit.
You could just as easily use MinValue = 1500;
>
> if IntToHex(EthType,2) < MinValue then ....
>
No. IntToHex is a string and a string can not be compared to a number
this way.
EthType is already stored in binary, just compare its value.
if EthType < MinValue then ...
> Thanks for your advice, Kris.
>
> snip
Hanford
- Next message: AlanGLLoyd: "Re: TDateTime Question"
- Previous message: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- In reply to: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- Next in thread: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- Reply: Kris Leech: "Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|