[Cs-dev] Bizarre macro bug.
Date | 2005-07-07 02:12 |
From | Iain Duncan |
Subject | [Cs-dev] Bizarre macro bug. |
Got everything working again, but discovered this. In the orchestra the following does not work, I get a no legal opcode message for the first undef call after the second outch line. Ie: code: instr 501 #define TRACK #1# #define MIXTRIM #1# #define AUX_NUM #1# #include "mixer/drum_mixer2.orc" ;* send out the main signal outch 1, asigL * $MIXTRIM outch 2, asigR * $MIXTRIM #undef MIXTRIM #undef TRACK #undef AUX_NUM endin I get: no legal opcode #undef MIXTRIM. Inserting an extra carriage return after the outch fixes it, the below is fine. instr 501 #define TRACK #1# #define MIXTRIM #1# #define AUX_NUM #1# #include "mixer/drum_mixer2.orc" ;* send out the main signal outch 1, asigL * $MIXTRIM outch 2, asigR * $MIXTRIM #undef MIXTRIM #undef TRACK #undef AUX_NUM endin This is strange because the code used to work fine without that extra return. Hope that is somewhat useful. Iain ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-07-07 09:04 |
From | jpff@codemist.co.uk |
Subject | Re: [Cs-dev] Bizarre macro bug. |
Sounds like a typical parse problem in seeing the #undef ==John ffitch ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-07-07 11:21 |
From | Istvan Varga |
Subject | Re: [Cs-dev] Bizarre macro bug. |
Iain Duncan wrote: > Got everything working again, but discovered this. In the orchestra the > following does not work, I get a no legal opcode message for the first > undef call after the second outch line. Ie: Well, now with an example I was actually able to fix the bug. It was triggered only if the #undef (or possibly any other preprocessing statement starting with #) occured on the line following a macro expansion at the end of the previous line without a '.' or any other trailing characters. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2005-07-07 19:09 |
From | Iain Duncan |
Subject | Re: [Cs-dev] Bizarre macro bug. |
Istvan Varga wrote: > Iain Duncan wrote: > >> Got everything working again, but discovered this. In the orchestra >> the following does not work, I get a no legal opcode message for the >> first undef call after the second outch line. Ie: > > > Well, now with an example I was actually able to fix the bug. > It was triggered only if the #undef (or possibly any other > preprocessing statement starting with #) occured on the line > following a macro expansion at the end of the previous line > without a '.' or any other trailing characters. Thanks. Sorry for the delay in the example. It was part of a very large project so it took a bit of effort to isolate the point at which it was failing while making sure it wasn't just me being a bonehead. ;) Iain ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |