是德科技
直播中

李秀云

7年用户 815经验值
私信 关注
[问答]

vrf十进制舍入

I agree. Text boxes for numeric input are a LOT better than REAL boxes.
I wrote a little function a while back that you (and others) might be
interested in. It converts REALs back into a NICE readable format. I've
attached a demo of the function comparing it to VEE's ToString. I think
you will be able to see the difference and why I like my way better.

Mike Groves
Cree Microwave

-----Original Message-----
From: Opti [mailto:phr@optonline.net]
Sent: Tuesday, July 09, 2002 11:51 AM
To: Gregg C Levine; Vrf
Subject: RE: vrf Decimal Rounding


In order to remove the rounding error, the as text object must be used.

Paul H. Rubin
Formerly with Ericsson Amplifier Technologies Inc.

-----Original Message-----
From:     owner-vrf@lvld.agilent.com [mailto:owner-vrf@lvld.agilent.com] On
Behalf Of Gregg C Levine
Sent:     Tuesday, July 09, 2002 1:37 PM
To:     Vrf
Subject:     RE: vrf Decimal Rounding

Hello from Gregg C Levine actually with Jedi Knight Computers
Look at it this way. That's the line running into, or out of the object.
It's the actual number as rendered by VEE. The object itself contains
the number that you want, as it follows the decimal rounding. Also for
some objects, display ones for example, the rounding of decimals can be
set.
-------------------
Gregg C Levine hansolofalcon@worldnet.att.net
------------------------------------------------------------
"The Force will be with you...Always." Obi-Wan Kenobi
"Use the Force, Luke."  Obi-Wan Kenobi
(This company dedicates this E-Mail to General Obi-Wan Kenobi )
(This company dedicates this E-Mail to Master Yoda )



> -----Original Message-----
> From: owner-vrf@lvld.agilent.com [mailto:owner-vrf@lvld.agilent.com]
On Behalf
> Of matt.mcnally@us.thalesatm.com
> Sent: Tuesday, July 09, 2002 1:26 PM
> To: ayoung09@harris.com; bill_ossmann@hsgmed.com; vrf@lvld.agilent.com
> Subject: RE: vrf Decimal Rounding
>
> Yes, It works but why is it when I move my mouse over the line it
still
> gives me this big long number?
>
>
>
> Matt McNally
> Thales ATM INC.
> Shawnee, KS
> 913-422-2600 X5180
>
>      -----Original Message-----
>      From:     Young, Andrew [SMTP:ayoung09@harris.com]
>      Sent:     Tuesday, July 09, 2002 12:20 PM
>      To:     'OSSMANN,BILL (A-hsgAndover,ex1)'; vrf@lvld.agilent.com
>      Subject:     RE: vrf Decimal Rounding
>
>      It seems that you need to use 10.0^(-n) or you'll always get a
> response of zero.
>      No automatic type conversion here...
>
>                -----Original Message-----
>                From:     OSSMANN,BILL (A-hsgAndover,ex1)
>      [mailto:bill_ossmann@hsgmed.com]
>                Sent:     Tuesday, July 09, 2002 1:05 PM
>                To:     vrf@lvld.agilent.com
>                Subject:     RE: vrf Decimal Rounding
>
>                Matt:
>
>                Use the round() function
>
>                round(z*10^n)*10^(-n)
>
>                Bill Ossmann
>                --
>                bill_ossmann@hsgmed.com
>                Philips Ultrasound
>
>                >-----Original Message-----
>                >From: matt.mcnally@us.thalesatm.com
>                >[mailto:matt.mcnally@us.thalesatm.com]
>                >Sent: Tuesday, July 09, 2002 12:27 PM
>                >To: vrf@lvld.agilent.com
>                >Subject: vrf Decimal Rounding
>                >
>                >
>                >Does any one know how to round to the nearest
> decimal x? Thanks
>      Matt
>                >
>                >
>                >
>                >Matt McNally
>                >Thales ATM INC.
>                >Shawnee, KS
>                >913-422-2600 X5180
>
>
> >---------------------------------------------------------------------
>                >This is the "vrf" maillist, managed by
Majordomo.
> To send
>      messages to
>                >this maillist, just email to
> "vrf@lvld.agilent.com".
>      Subscriptions and
>                >unsubscriptions are done through the address
>                >"vrf-request@lvld.agilent.com".
>                >If you need details, just send a message
containing
> the text
>      "help"
>                >to "vrf-request@lvld.agilent.com".
>
>
> >---------------------------------------------------------------------
>                >
>
>
> ---------------------------------------------------------------------
>                This is the "vrf" maillist, managed by
Majordomo.
> To send
>      messages to
>                this maillist, just email to
"vrf@lvld.agilent.com".
>      Subscriptions and
>                unsubscriptions are done through the address
>      "vrf-request@lvld.agilent.com".
>                If you need details, just send a message
containing
> the text
>      "help"
>                to "vrf-request@lvld.agilent.com".
>
>
> ---------------------------------------------------------------------
>
> ---------------------------------------------------------------------
>      This is the "vrf" maillist, managed by Majordomo.  To send
messages
> to
>      this maillist, just email to "vrf@lvld.agilent.com".
Subscriptions
> and
>      unsubscriptions are done through the address
> "vrf-request@lvld.agilent.com".
>      If you need details, just send a message containing the text
"help"
>      to "vrf-request@lvld.agilent.com".
>
> ---------------------------------------------------------------------
> ---------------------------------------------------------------------
> This is the "vrf" maillist, managed by Majordomo.  To send messages to
> this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions
and
> unsubscriptions are done through the address
"vrf-request@lvld.agilent.com".
> If you need details, just send a message containing the text "help"
> to "vrf-request@lvld.agilent.com".
> ---------------------------------------------------------------------

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

回帖(3)

李秀云

2018-9-5 10:04:58
Matt:使用round()函数(z * 10 ^ n)* 10 ^( - n)Bill Ossmann--bill_ossmann@hsgmed.comPhilips Ultrasound> -----原始消息----->来自:matt。
mcnally@us.thalesatm.com> [mailto:matt.mcnally@us.thalesatm.com]>发送时间:2002年7月9日星期二下午12:27>收件人:vrf@lvld.agilent.com>主题:vrf十进制舍入
>>>有没有人知道如何舍入到最接近的十进制x?
谢谢Matt >>>> Matt McNally> Thales ATM INC。> Shawnee,KS> 913-422-2600 X5180> -------------------------
-------------------------------------------->这是“vrf
“maillist,由Majordomo管理。
要向> maillist发送消息,只需发送电子邮件至“vrf@lvld.agilent.com”。
订阅和>取消订阅通过地址>“vrf-request@lvld.agilent.com”完成。>如果您需要详细信息,只需将包含文本“help”>的消息发送到“vrf-request@lvld.agilent.com”
”> -----------------------------------------------
----------------------> ---------------------------
------------------------------------------这是“vrf”maillist,
由Majordomo管理。
要向该maillist发送消息,只需发送电子邮件至“vrf@lvld.agilent.com”。
订阅和取消订阅是通过地址“vrf-request@lvld.agilent.com”完成的。如果您需要详细信息,只需将包含“help”文本的消息发送到“vrf-request@lvld.agilent.com”.---
--------------------------------------------------
----------------

以上来自于谷歌翻译


     以下为原文

  Matt:

Use the round() function

round(z*10^n)*10^(-n)

Bill Ossmann
--
bill_ossmann@hsgmed.com
Philips Ultrasound

>-----Original Message-----
>From: matt.mcnally@us.thalesatm.com
>[mailto:matt.mcnally@us.thalesatm.com]
>Sent: Tuesday, July 09, 2002 12:27 PM
>To: vrf@lvld.agilent.com
>Subject: vrf Decimal Rounding
>
>
>Does any one know how to round to the nearest decimal x? Thanks Matt
>
>
>
>Matt McNally     
>Thales ATM INC.
>Shawnee, KS
>913-422-2600 X5180
>---------------------------------------------------------------------
>This is the "vrf" maillist, managed by Majordomo.  To send messages to
>this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
>unsubscriptions are done through the address
>"vrf-request@lvld.agilent.com".
>If you need details, just send a message containing the text "help"
>to "vrf-request@lvld.agilent.com".
>---------------------------------------------------------------------
>
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------
举报

李秀云

2018-9-5 10:11:11
看来你需要使用10.0 ^( - n)或者你总是得到零响应。这里没有自动类型转换...... -----原始消息-----来自:OSSMANN,BILL(
A-hsgAndover,ex1)[mailto:bill_ossmann@hsgmed.com]发送时间:2002年7月9日星期二下午1:05到:vrf@lvld.agilent.com主题:RE:vrf Decimal RoundingMatt:使用round()函数(z)
* 10 ^ n)* 10 ^( - n)Bill Ossmann--bill_ossmann@hsgmed.comPhilips Ultrasound> -----原始信息----->来自:matt.mcnally@us.thalesatm.com> [mailto
:matt.mcnally@us.thalesatm.com]>发送时间:2002年7月9日星期二下午12:27>收件人:vrf@lvld.agilent.com>主题:vrf十进制舍入>>>是否有人知道如何舍入
到最近的十进制x?
ThanksMatt >>>> Matt McNally> Thales ATM INC。> Shawnee,KS> 913-422-2600 X5180> --------------------------
------------------------------------------->这是“vrf”
maillist,由Majordomo管理。
要将消息发送到>此maillist,只需发送电子邮件至“vrf@lvld.agilent.com”。订阅和>取消订阅均通过地址>“vrf-request@lvld.agilent.com”完成。>如果您需要详细信息,请发送
包含文本“help”>到“vrf-request@lvld.agilent.com”的消息。> ---------------------------
------------------------------------------> -------
--------------------------------------------------
------------这是由Majordomo管理的“vrf”maillist。
要发送邮件到该maillist,只需发送电子邮件至“vrf@lvld.agilent.com”。订阅和取消通过地址“vrf-request@lvld.agilent.com”完成。如果您需要详细信息,只需发送包含文本的消息“
帮助“to”vrf-request@lvld.agilent.com“.-----------------------------------
--------------------------------------------------
--------------------------------------------------
---这是由Majordomo管理的“vrf”maillist。
要向该maillist发送消息,只需发送电子邮件至“vrf@lvld.agilent.com”。
订阅和取消订阅是通过地址“vrf-request@lvld.agilent.com”完成的。如果您需要详细信息,只需将包含“help”文本的消息发送到“vrf-request@lvld.agilent.com”.---
--------------------------------------------------
----------------

以上来自于谷歌翻译


     以下为原文

  It seems that you need to use 10.0^(-n) or you'll always get a response of zero.
No automatic type conversion here...

          -----Original Message-----
          From:     OSSMANN,BILL (A-hsgAndover,ex1)
[mailto:bill_ossmann@hsgmed.com]
          Sent:     Tuesday, July 09, 2002 1:05 PM
          To:     vrf@lvld.agilent.com
          Subject:     RE: vrf Decimal Rounding

          Matt:

          Use the round() function

          round(z*10^n)*10^(-n)

          Bill Ossmann
          --
          bill_ossmann@hsgmed.com
          Philips Ultrasound

          >-----Original Message-----
          >From: matt.mcnally@us.thalesatm.com
          >[mailto:matt.mcnally@us.thalesatm.com]
          >Sent: Tuesday, July 09, 2002 12:27 PM
          >To: vrf@lvld.agilent.com
          >Subject: vrf Decimal Rounding
          >
          >
          >Does any one know how to round to the nearest decimal x? Thanks
Matt
          >
          >
          >
          >Matt McNally     
          >Thales ATM INC.
          >Shawnee, KS
          >913-422-2600 X5180
     
>---------------------------------------------------------------------
          >This is the "vrf" maillist, managed by Majordomo.  To send
messages to
          >this maillist, just email to "vrf@lvld.agilent.com".
Subscriptions and
          >unsubscriptions are done through the address
          >"vrf-request@lvld.agilent.com".
          >If you need details, just send a message containing the text
"help"
          >to "vrf-request@lvld.agilent.com".
     
>---------------------------------------------------------------------
          >
     
---------------------------------------------------------------------
          This is the "vrf" maillist, managed by Majordomo.  To send
messages to
          this maillist, just email to "vrf@lvld.agilent.com".
Subscriptions and
          unsubscriptions are done through the address
"vrf-request@lvld.agilent.com".
          If you need details, just send a message containing the text
"help"
          to "vrf-request@lvld.agilent.com".
     
---------------------------------------------------------------------
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------
举报

魏紫瑜

2018-9-5 10:28:56
是的,它有效,但是为什么当我将鼠标移到线上时它仍然给我这么长的数字呢?
Matt McNallyThales ATM INC.Shawnee,KS913-422-2600 X5180 -----原始消息-----来自:Young,Andrew [SMTP:ayoung09@harris.com]发送:2002年7月9日星期二12:20
PMTo:'OSSMANN,BILL(A-hsgAndover,ex1)';
vrf@lvld.agilent.comSubject:RE:vrf十进制舍入似乎你需要使用10.0 ^( - n)或者你总是得到零响应。这里没有自动类型转换... -----原始消息
-----来自:OSSMANN,BILL(A-hsgAndover,ex1)[mailto:bill_ossmann@hsgmed.com]发送时间:2002年7月9日星期二下午1:05致:vrf@lvld.agilent.comSubject:RE:vrf
Decimal RoundingMatt:使用round()函数(z * 10 ^ n)* 10 ^( - n)Bill Ossmann--bill_ossmann@hsgmed.comPhilips Ultrasound> -----原始消息----->来自:matt
.mcnally @ us.thalesatm.com> [mailto:matt.mcnally@us.thalesatm.com]>发送时间:2002年7月9日星期二下午12:27>收件人:vrf@lvld.agilent.com>主题:vrf十进制
舍入>>>有没有人知道如何舍入到最近的十进制x?
ThanksMatt >>>> Matt McNally> Thales ATM INC。> Shawnee,KS> 913-422-2600 X5180> --------------------------
------------------------------------------->这是“vrf”
maillist,由Majordomo管理。要发送消息给>这个maillist,只需发送电子邮件至“vrf@lvld.agilent.com”。订阅和>取消订阅通过地址>“vrf-request@lvld.agilent.com”完成。>如果
您需要详细信息,只需将包含“help”>文本的消息发送到“vrf-request@lvld.agilent.com”。> ----------------------
-----------------------------------------------> -
--------------------------------------------------
-----------------这是由majordomo管理的“vrf”maillist。要发送邮件到该maillist,只需发送电子邮件至“vrf@lvld.agilent.com”。订阅和取消订阅是
通过地址“vrf-request@lvld.agilent.com”完成。如果您需要详细信息,只需向“vrf-request@lvld.agilent.com”发送包含“help”文本的消息.-------
--------------------------------------------------
----------------------------------
-----------------------------------------------这是
由Majordomo管理的“vrf”maillist。
要发送消息给该maillist,只需发送电子邮件至“vrf@lvld.agilent.com”。
订阅和取消订阅是通过地址“vrf-request@lvld.agilent.com”完成的。如果您需要详细信息,只需将包含“help”文本的消息发送到“vrf-request@lvld.agilent.com”.----
--------------------------------------------------
--------------------------------------------------
----------------------------------这是由Majordomo管理的“vrf”maillist。
要向该maillist发送消息,只需发送电子邮件至“vrf@lvld.agilent.com”。
订阅和取消订阅是通过地址“vrf-request@lvld.agilent.com”完成的。如果您需要详细信息,只需将包含“help”文本的消息发送到“vrf-request@lvld.agilent.com”.---
--------------------------------------------------
----------------

以上来自于谷歌翻译


     以下为原文

  Yes, It works but why is it when I move my mouse over the line it still
gives me this big long number?



Matt McNally     
Thales ATM INC.
Shawnee, KS
913-422-2600 X5180

     -----Original Message-----
     From:     Young, Andrew [SMTP:ayoung09@harris.com]
     Sent:     Tuesday, July 09, 2002 12:20 PM
     To:     'OSSMANN,BILL (A-hsgAndover,ex1)'; vrf@lvld.agilent.com
     Subject:     RE: vrf Decimal Rounding

     It seems that you need to use 10.0^(-n) or you'll always get a
response of zero.
     No automatic type conversion here...

               -----Original Message-----
               From:     OSSMANN,BILL (A-hsgAndover,ex1)
     [mailto:bill_ossmann@hsgmed.com]
               Sent:     Tuesday, July 09, 2002 1:05 PM
               To:     vrf@lvld.agilent.com
               Subject:     RE: vrf Decimal Rounding

               Matt:

               Use the round() function

               round(z*10^n)*10^(-n)

               Bill Ossmann
               --
               bill_ossmann@hsgmed.com
               Philips Ultrasound

               >-----Original Message-----
               >From: matt.mcnally@us.thalesatm.com
               >[mailto:matt.mcnally@us.thalesatm.com]
               >Sent: Tuesday, July 09, 2002 12:27 PM
               >To: vrf@lvld.agilent.com
               >Subject: vrf Decimal Rounding
               >
               >
               >Does any one know how to round to the nearest
decimal x? Thanks
     Matt
               >
               >
               >
               >Matt McNally     
               >Thales ATM INC.
               >Shawnee, KS
               >913-422-2600 X5180
          
     
>---------------------------------------------------------------------
               >This is the "vrf" maillist, managed by Majordomo.
To send
     messages to
               >this maillist, just email to
"vrf@lvld.agilent.com".
     Subscriptions and
               >unsubscriptions are done through the address
               >"vrf-request@lvld.agilent.com".
               >If you need details, just send a message containing
the text
     "help"
               >to "vrf-request@lvld.agilent.com".
          
     
>---------------------------------------------------------------------
               >
          
     
---------------------------------------------------------------------
               This is the "vrf" maillist, managed by Majordomo.
To send
     messages to
               this maillist, just email to "vrf@lvld.agilent.com".
     Subscriptions and
               unsubscriptions are done through the address
     "vrf-request@lvld.agilent.com".
               If you need details, just send a message containing
the text
     "help"
               to "vrf-request@lvld.agilent.com".
          
     
---------------------------------------------------------------------
     
---------------------------------------------------------------------
     This is the "vrf" maillist, managed by Majordomo.  To send messages
to
     this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions
and
     unsubscriptions are done through the address
"vrf-request@lvld.agilent.com".
     If you need details, just send a message containing the text "help"
     to "vrf-request@lvld.agilent.com".
     
---------------------------------------------------------------------
---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------
举报

更多回帖

发帖
×
20
完善资料,
赚取积分