Trailing New Line in UDO
Date | 2015-12-08 23:33 |
From | Beinan Li |
Subject | Trailing New Line in UDO |
Hi Csound (6.05 on OS X El Capitan): I noticed that if I have two UDO headers to include, and the one that is "#included" first does not contain a trailing new line after "endop". I get this error: "error: syntax error, unexpected '#', expecting NEWLINE (token "#") from file myheader.inc (2)" Also, the UDO header that comes after needs no trailing new lines. Is it that the interpreter uses the new line to separate multiple headers to include? Is this by design? If so, wouldn't the opcode/endop keywords be good enough to separate the UDOs? Anyways, this is not blocking. I'm just curious. Thanks, Beinan |
Date | 2015-12-09 06:47 |
From | Victor Lazzarini |
Subject | Re: Trailing New Line in UDO |
I think the reason for this is that the included file, not having a newline, will make the next line in your code follow on without a newline. There is probably another #include in the next line. The parser expects a newline not a hash. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 8 Dec 2015, at 23:33, Beinan Li |
Date | 2015-12-09 08:02 |
From | Oeyvind Brandtsegg |
Subject | Re: Trailing New Line in UDO |
I recognize this trap from earlier, it can create a lot of confusion for new users. Would it be possible to add a newline after an include statement automatically when parsing? Come to think of it, the user has already typed in the newline (as the last item on the line with the include statement). best Oeyvind 2015-12-09 7:47 GMT+01:00 Victor Lazzarini |