Hi, I'd suggest to take a look at .ppo file generated, as I'm 100% sure that the meaningless expression is not wrong. Maybe you need to code it differently to avoid it. Or, just turn off warnings, if that's not an option.
From personal experience it's sometimes difficult to see why compiler warns, but so far it was right on all cases. Brgds, Viktor On 2010 Feb 8, at 22:55, smu johnson wrote: > Dear Harbour, > > I have solved the whole oGet problems I was having, referenced by both of the > URLs below of the mailing list. > > http://lists.harbour-project.org/pipermail/harbour/2010-February/031851.html > http://lists.harbour-project.org/pipermail/harbour-users/2010-February/000314.html > > The problem was Harbour was Warning me about useless vals. > > 3:28 PM 2/5/2010 > GL.PRG(419) Warning W0027 Meaningless use of expression 'String' > GL2.PRG(1460) Warning W0027 Meaningless use of expression 'String' > GL2.PRG(1469) Warning W0027 Meaningless use of expression 'String' > DATPROMO.PRG(10) Warning W0027 Meaningless use of expression 'String' > ORDERS.PRG(794) Warning W0027 Meaningless use of expression 'Logical' > ORDERS.PRG(2034) Warning W0027 Meaningless use of expression 'Logical' > RECONCIL.PRG(1029) Warning W0027 Meaningless use of expression 'String' > RECONCIL.PRG(1035) Warning W0027 Meaningless use of expression 'String' > CRMAIN.PRG(1837) Warning W0027 Meaningless use of expression 'Logical' > CRAUX2.PRG(78) Warning W0027 Meaningless use of expression 'Logical' > CRAUX2.PRG(465) Warning W0027 Meaningless use of expression 'String' > PROCESS.PRG(1497) Warning W0027 Meaningless use of expression 'String' > PROCESS.PRG(1510) Warning W0027 Meaningless use of expression 'String' > Phone.prg(5) Warning W0027 Meaningless use of expression 'String' > > Turns out, these were not meaningless. They were in EVAL lines of code where > the "useless" value was needed to get the oGet stuff to work properly. An > example of a line of code: > > Valid !lGiftCard .and. (lNegPrice .or. !CRPrice<0) .and. > iif(lNew.and.CRPrice#0,Eval({||SpecialPrice:=.t.,SetPrice:=SpecialPrice,.t.}),.t.) > > As soon as I take out the "Meaningless" val, the warning stops when > compiling, but our .PRG hangs when the getReader() function is called and > breaks. > > Maybe this could be considered a bug in Harbour, where it is warning me for > no reason? > > -- > smu johnson <[email protected]> > > _______________________________________________ > Harbour mailing list (attachment size limit: 40KB) > [email protected] > http://lists.harbour-project.org/mailman/listinfo/harbour _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
