Csound Csound-dev Csound-tekno Search About

[Csnd] orchestra macro/#include bug

Date2012-03-13 14:37
FromJulien Claassen
Subject[Csnd] orchestra macro/#include bug
Hello everyone1
   I notcied an oddity, which gave me quite a headache. In my CSD file csound 
didn't accept an #include statement, because it was tabbed. I write my files 
always with indentation, so I have a better overview, sothe file looked 
something like this:

   ;csoptions
   
     sr = 48000
     kr = 4800
     ksmps = 10
     nchnls = 2

     #include "file.udo"
...
   I always got a message telling me about invalid input due to unexpected #, 
expecting something like $end token.
   When I tried #ifndef, with a line like:
     #ifndef "DONE"
   It also reported an error and didn't print the last newline, so the output 
was on the same line as the prompt. That also occured for one of the other 
warnings in connection with macros.
   I seem to remember, that I had no problems indenting my inculde in the 
 section of my CSD file.
   If you need specific output and full CSD file, that cause them, please do 
let me know. My csound version right now is 5.16 beta from right after the 
DSSI changes from sunday.
   Warm regards
            Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

======      Find my music at      ======
http://juliencoder.de/nama/music.html
.....................................
"If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you." (Winnie the Pooh)

Date2012-03-13 14:57
FromTito Latini
SubjectRe: [Csnd] orchestra macro/#include bug
AttachmentsNone  

Date2012-03-13 15:16
FromJulien Claassen
SubjectRe: [Csnd] orchestra macro/#include bug
Attachmentsinc.csd  def.csd  
Hi Tito!
   OK, attached you find inc.csd, which will work fine, if you delete the tabs 
in front of the #include.
   then you will find def.csd - whch might be faulty, but should still print a 
last newline, before existing, so the "" isn't on the same line as the new 
prompt. Unfortunately, I can't remember what else I did, which also resulted 
in missing newline at the end of csound's output. Perhaps try to remove the 
quotes from "DONE".
   Kind regards
            Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

======      Find my music at      ======
http://juliencoder.de/nama/music.html
.....................................
"If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you." (Winnie the Pooh)

Date2012-03-13 15:23
FromTito Latini
SubjectRe: [Csnd] orchestra macro/#include bug
AttachmentsNone  

Date2012-03-13 15:33
FromJulien Claassen
SubjectRe: [Csnd] orchestra macro/#include bug
Hi Tito!
   As I said, the define example might be my error, still it would be - a 
very small - but a fix to make sure, that csound prints the last newline. It 
might be pedantic, but although I work in textmode only, I'm sometimes quite 
the one for the finger-candy. :-)
   Warm regards
           Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

======      Find my music at      ======
http://juliencoder.de/nama/music.html
.....................................
"If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you." (Winnie the Pooh)

Date2012-03-13 15:34
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] orchestra macro/#include bug
> Ok, one is your error
>
>   #define DONE ##
>
> and not
>
>   #define DONE
>
> The other is a bug and simple to fix (minutes)
>

No not a bug -- that was the original design.  It could be changed but not
a bug.



Date2012-03-13 15:37
FromTito Latini
SubjectRe: [Csnd] orchestra macro/#include bug
AttachmentsNone  

Date2012-03-13 15:50
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] orchestra macro/#include bug
>> No not a bug -- that was the original design.  It could be changed but
>> not
>> a bug.
>
> John, I have a fix. Apply ?
>
>

presumablr (WHITESPACE}*#include    ?

OK by me



Date2012-03-13 15:52
FromTito Latini
SubjectRe: [Csnd] orchestra macro/#include bug
AttachmentsNone  

Date2012-03-13 16:18
FromTito Latini
SubjectRe: [Csnd] orchestra macro/#include bug
AttachmentsNone  

Date2012-03-13 17:03
FromJulien Claassen
SubjectRe: [Csnd] orchestra macro/#include bug
Hi Tito!
   No problem about the #ifdef group. I wasn't really wanting to use them, I 
just tried to see, if it was a problem, that just applied to #include, or if 
it was a problem applying to all the #macros in the orchestra.
   But thanks for the correction, I may fid myself wanting to use it sooner or 
later. These things are there for good reason. :-)
   Thanks again for the "fixes" or changes. It is all very much appreciated!
   Warmly yours
           Julien

=-=-=-=-=-=-=-=-=-=-=-=-
Such Is Life: Very Intensely Adorable;
Free And Jubilating Amazement Revels, Dancing On - FLOWERS!

======      Find my music at      ======
http://juliencoder.de/nama/music.html
.....................................
"If you live to be 100, I hope I live to be 100 minus 1 day,
so I never have to live without you." (Winnie the Pooh)