John, That appears to be my scenario as well. I'm using a constant as the initial value of a property, and the compiler is choking on it as well.
If you've created a report, I'll certainly sign on. John McKernon wrote: >> But I don't understand why you're seeing that these constants don't >> work as parameters. They certainly do for me in the last beta (which I >> guess I can mention since r2 is no longer in beta), but I haven't yet >> downloaded the official r2 release to try it there. >> > > I tried making a really simple project, and the constants looked to be fine. > Then I looked at my big project's code, and noticed that the compiler is OK > with most of the constants, just a few of them caused problems. > > Here's what I found: > > If I declare a constant, then use that as the initial value in a property > declaration, it causes the compiler to reject all further uses of that > constant. > > Example: > > In a module, I declare a constant kSixCats = 6. > > I also declare a property CurrentCat as integer = kSixCats. > > Finally, I declare a property ValuesOfCats(kSixCats) as integer > > The compiler gives me a typemismatch error on using CurrentCat as integer = > kSixCats, and it also says that array bounds must be integers on > ValuesOfCats(kSixCats). > > Evidently it's no longer legal to use a constant as a default value in a > property definition. Dreary, but not a major roadblock. > > Should this be considered a bug? If so, I'll file a report. > > There are a few other problems I'm seeing with 2007r2, but this is the only > one I've nailed down. > > Thanks for your help! > > - John > > > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
