Article View: alt.comp.borland-delphi
Article #893Conversion Delphi / VB
From: Nige
Date: Thu, 01 Dec 2005 09:26
Date: Thu, 01 Dec 2005 09:26
39 lines
2272 bytes
2272 bytes
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
Technical Details
Message-ID:
<Nkzjf.110669$Es4.109854@fe2.news.blueyonder.co.uk>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!pe1.news.blueyonder.co.uk!blueyonder!fe2.news.blueyonder.co.uk.POSTED!affe64ed!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 105ac8,a70fd8b6f50e2bdf,start X-Google-Thread: fd817,a70fd8b6f50e2bdf,start X-Google-Thread: f973d,a70fd8b6f50e2bdf,start X-Google-Thread: f894d,a70fd8b6f50e2bdf,start X-Google-Thread: 109d99,a70fd8b6f50e2bdf,start X-Google-Attributes: gid105ac8,gidfd817,gidf973d,gidf894d,gid109d99,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!pe1.news.blueyonder.co.uk!blueyonder!fe2.news.blueyonder.co.uk.POSTED!affe64ed!not-for-mail From: "Nige" <nkarnold@blueyonder.co.uk> Newsgroups: alt.comp.borland-delphi,alt.comp.lang.borland-delphi,alt.lang.delphi,borland.public.delphi,comp.lang.pascal.delphi.components.misc Subject: Conversion Delphi / VB Lines: 42 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2670 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 Message-ID: <Nkzjf.110669$Es4.109854@fe2.news.blueyonder.co.uk> Date: Thu, 01 Dec 2005 09:26:05 GMT NNTP-Posting-Host: 82.38.213.167 X-Trace: fe2.news.blueyonder.co.uk 1133429165 82.38.213.167 (Thu, 01 Dec 2005 09:26:05 GMT) NNTP-Posting-Date: Thu, 01 Dec 2005 09:26:05 GMT