On Mon, 01 Oct 2012, Enrico Maria Giordano wrote: Hi Enrico,
> >There is no such limitation in Harbour, xHarbour and in Clipper. > Great! I'm happy to ear that! :-) > >So all what you need is investing few minutes and learn how PP > >in Clipper and [x]Harbour works and then use correct syntax. > Sorry, the sample is not mine and I report it here without paying > enough attention to the code. > >Instead of: > > SET PRINTER TO &(MEMVAR -> Enrico) > >you should use: > > SET PRINTER TO ( &(MEMVAR -> Enrico) ) > >just to inform PP what you expect. > WIth this new sample > Procedure Main() > MEMVAR->Doug := "right" > MEMVAR->Enrico := "wrong" > SET PRINTER TO &(MEMVAR->Doug) > SET PRINTER TO ( &(MEMVAR -> Enrico) ) > Return > I get > Error BASE/1003 Variable does not exist: WRONG > What am I missing? Don't be sorry that you haven't pay attention for Clipper syntax but start to invest some time in it ;-) -p option and .ppo files can greatly help you. The basic functionality of & is macro operator. If it's not "eaten" by some PP rules then it's passed to compiler. If you do not want to eval the expression in M->Doug then you should not use it at all, i.e.: SET PRINTER TO ( MEMVAR -> Doug ) BTW many times in last years you reported problems with code using this construction: PROC MAIN() MEMVAR V PRIVATE V := "DATE()" ? &V RETURN Few days ago I've seen that you again reported that when you trie to compile speedtst.prg you have errors like: Error E0003 Duplicate variable declaration 'V' This problem is created by you: you added to some of your build scripts or envvars Harbour switch: -a Just like in Clipper this switch adds hidden MEMVAR declarations to all PRIVATE and PUBLIC statements and as result you have repeated declarations. So instead of reporting it again please fix your build scripts at least for [x]Harbour core code and examples. best regards, Przemek ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers