In matters such as upper vs. lower case RB is rather flexible. Almost anything will work (in contrast, for example, to VB).
The same is ALMOST true in RB of whether you put a space (or not) to the left or right (or not) of a parentheses symbol.
Thus ALL of the following work in RB (which doesn't really care which of you use):
Dim Day(07)As String
Day(1)="Sunday"
Day (2)="Monday"
Day( 3 )="Tuesday"
Day(4 )="Wednesday"
Day(5) ="Thursday"
Day (6) = "Friday"
Day ( 7 ) ="Saturday"
MsgBox Day(1)
MsgBox Day ( 2)
MsgBox Day(3 )
MsgBox Day( 4 )
MsgBox Day ( 5)
MsgBox Day ( 6)
MsgBox Day (7 )
Dim Month ( 12 ) As String
Month(1) = "January"
// etc.
Actually, since in the preceding example you can put a space or not in four possible positions (i.e., before the first parenthesis, after the first parenthesis, before the second parenthesis, after the second parnhesis), there are 2 x 2 x 2 x 2 or 16 possible ways of putting or not putting a space, ALL of which RB allows.
That's great. Some people complain that RB is not more restrictive in its requirements, but there is something to be said for letting the programmer decide on the practice he or she prefers.
I do have a minor complaint, however. I am one of the people who prefer lots of "white space" for readability. Thus my preference would be, for example, "Dim Day ( 7 ) As String" rather than, say, "Dim Day(7)As String". RB lets me do have that option ALMOST ALL the time, but (for some reason of its own) NOT ALL the time. There is one (and only one) exception that I know of.
In particular, RB does NOT allow "white space" when it comes to the parentheses you use when you define a property. "Day(7)" with no spaces is allowable, but "Day (7 )" with spaces is not,
Three questions: (1) Why is Real Software inconsistent in its requirements in that one (and only one) situation? (2) Does the documentation mention that inconsistency? (3) Is there any hope of persuading Real Software of removing the inconsistency and of allowing programmers to have the same choice they have everywhere else concerning parentheses and spaces?
Yes, I did spend a lot of time figuring out that RB in that single situation did NOT allow what I was allowed EVERYWHERE ELSE. (Curiously enough, I was allowed the space when making a Dim statement; see above).
Barry Traver