realbasic-nug
[Top] [All Lists]

Re: Format, Double, Str, CDbl and data exchange -> another movieplayer b

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Format, Double, Str, CDbl and data exchange -> another movieplayer bug
From: Joe Strout <joe at inspiringapps dot com>
Date: Fri, 30 Nov 2007 08:31:36 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <C37587F6 dot 45994%markus_winter at blueyonder dot co dot uk>
On Nov 30, 2007, at 2:27 AM, Markus Winter wrote:

>>>   LB_Captions.addrow  Format(MoviePlayer1.Position, "0.000")
>
> which sets it to 1.345 on a British system
>
> and to 1,345 on a German system

Right, Format makes human-readable numbers.

>
>     MoviePlayer1.CurrentPosition =
>                            Val(LB_Captions.cell 
> (LB_Captions.SelectedRow,0))

This is incorrect.  To interpret human-readable numbers, you must use  
CDbl.  Val is only useful for machine-formatted numbers (which you'd  
get with Str rather than CStr or Format).

>     ST_Current_Position.Text = Format(MoviePlayer1.Position, "0.000")

This would be fine if the previous step were correct.

>

Best,
- Joe

--
Joe Strout
Inspiring Applications, Inc.
http://www.InspiringApps.com



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>