On May 03, 2006, at 10:15 UTC, Emile Schwarz wrote: > I had two times the same Dim line, the first in the If part, and the second > in > the Else part.
So? There's nothing wrong with that. The first variable ceases to exist at the end of the if part, and so that name is free to be used again in the else part. This is most definitely a feature; it lets you write each block of code without such tight coupling to neighboring blocks of code. > BTW: If you place a Dim line (or two or more) in the If block _AND_ that very > same Dim line exists in the beginning of the code _OR_ outside of the If > block, > REALbasic flag the error and displays the first line as an error: > > "Error: This name is already in use." Quite right. In this case, the first variable has not gone out of scope at the point at which you're trying to use the same name again. Best, - Joe -- Joe Strout -- [EMAIL PROTECTED] Available for custom REALbasic programming or instruction. _______________________________________________ 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>
