right, so try

dim d1 as new date, d2 as new date

Personally I'd like to propose a syntax change that allows us to dimension our variable as follows:

dim d(n) as new object

This would give a an N dimensioned array populated with new objects, which would just be handy IMHO... I'm constantly dimming s1,s2 ,s3 , s4 as object local properties, and this would save a load of time.

Cheers,
Tom




On 11/03/2006, at 10:49 AM, Thomas Tempelmann wrote:

I just found something I did not expect to work like this:

  dim d1, d2 as new Date

I did expect that this would create TWO new Date instances, one for
d1, and one for d2.

Instead, there's only one instance which gets assigned to both d1 and d2.

You do not need to explain to me why it happens like this - I ask the
others of you if you agree that this is a GOOD result that you all
want.

Because I'd rather ask that the compiler gives an error to avoid this
rather ambiguous effect: I say that if someone wants to have d1 and d2
assigned the same value here, he should rather write this explicitly
to avoid this possible confusion.

--
Thomas Tempelmann - exaggerating over a million times a day!
http://www.tempel.org/rb/  -- The primary source of outdated REALbasic
plugins and examples
Skype: tempel.org   AIM: superTempel
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

All questions and answers unless otherwise stated are in Relation to Mac OS X 10.4 and later.


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

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to