Hello all, I am porting a small section of code from CSharp to Delphi but am encountering some access violation at some particular lines (if (smatch.Groups['BaseHex'].Length 0) then) and (if (smatch.Groups['BaseOct'].Length 0) then).

Hello all, I am porting a small section of code from CSharp to Delphi but am encountering some access violation at some particular lines (if (smatch.Groups['BaseHex'].Length <> 0) then) and (if (smatch.Groups['BaseOct'].Length <> 0) then).

Here is my Pascal Port http://pastebin.com/KkbzADut and the original CSharp port http://pastebin.com/f2qGuPCS

Thanks
http://pastebin.com/KkbzADut

Comments

  1. @ Chris Rolliston, yes the error is index out of bound.
    but the csharp version runs without exception.

    ReplyDelete
  2. @ Chris Rolliston, I get your explaination. so the only solution is to trap the exception right?

    ReplyDelete
  3. @ all, thanks a lot for your wonderful answers.

    ReplyDelete

Post a Comment