Harbour has the same behavior as Clipper .-
proc main()
PUBLIC VAR := 'Hello'
? M->&("VAR") // Ok
? xxx( "VAR" ) // Ok
? Eval( &('{|| M->'+"VAR"+'}') ) // Ok
? Eval( &('{|| M->&("VAR") }') ) // Error BASE/1449 Syntax error: &
return
func xxx( name )
// b := &( "{|| field->" + name + " }" )
local b := &( "{|| M->" + name + " }" )
return eval( b )
PS At least with this. :)
HTH
--
Xavi
El 20/03/2010 23:06, Alexandr Okhotnikov escribió:
Hi,
How can I compile (and run) this code in a macro:
field->&("name")
example:
func xxx( name )
local b :=&( "{|| field->&('" + name + "') }" )
return eval( b )
Error BASE/1449 Syntax error:&
PS in *.hrb the exact same error
PPS Alaska XBase++: compiles without errors
(I convert the code from XBase++)
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour