On Apr 05, 2007, at 15:35 UTC, David Glass wrote:

> So is this why I see the following behavior:
> 
> datCurrent = New Date <--01/01/07 for example
> 
> datTemp = datCurrent
> 
> datTemp.Month = datTemp.Month + 1
> 
> After the last line both datCurrent and datTemp are set to 01/02/07  

Right, because datCurrent and datTemp are just two references to the
very same object.

> datTemp.TotalSeconds = datCurrent.TotalSeconds
> 
> instead of
> 
> datTemp = datCurrent
> 
> then only datTemp is 01/02/07, and datCurrent is still 01/01/07

Well, assuming you first do datTemp = New Date so that datTemp refers
to some other object, then yes.  (If you fail to do this, then you'll
get a nil object exception when you try to assign the TotalSeconds of
nil.)

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

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

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

Reply via email to