Discussion:
[xHarbour-developers] Compiler crash
Enrico Maria Giordano
2016-08-15 09:02:33 UTC
Permalink
I don't remember if it has already been reported. The following code

FUNCTION MAIN()

LOCAL cVar

? { || &cVar .and. .T. }

RETURN NIL

crashes the compiler. Any ideas on where to look?

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG Music page: http://www.emagsoftware.it/emgmusic
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
Ron Pinkas
2016-08-15 21:07:11 UTC
Permalink
Should be fixed after:

2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>
Post by Enrico Maria Giordano
I don't remember if it has already been reported. The following code
FUNCTION MAIN()
LOCAL cVar
? { || &cVar .and. .T. }
RETURN NIL
crashes the compiler. Any ideas on where to look?
EMG
--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG Music page: http://www.emagsoftware.it/emgmusic
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. http://sdm.link/zohodev2dev
_______________________________________________
xHarbour-developers mailing list
https://lists.sourceforge.net/lists/listinfo/xharbour-developers
Enrico Maria Giordano
2016-08-15 22:29:43 UTC
Permalink
Post by Ron Pinkas
2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>
Thank you! :-)

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG Music page: http://www.emagsoftware.it/emgmusic
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg

------------------------------------------------------------------------------
Enrico Maria Giordano
2016-08-16 13:30:37 UTC
Permalink
Post by Ron Pinkas
2016-08-15 17:04 UTC-0400 Ron Pinkas <ron.pinkas/at/xharbour.com>
I don't know if this is correct:

#command TEST <xpr> ;
;
=> MyTest( { || <xpr> .and. .t. } )

#command TEST &<xpr> ;
;
=> MyTest( &( "{ || " + <xpr> + " .and. .t. }" ) )


FUNCTION MAIN()

LOCAL cVar := ".T."

TEST &cVar

RETURN NIL

Error E0047 Code block contains both macro and declared symbol references

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG Music page: http://www.emagsoftware.it/emgmusic
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg

------------------------------------------------------------------------------
Enrico Maria Giordano
2016-08-16 17:04:19 UTC
Permalink
Post by Enrico Maria Giordano
#command TEST <xpr> ;
;
=> MyTest( { || <xpr> .and. .t. } )
#command TEST &<xpr> ;
;
=> MyTest( &( "{ || " + <xpr> + " .and. .t. }" ) )
FUNCTION MAIN()
LOCAL cVar := ".T."
TEST &cVar
RETURN NIL
Error E0047 Code block contains both macro and declared symbol references
Yes, this IS a correct error.
Right! The correct command should be

TEST &( cVar )

EMG

--
EMAG Software Homepage: http://www.emagsoftware.it
The EMG Music page: http://www.emagsoftware.it/emgmusic
The EMG's ZX-Spectrum Page: http://www.emagsoftware.it/spectrum
The Best of Spectrum Games: http://www.emagsoftware.it/tbosg

------------------------------------------------------------------------------
Loading...