🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: microsoft.public.cn.vb
Article #2

Re: 请问vb/vba中可以不用条件判断,让语句只在函数第一次被调用时执行一次吗?

#2
From: Sandro
Date: Fri, 15 Feb 2008 12:32
47 lines
3114 bytes
�Բ����ң�����û��˵������⡣
������ģ��ҵij���ܼ򵥣����Ƕ�ȡ���ڴ�������ݡ�
���Ƿdz��죬��38400bps�������£�ÿ��5���ֽڣ�ÿ�μ��ֻ�в���5���룬����� 
��̡�
Ҳ���Ǵ��?���յ���ݵ��¼���ʱ�������5�����ڣ������Խ��Խ�á�

�����ij������ÿ���¼������ʱ���ж�һ�¡�
��Ȼʵ�ʴ����������΢����һ�㣬�Ҳ�����һ������¼�����Ҫ3�������ң����Ծ� 
�뾡������һ����䡣

Private Static Sub MyComm_OnComm()
  'PerfStart
  Dim i As Long
  Dim InBuff As Variant

  If i = 1 Then
   MyComm.InBufferCount = 0
   i = 2
   Exit Sub
  End If

  If MyComm.CommEvent = comEvReceive Then
   InBuff = MyComm.Input
   TestLog.Cells(i, 1).Value = InBuff(0)
   i = i + 1
  End If
  'PerfFinish
  'TestLog.Cells(1, 1).Value = PerfElapsed
End Sub

лл��ң�

On Wed, 13 Feb 2008 17:58:48 +0100, Sandro <i@geek.9966.org> wrote:

> �Բ��𣬲�֪����������Dz��Ǹ�Ͳ����ܡ�
> ������һ���¼������У���ֻҪ�������к󣬵�һ�γ�������¼�ʱ��ִ��һ���� 
> �䣬�Ժ��ٳ�������¼��������������ˡ�
> ��ʵ������һ�����������¼�������ÿ�ζ��ж�һ����������������������ķ� 
> ̫��
> �dz����
>



-- 
i@geek.9966.org
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Technical Details
Message-ID: <op.t6kfsr2gtathli@klee.wh.uni-hannover.de>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!club-internet.fr!feedme-small.clubint.net!newsgate.cuhk.edu.hk!news.cn99.com!news.cnusenet.org!not-for-mail
References: <op.t6g2sawktathli@klee.wh.uni-hannover.de>

Show Full Headers
Complete Article Headers
X-Google-Thread: f9e6d,df15e8a1f9ce6f52
X-Google-Thread: 107a3a,df15e8a1f9ce6f52
X-Google-Thread: 109fdd,df15e8a1f9ce6f52
X-Google-Attributes: gidf9e6d,gid107a3a,gid109fdd,public,usenet
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.germany.com!club-internet.fr!feedme-small.clubint.net!newsgate.cuhk.edu.hk!news.cn99.com!news.cnusenet.org!not-for-mail
From: Sandro <i@geek.9966.org>
Newsgroups: microsoft.public.cn.vb,microsoft.public.cn.excel,cn.bbs.comp.lang.visual-basic
Subject: Re: 请问vb/vba中可以不用条件判断,让语句只在函数第一次被调用时执行一次吗?
Date: Fri, 15 Feb 2008 13:32:41 +0100
Organization: Guohai.org
Lines: 47
Message-ID: <op.t6kfsr2gtathli@klee.wh.uni-hannover.de>
References: <op.t6g2sawktathli@klee.wh.uni-hannover.de>
NNTP-Posting-Host: 123.188.5.37
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; delsp=yes; charset=gbk
Content-Transfer-Encoding: 8bit
X-Trace: news.cn99.com 1203084445 25004 123.188.5.37 (15 Feb 2008 14:07:25 GMT)
X-Complaints-To: usenet@news.cn99.com
NNTP-Posting-Date: Fri, 15 Feb 2008 14:07:25 +0000 (UTC)
User-Agent: Opera Mail/9.24 (Win32)