[Gambas-user] Date var and message output

Benoît Minisini gambas at ...1...
Fri Apr 16 14:16:03 CEST 2010


> Hi i want to ask why there is a difference when i print a date var and when
> i Message the var
> example code
> 
> dNow = Time(Now)
> PRINT dNow           'output 14:37:10
> Message(dNow)      'output 14:37:10.658
> 
> what is the 658 at the end if Messagebox output?

Because the default Date -> String conversion use the CStr() function. 
Message(dNow) is equivalent to Message(CStr(dNow)).

On the other hand, PRINT uses the Str$() function to convert its arguments.

Look in the documentation to see the difference between Str() and CStr().

Regards,

-- 
Benoît Minisini




More information about the User mailing list