Re: if EthType < StrToInt('$05DC') then EthType := 0; // does'ntwork!!

From: Hanford Carr (_at_lmcinvestments.com)
Date: 09/02/04


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



Relevant Pages

  • Re: Dynamicly Added Range Validator Acting Goofy
    ... noticed that the range validator doesn't fail in all cases when it should. ... ColName As String, ByVal pl_hold As PlaceHolder, Optional ByVal minvalue As ... ElseIf maxvalue = -1 Then ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: 32-bit programs on Windows x64
    ... tiny individual sequences. ... to compare its input string against every possible ... compare one string against one string, ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... THE AMOUNT OF RAM ON THE MACHINE IS COMPLETELY, ... nothing in that article that implies any concurrency. ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... THE AMOUNT OF RAM ON THE MACHINE IS COMPLETELY, ... nothing in that article that implies any concurrency. ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)
  • Re: 32-bit programs on Windows x64
    ... machine has "parallelism" ... to compare its input string against every possible valid ...
    (microsoft.public.vc.mfc)