完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
|
“Schlieker,Reiner”写道:>我在示例中注意到To String - Case对象仍然>从数组中检索值。
我想知道如果>文本嵌入到To String中会不会更快??>> Reiner实际上会慢慢减慢它。 见下文。另外,既然你可以用公式做任何事情,我已经包括了另一种可能有用的方法。 它可以说更优雅,因为它是一个单一的对象,虽然也许更加模糊.Stan 以上来自于谷歌翻译 以下为原文 "Schlieker, Reiner" wrote: > I noticed in the example that the To String - Case object was still > retrieving values from the array. I wonder if it would be faster if the > text was imbedded in the To String...? > > Reiner Actually slows it down marginally. See below. Also, since you can do most anything with a formula, I've included another method that may be of use. It is arguably more elegant since it is a single object, though is also perhaps more obscure. Stan |
|
相关推荐
9个回答
|
|
|
当然。
只需从“If / Then / Else”开始,然后添加多个“else if”。 (右键单击对象并从菜单中选择)K2Kevin 2 Hasselquist高级RF技术员诺基亚移动电话公司12278 Scripps Summit Drive圣地亚哥,加利福尼亚州92131电话:858-831-4731传真:858-831-6507手机:619 -322-4288电子邮件:Kevin.Hasselquist@Nokia.com -----原始消息-----来自:ext HUDSON,LEE(非A-Lumileds,ex1)[mailto:lee.hudson@lumileds 发送时间:2003年5月8日11:16 AM:VEE vrfSubject:[vrf] Select Case example我想在VEE中实现以下Visual Basic代码,有没有人比使用多个“If / Then / Else”更好的方法 “对象?选择Case i Case Is = 1 strChartName =”Chart(Mg)“Case Is = 2 strChartName =”Chart(Si AR)“Case Is = 3 strChartName =”Chart(Oxygen)“Case Is = 4 strChartName =” 图表(碳)“案例是= 5 strChartName =”图表(XRD - 厚度)“案例是= 6 strChartName =”图表(XRD - %In)“案例是= 7 strChartName =”图表(XRD - ALPeriod)“案例是 = 8 strChartName =“图表(PL - 厚度)”案例= 9 strChartName =“图表(厚度R) ange)“Case Is = 10 strChartName =”Chart(PL - Peak Wavelength)“Case Is = 11 strChartName =”Chart(PL - PrepPeak Wavelength)“Case Is = 12 strChartName =”Chart(PL - PrepPeak Range)“End SelectThanks ,LeeLee Hudson,R& D ScientistLumiLeds Lighting,US,LLC370 West Trimble Road,MS 91MLSan Jose,CA 95131(408)435-5834(408)435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds。 comhttp://www.luxeon.com---您目前订阅了vrf:r***@soco.agilent.com要订阅,请发送一封空白电子邮件至“join-vrf@it.lists.it.agilent.com”。 取消订阅会发送一封空白电子邮件至“leave-vrf@it.lists.it.agilent.com”。要向此邮件列表发送邮件,请发送电子邮件至“vrf@it.lists.it.agilent.com”。 如果您需要有关邮件列表的帮助,请发送邮件至“owner-vrf@it.lists.it.agilent.com”。 以上来自于谷歌翻译 以下为原文 Sure. Just start with an "If/Then/Else" and add multiple "else if"s to it. (Right click on the object and select from the menu)K2 Kevin 2 Hasselquist Senior RF Technician Nokia Mobile Phones, Inc. 12278 Scripps Summit Drive San Diego, CA 92131 Phone: 858-831-4731 Fax: 858-831-6507 Mobile: 619-322-4288 E-mail: Kevin.Hasselquist@Nokia.com -----Original Message-----From: ext HUDSON,LEE (Non-A-Lumileds,ex1) [mailto:lee.hudson@lumileds.com]Sent: 08 May, 2003 11:16 AMTo: VEE vrfSubject: [vrf] Select Case exampleI would like to implement the following Visual Basic code in VEE, does anyone have a better way than using multiple "If/Then/Else" objects? Select Case i Case Is = 1 strChartName = "Chart(Mg)" Case Is = 2 strChartName = "Chart(Si AR)" Case Is = 3 strChartName = "Chart(Oxygen)" Case Is = 4 strChartName = "Chart(Carbon)" Case Is = 5 strChartName = "Chart(XRD - Thickness)" Case Is = 6 strChartName = "Chart(XRD - %In)" Case Is = 7 strChartName = "Chart(XRD - ALPeriod)" Case Is = 8 strChartName = "Chart(PL - Thickness)" Case Is = 9 strChartName = "Chart(Thickness Range)" Case Is = 10 strChartName = "Chart(PL - Peak Wavelength)" Case Is = 11 strChartName = "Chart(PL - PrepPeak Wavelength)" Case Is = 12 strChartName = "Chart(PL - PrepPeak Range)" End Select Thanks,LeeLee Hudson, R&D ScientistLumiLeds Lighting, U.S., LLC370 West Trimble Road, MS 91MLSan Jose, CA 95131(408) 435-5834(408) 435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com ---You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email]To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
|
我会在VEE中实现以下Visual Basic代码,是否有人比使用多个“If / Then / Else”对象更好?选择Casei Case Is = 1strChartName =“Chart(Mg)”Case Is = 2strChartName =“Chart(
Si AR)“CaseIs = 3strChartName =”Chart(Oxygen)“Case Is = 4strChartName =”Chart(Carbon)“Case Is = 5strChartName =”Chart(XRD -Thickness)“Case Is = 6strChartName =”Chart(XRD - %In) )“Case Is = 7strChartName =”Chart(XRD -ALPeriod)“Case Is = 8strChartName =”Chart(PL -Thickness)“Case Is = 9strChartName =”Chart(ThicknessRange)“Case Is = 10strChartName =”Chart(PL - PeakWavelength) )“Case Is = 11strChartName =”Chart(PL - PrepPeakWavelength)“Case Is = 12strChartName =”Chart(PL - PrepPeak Range)“EndSelectThanks,LeeLee Hudson,R& D ScientistLumiLeds Lighting,US,LLC370 West Trimble Road,MS 91MLSan Jose ,CA 95131(408)435-5834(408)435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com 以上来自于谷歌翻译 以下为原文 I would liketo implement the following Visual Basic code in VEE, does anyone have a betterway than using multiple "If/Then/Else" objects? Select Casei Case Is =1 strChartName = "Chart(Mg)" Case Is= 2 strChartName = "Chart(Si AR)" CaseIs = 3 strChartName = "Chart(Oxygen)" Case Is =4 strChartName = "Chart(Carbon)" Case Is =5 strChartName = "Chart(XRD -Thickness)" Case Is =6 strChartName = "Chart(XRD -%In)" Case Is =7 strChartName = "Chart(XRD -ALPeriod)" Case Is =8 strChartName = "Chart(PL -Thickness)" Case Is =9 strChartName = "Chart(ThicknessRange)" Case Is =10 strChartName = "Chart(PL - PeakWavelength)" Case Is =11 strChartName = "Chart(PL - PrepPeakWavelength)" Case Is =12 strChartName = "Chart(PL - PrepPeak Range)" EndSelect Thanks,LeeLee Hudson, R&D ScientistLumiLeds Lighting, U.S.,LLC370 West Trimble Road, MS 91MLSan Jose, CA 95131(408)435-5834(408) 435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com |
|
|
|
|
|
哇,谢谢你的所有想法。
我学会了一些技巧.Regards,LeeLee Hudson,R& D ScientistLumiLeds Lighting,US,LLC370 West Trimble Road,MS 91MLSan Jose,CA 95131(408)435-5834(408)435-6574 FAX lee.hudson@lumileds。 comhttp://www.lumileds.comhttp://www.luxeon.com -----原始消息-----来自:HUDSON,LEE(非A-Lumileds,ex1)[mailto:lee.hudson @ 发送时间:2003年5月8日星期四上午11:16:VEE vrfSubject:[vrf] Select Case示例我想在VEE中实现以下Visual Basic代码,有没有人比使用多个“If”更好的方法 /然后/其他“对象? 选择Case i Case Is = 1 strChartName =“Chart(Mg)”Case Is = 2 strChartName =“Chart(Si AR)”Case Is = 3 strChartName =“Chart(Oxygen)”Case Is = 4 strChartName =“Chart(Carbon) )“Case Is = 5 strChartName =”Chart(XRD - Thickness)“Case is = 6 strChartName =”Chart(XRD - %In)“Case is = 7 strChartName =”Chart(XRD - ALPeriod)“Case Is = 8 strChartName =“图表(PL - 厚度)”案例= 9 strChartName =“图表(厚度范围)”案例= 10 strChartName =“图表(PL - 峰值波长)”案例= 11 strChartName =“图表(PL - PrepPeak波长) )“Case Is = 12 strChartName =”Chart(PL - PrepPeak Range)“End Select Thanks,Lee Lee Hudson,R& D ScientistLumiLeds Lighting,US,LLC370 West Trimble Road,MS 91MLSan Jose,CA 95131(408)435-5834 (408)435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com 以上来自于谷歌翻译 以下为原文 Wow,thanks for all the ideas. I learned a few tricks heretoo.Regards,Lee Lee Hudson, R&D ScientistLumiLeds Lighting, U.S.,LLC370 West Trimble Road, MS 91MLSan Jose, CA 95131(408)435-5834(408) 435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com -----Original Message-----From: HUDSON,LEE (Non-A-Lumileds,ex1) [mailto:lee.hudson@lumileds.com]Sent: Thursday, May 08, 2003 11:16 AMTo: VEE vrfSubject: [vrf] Select Case example I would like to implement the following Visual Basic code in VEE, does anyone have a better way than using multiple "If/Then/Else" objects? Select Case i Case Is = 1 strChartName = "Chart(Mg)" Case Is = 2 strChartName = "Chart(Si AR)" Case Is = 3 strChartName = "Chart(Oxygen)" Case Is = 4 strChartName = "Chart(Carbon)" Case Is = 5 strChartName = "Chart(XRD - Thickness)" Case Is = 6 strChartName = "Chart(XRD - %In)" Case Is = 7 strChartName = "Chart(XRD - ALPeriod)" Case Is = 8 strChartName = "Chart(PL - Thickness)" Case Is = 9 strChartName = "Chart(Thickness Range)" Case Is = 10 strChartName = "Chart(PL - Peak Wavelength)" Case Is = 11 strChartName = "Chart(PL - PrepPeak Wavelength)" Case Is = 12 strChartName = "Chart(PL - PrepPeak Range)" End Select Thanks, Lee Lee Hudson, R&D ScientistLumiLeds Lighting, U.S., LLC370 West Trimble Road, MS 91MLSan Jose, CA 95131(408) 435-5834(408) 435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com |
|
|
|
|
|
Justanother替代,但你也可以使用To String对象与一个写案例事务,但多个引脚IF或字符串数组是一个bettersol'n.Reiner -----原始消息-----来自:HUDSON,LEE
(非A-Lumileds,ex1)[mailto:lee.hudson@lumileds.com]发送时间:2003年5月8日星期四下午2:16致:VEE vrfSubject:[vrf] Select Case示例我想实现以下Visual VEE中的基本代码,有没有人比使用多个“If / Then / Else”对象更好的方法? 选择Case i Case Is = 1 strChartName =“Chart(Mg)”Case Is = 2 strChartName =“Chart(Si AR)”Case Is = 3 strChartName =“Chart(Oxygen)”Case Is = 4 strChartName =“Chart(Carbon) )“Case Is = 5 strChartName =”Chart(XRD - Thickness)“Case is = 6 strChartName =”Chart(XRD - %In)“Case is = 7 strChartName =”Chart(XRD - ALPeriod)“Case Is = 8 strChartName =“图表(PL - 厚度)”案例= 9 strChartName =“图表(厚度范围)”案例= 10 strChartName =“图表(PL - 峰值波长)”案例= 11 strChartName =“图表(PL - PrepPeak波长) )“Case Is = 12 strChartName =”Chart(PL - PrepPeak Range)“End Select Thanks,Lee Lee Hudson,R& D ScientistLumiLeds Lighting,US,LLC370 West Trimble Road,MS 91MLSan Jose,CA 95131(408)435-5834 (408)435-6574传真lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com ---您目前订阅了vrf:r***@soco.agilent.com订阅发送 发送电子邮件至“join-vrf@it.lists.it.agilent.com”。要取消订阅,请发送空白 发送电子邮件至“leave-vrf@it.lists.it.agilent.com”。要发送邮件到此邮件列表,请发送电子邮件至“vrf@it.lists.it.agilent.com”。 如果您需要有关邮件列表的帮助,请发送邮件至“owner-vrf@it.lists.it.agilent.com”。 以上来自于谷歌翻译 以下为原文 Justanother alternative, but you could also use the To String object with a Write Case transaction, but the multiple pin IF or the string array is a bettersol'n. Reiner -----Original Message-----From: HUDSON,LEE (Non-A-Lumileds,ex1) [mailto:lee.hudson@lumileds.com]Sent: Thursday, May 08, 2003 2:16 PMTo: VEE vrfSubject: [vrf] Select Case example I would like to implement the following Visual Basic code in VEE, does anyone have a better way than using multiple "If/Then/Else" objects? Select Case i Case Is = 1 strChartName = "Chart(Mg)" Case Is = 2 strChartName = "Chart(Si AR)" Case Is = 3 strChartName = "Chart(Oxygen)" Case Is = 4 strChartName = "Chart(Carbon)" Case Is = 5 strChartName = "Chart(XRD - Thickness)" Case Is = 6 strChartName = "Chart(XRD - %In)" Case Is = 7 strChartName = "Chart(XRD - ALPeriod)" Case Is = 8 strChartName = "Chart(PL - Thickness)" Case Is = 9 strChartName = "Chart(Thickness Range)" Case Is = 10 strChartName = "Chart(PL - Peak Wavelength)" Case Is = 11 strChartName = "Chart(PL - PrepPeak Wavelength)" Case Is = 12 strChartName = "Chart(PL - PrepPeak Range)" End Select Thanks, Lee Lee Hudson, R&D ScientistLumiLeds Lighting, U.S., LLC370 West Trimble Road, MS 91MLSan Jose, CA 95131(408) 435-5834(408) 435-6574 FAX lee.hudson@lumileds.comhttp://www.lumileds.comhttp://www.luxeon.com ---You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email]To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
|
完善!
正是我在寻找的东西。 谢谢Michael .-----原帖-----来自:Brown,Michael L CAR [mailto:Michael.L.Brown@carrier.utc.com]发送时间:2003年5月8日16:04到:VEE vrfCc:泡菜 ,WarrenSubject:RE:[vrf]将Excel范围读入VEEWarren,替换sheet.UsedRange.Value;使用sheet.UsedRange.Formula;然后得到一个二维文本数组。 (见附件。)问候,迈克尔·布朗-----原始信息-----来自:Pickles,Warren [mailto:Warren.Pickles@tycoelectronics.com]发送时间:2003年5月8日星期四4:15 AMTo: VEE vrfSubject:[vrf]将Excel范围读入VEEHello,我附上了一个小的VEE程序,改编自其中一个示例,以说明令我头疼的事情。我想将Excel工作表的内容读入VEE, 作为2D数组。我设置了一个名为“sheet”的变量,它是工作表类的对象变量。 然后我在公式框中使用sheet.Usedrange.Value。有时这会输出一个2D数组,有时是一个记录。 输出的数据类型似乎取决于单元格中的数据。 如果数据都是相同类型,则输出2D阵列。 如果数据是混合类型,即一些是实数,一些是文本,则输出记录。 如果你进入excel并将所有单元格格式化为文本,则无关紧要; 如果它们中的任何一个可以作为数字读取你仍然得到一个记录。我找不到一种简单的方法将记录转换成2D数组。问题的方法是遍历每个单元格,获取其值,并收集 成阵列。 但是这有一个时间的惩罚,我将使用大张。任何想法?谢谢,沃伦泡菜> ---您目前订阅vrf为:r***@soco.agilent.com要订阅发送空白电子邮件到“ join-vrf@it.lists.it.agilent.com“。要取消订阅,请发送一封空白电子邮件至”leave-vrf@it.lists.it.agilent.com“。要发送邮件到此邮件列表,请发送电子邮件至”vrf @“ it.lists.it.agilent.com”。 如果您需要有关邮件列表的帮助,请发送邮件至“owner-vrf@it.lists.it.agilent.com”。 以上来自于谷歌翻译 以下为原文 Perfect! Just what I was looking for. Thanks Michael. -----Original Message----- From: Brown, Michael L CAR [mailto:Michael.L.Brown@carrier.utc.com] Sent: 08 May 2003 16:04 To: VEE vrf Cc: Pickles, Warren Subject: RE: [vrf] Reading Excel range into VEE Warren, Replace sheet.UsedRange.Value; with sheet.UsedRange.Formula; Then you get a 2-D text array. (See attached.) Regards, Michael Brown -----Original Message----- From: Pickles, Warren [mailto:Warren.Pickles@tycoelectronics.com] Sent: Thursday, May 08, 2003 4:15 AM To: VEE vrf Subject: [vrf] Reading Excel range into VEE Hello, I have attached a small VEE program, adapted from one of the examples, to illustrate something which has been giving me a headache. I want to read the contents of an Excel worksheet into VEE, as a 2D array. I set up a variable called "sheet", which is an object variable of the worksheet class. Then I use sheet.Usedrange.Value in a formula box. Sometimes this outputs a 2D array, sometimes a record. The data type of the output seems to depend on the data in the cells. If the data are all of the same type, a 2D array is outputted. If the data are of mixed types, ie some are real numbers, some are text, a record gets outputted. It doesn't matter if you go into excel and format all the cells as text; if any of them can be read as numbers you still get a record. I can't find an easy way to convert the record into a 2D array. The way around the problem is to loop through the each cell, get its value, and collect into an array. But there is a time penalty for this, and I will be working with large sheets. Any thoughts? Thanks, Warren Pickles > --- You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email] To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
|
哎呀!
你是对的。 文本数组方法比写入案例快4倍。 顺便说一下,我得到的时间与你的时间差不多。我的机器也在400 MHz左右。迈克尔-----原始信息-----来自:Stan Bischof [mailto:r***@soco.agilent.com]发送: 2003年5月8日星期四下午3:51致:VEE vrfCc:vrf@it.lists.it.agilent.com; lee.hudson@lumileds.comSubject:[vrf] RE:选择案例示例文本数组方法和写案例方法都运行良好,尽管这个方法的速度大约是前者的四倍。 (见附件)真诚地,迈克尔布朗有趣。 当我在旧的慢速机器(P3 / 400左右)上运行代码时,“文本数组”的持续时间约为2.2毫秒,写入时则为9毫秒。或许你想说'fromer的速度是快速的4倍 thelatter“?斯坦---------------------------------------------- ---------------------------- Stan Bischof安捷伦科技公司707-577-3994 stan_bischof@agilent.com-------- -------------------------------------------------- -------------------您目前订阅了vrf:Michael.L.Brown@carrier.utc.com订阅时发送一封空白电子邮件至“join-vrf @ it .lists.it.agilent.com“。要取消订阅,请发送一封空白电子邮件至”leave-vrf@it.lists.it.agilent.com“。要发送邮件到此邮件列表,请发送电子邮件至”vrf@it.lists.it .agilent.com“。如果您需要帮助邮件列表,请发送邮件至”owner-vrf@it.lists.it.agilent.com“.---您目前订阅了vrf:r***@soco.agilent .com订阅时发送一封空白电子邮件至“join-vrf@it.lists.it.agilent.com”。要取消订阅,请发送空白电子邮件至“leave-vrf @” it.lists.it.agilent.com“。要发送邮件到这个邮件列表,请发送电子邮件至”vrf@it.lists.it.agilent.com“。 如果您需要有关邮件列表的帮助,请发送邮件至“owner-vrf@it.lists.it.agilent.com”。 以上来自于谷歌翻译 以下为原文 Ooops! You're right. The text array method is 4 times faster than Write Case. Incidentally, I get about the same timings as you do. My machine is also around 400 MHz. Michael -----Original Message----- From: Stan Bischof [mailto:r***@soco.agilent.com] Sent: Thursday, May 08, 2003 3:51 PM To: VEE vrf Cc: vrf@it.lists.it.agilent.com; lee.hudson@lumileds.com Subject: [vrf] RE: Select Case example The text array method and Write Case method both work well, although the latter is about four times as fast as the former. (See attached.) Sincerely, Michael Brown interesting. When I run your code on my old slow machine (P3/400 or so) I consistently get about 2.2ms for the "text array" and 9ms for the write case. perhaps you meant to say the 'fromer is about 4 times as fast as the latter"? Stan -------------------------------------------------------------------------- Stan Bischof Agilent Technologies 707-577-3994 stan_bischof@agilent.com -------------------------------------------------------------------------- --- You are currently subscribed to vrf as: Michael.L.Brown@carrier.utc.com To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". --- You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email] To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
|
我想在VEE中实现以下Visual Basic代码,有没有比使用多个“If / Then / Else”对象更好的方法?选择Case i Case Is = 1 strChartName =“Chart(Mg)”Case Is = 2 strChartName
=“图表(Si AR)”案例= 3 strChartName =“图表(氧气)”案例= 4 strChartName =“图表(碳)”案例= 5 strChartName =“图表(XRD - 厚度)”案例= 6 strChartName =“Chart(XRD - %In)”Case Is = 7 strChartName =“Chart(XRD - ALPeriod)”Case Is = 8 strChartName =“Chart(PL - Thickness)”Case Is = 9 strChartName =“Chart(厚度范围) )“Case Is = 10 strChartName =”Chart(PL - Peak Wavelength)“Case Is = 11 strChartName =”Chart(PL - PrepPeak Wavelength)“Case Is = 12 strChartName =”Chart(PL - PrepPeak Range)“End SelectThanks, Lee *************************嗯 - 您需要的是一个具有多个输出的If / Then?else对象,但是根据您的代码,只需创建 一个包含variousstrings的文本数组,然后case语句就变成了一个公式strChart Name = nameList(Is)其中nameList当然包含stringsTo最小化nameList中的数据你可能只想列出参数strChartName =“Chart(”+ argList(Is)+“)Stan ::---- -------------------------------------------------- ---------------- Stan Bischof安捷伦科技公司707-577-3994 stan_bischof@agilent.com-------------------- -------------------------------------------------- -------您目前订阅vrf为:r***@soco.agilent.com要订阅,请发送空白电子邮件至“join-vrf@it.lists.it.agilent.com”。要取消订阅,请发送空白电子邮件 请发送电子邮件至“vrf@it.lists.it.agilent.com”。 如果您需要有关邮件列表的帮助,请发送邮件至“owner-vrf@it.lists.it.agilent.com”。 以上来自于谷歌翻译 以下为原文 I would like to implement the following Visual Basic code in VEE, does anyone have a better way than using multiple "If/Then/Else" objects? Select Case i Case Is = 1 strChartName = "Chart(Mg)" Case Is = 2 strChartName = "Chart(Si AR)" Case Is = 3 strChartName = "Chart(Oxygen)" Case Is = 4 strChartName = "Chart(Carbon)" Case Is = 5 strChartName = "Chart(XRD - Thickness)" Case Is = 6 strChartName = "Chart(XRD - %In)" Case Is = 7 strChartName = "Chart(XRD - ALPeriod)" Case Is = 8 strChartName = "Chart(PL - Thickness)" Case Is = 9 strChartName = "Chart(Thickness Range)" Case Is = 10 strChartName = "Chart(PL - Peak Wavelength)" Case Is = 11 strChartName = "Chart(PL - PrepPeak Wavelength)" Case Is = 12 strChartName = "Chart(PL - PrepPeak Range)" End Select Thanks, Lee ************************* Well- all you need is one If/Then?else object with multiple outputs, but given your code, simply create a text array with the various strings in it , and then the case statement just becomes a formula strChartName=nameList(Is) where nameList of course contains the strings To minimize the data in nameList you might want to just list the arguments strChartName="Chart("+argList(Is)+")" Stan -------------------------------------------------------------------------- Stan Bischof Agilent Technologies 707-577-3994 stan_bischof@agilent.com -------------------------------------------------------------------------- --- You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email] To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
|
文本数组方法和Write Case方法都运行良好,尽管这个方法的速度是前者的四倍。
(见附件)真诚地,迈克尔布朗有趣。 当我在旧的慢速机器上运行你的代码(P3 / 400左右)时,对于“文本数组”,我一直得到大约2.2ms,对于写入情况,我一直得到9ms。也许你想说'fromer的速度大约是4倍 作为后者“?Stan -------------------------------------------- ------------------------------ Stan Bischof安捷伦科技公司707-577-3994 stan_bischof@agilent.com------ -------------------------------------------------- ---------------------您目前订阅了vrf:r***@soco.agilent.com要订阅,请发送空白电子邮件至“join-vrf@it.lists .it.agilent.com“。要取消订阅,请发送空白电子邮件至”leave-vrf@it.lists.it.agilent.com“。要发送邮件到此邮件列表,请发送电子邮件至”vrf@it.lists.it.agilent .com“。如果您需要有关邮件列表的帮助,请发送邮件至”owner-vrf@it.lists.it.agilent.com“。 以上来自于谷歌翻译 以下为原文 The text array method and Write Case method both work well, although the latter is about four times as fast as the former. (See attached.) Sincerely, Michael Brown interesting. When I run your code on my old slow machine (P3/400 or so) I consistently get about 2.2ms for the "text array" and 9ms for the write case. perhaps you meant to say the 'fromer is about 4 times as fast as the latter"? Stan -------------------------------------------------------------------------- Stan Bischof Agilent Technologies 707-577-3994 stan_bischof@agilent.com -------------------------------------------------------------------------- --- You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email] To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
|
我在示例中注意到To String - Case对象仍在从数组中获取值。
我想知道如果将文字嵌入To String中会更快吗??Reiner -----原帖-----来自:Brown,Michael L CAR [mailto:Michael.L.Brown@carrier。 发送时间:2003年5月8日星期四下午5:17致:VEE vrfCc:lee.hudson@lumileds.com; 'Stan Bischof'主题:[vrf] RE:选择Case exampleOoops! 你是对的。 文本数组方法比写入案例快4倍。 顺便说一下,我得到的时间与你的时间差不多。我的机器也在400 MHz左右。迈克尔-----原始信息-----来自:Stan Bischof [mailto:r***@soco.agilent.com]发送: 2003年5月8日星期四下午3:51致:VEE vrfCc:vrf@it.lists.it.agilent.com; lee.hudson@lumileds.comSubject:[vrf] RE:选择案例示例文本数组方法和写案例方法都运行良好,尽管这个方法的速度大约是前者的四倍。 (见附件)真诚地,迈克尔布朗有趣。 当我在旧的慢速机器(P3 / 400左右)上运行代码时,“文本数组”的持续时间约为2.2毫秒,写入时则为9毫秒。或许你想说'fromer的速度是快速的4倍 thelatter“?斯坦---------------------------------------------- ---------------------------- Stan Bischof安捷伦科技公司707-577-3994 stan_bischof@agilent.com-------- -------------------------------------------------- -------------------您目前订阅了vrf:Michael.L.Brown@carrier.utc.com订阅时发送一封空白电子邮件至“join-vrf @ it .lists.it.agilent.com“。要取消订阅,请发送一封空白电子邮件至”leave-vrf@it.lists.it.agilent.com“。要发送邮件到此邮件列表,请发送电子邮件至”vrf@it.lists.it .agilent.com“。如果您需要帮助邮件列表,请发送邮件至”owner-vrf@it.lists.it.agilent.com“.---您目前订阅了vrf:reiner.schlieker@siemens .com要订阅,请发送一封空白电子邮件至“join-vrf@it.lists.it.agilent.com”。要取消订阅,请发送空白电子邮件至“le ave-vrf@it.lists.it.agilent.com“。要发送邮件到这个邮件列表,请发送电子邮件至”vrf@it.lists.it.agilent.com“。如果您需要有关邮件列表的帮助,请发送邮件至 “owner-vrf@it.lists.it.agilent.com”.---您目前订阅了vrf:r***@soco.agilent.com要订阅,请发送空白电子邮件至“join-vrf@it.lists.it .agon.com“。要取消订阅,请发送一封空白电子邮件至”leave-vrf@it.lists.it.agilent.com“。要发送邮件到此邮件列表,请发送电子邮件至”vrf@it.lists.it.agilent.com ”。 如果您需要有关邮件列表的帮助,请发送邮件至“owner-vrf@it.lists.it.agilent.com”。 以上来自于谷歌翻译 以下为原文 I noticed in the example that the To String - Case object was still retrieving values from the array. I wonder if it would be faster if the text was imbedded in the To String...? Reiner -----Original Message----- From: Brown, Michael L CAR [mailto:Michael.L.Brown@carrier.utc.com] Sent: Thursday, May 08, 2003 5:17 PM To: VEE vrf Cc: lee.hudson@lumileds.com; 'Stan Bischof' Subject: [vrf] RE: Select Case example Ooops! You're right. The text array method is 4 times faster than Write Case. Incidentally, I get about the same timings as you do. My machine is also around 400 MHz. Michael -----Original Message----- From: Stan Bischof [mailto:r***@soco.agilent.com] Sent: Thursday, May 08, 2003 3:51 PM To: VEE vrf Cc: vrf@it.lists.it.agilent.com; lee.hudson@lumileds.com Subject: [vrf] RE: Select Case example The text array method and Write Case method both work well, although the latter is about four times as fast as the former. (See attached.) Sincerely, Michael Brown interesting. When I run your code on my old slow machine (P3/400 or so) I consistently get about 2.2ms for the "text array" and 9ms for the write case. perhaps you meant to say the 'fromer is about 4 times as fast as the latter"? Stan -------------------------------------------------------------------------- Stan Bischof Agilent Technologies 707-577-3994 stan_bischof@agilent.com -------------------------------------------------------------------------- --- You are currently subscribed to vrf as: Michael.L.Brown@carrier.utc.com To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". --- You are currently subscribed to vrf as: reiner.schlieker@siemens.com To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". --- You are currently subscribed to vrf as: [email=r***@soco.agilent.com]r***@soco.agilent.com[/email] To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com". To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@it.lists.it.agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". |
|
|
|
|
只有小组成员才能发言,加入小组>>
273 浏览 0 评论
1868 浏览 0 评论
2755 浏览 1 评论
2657 浏览 1 评论
2477 浏览 5 评论
1870浏览 0评论
434浏览 0评论
274浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-13 16:17 , Processed in 2.219056 second(s), Total 91, Slave 73 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
1490