Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Components Misc > Conversion Delp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 215 of 240
Post > Topic >>

Conversion Delphi / VB

by "Nige" <nkarnold@[EMAIL PROTECTED] > Dec 1, 2005 at 09:26 AM

Hello.

Can anyone help me with the Dephi function below...

const  CC_TIME = $3f;

procedure TvStripForm.AddTime(var sum: array of Byte; b: array of Byte);
var
  i: Integer;
  max_f: Integer;
begin
  for i := Low(sum) to High(sum) do
    Inc(sum[i], (b[i] and CC_TIME));
  max_f := 25;
  if ((b[3] and (not CC_TIME_)) = 192) then
    max_f := 30;

  if (sum[3] >= max_f) then begin
    Dec(sum[3], max_f);
    Inc(sum[2]);
  end;
  if (sum[2] >= 60) then begin // seconds
    Dec(sum[2], 60);
    Inc(sum[1]);
  end;
  if (sum[1] >= 60) then begin // minutes
    Dec(sum[1], 60);
    Inc(sum[0]);
  end;
end;


I wan't to create the same function in Visual Basic, but Im struggling, as
I 
don't really know Delphi all that well.  We dont intend to leave Delphi 
behind, someone in our department wants to see if VB tackles the above 
function, as he thinks it will be a much long winded away around.. 
personally I dont think it will.

Any help appreciated




 4 Posts in Topic:
Conversion Delphi / VB
"Nige" <nkar  2005-12-01 09:26:05 
Re: Conversion Delphi / VB
"Terry Russell"  2005-12-02 07:05:48 
Re: Conversion Delphi / VB
Erik <erikpub@[EMAIL P  2005-12-02 09:49:32 
Re: Conversion Delphi / VB
Erik <erikpub@[EMAIL P  2005-12-02 09:52:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 5:49:26 CDT 2008.