[Csnd] wrong line count when using macro

Hello everybody!

I often use the #define feature in the ‘orchestra’ and there is an issue with line count (very useful to track mistakes!): i tested that at the end of a macro recall, the line count restart to 1. Of course when I use more time a macro (that is the purpose to using it) it’s difficult to track the correct line number.

I attach the tested *.csd (the text at the end is intentionally wrong to count line numbered mistakes):

sr = 44100
ksmps = 128
nchnls = 2
0dbfs = 1.0

#define d #
ii=1
kk=k(ii)

Hi all,
I make some other tests about #define and macro in orchestra. Always Csound says:

error: syntax error, unexpected NEWLINE (token “”) from file /Users/ada/Documents/csoundqt-temp.csd (1), line 3:

linea <<<
The manual indeed is warning about some unexpected:

Performance

Some care is needed with textual replacement macros, as they can sometimes do strange things. They take no notice of any meaning, so spaces are significant.

I copy here my second test, where on my Mac Csound count line again from 3 after first macro recall, but the second restart to count from 5…

error: syntax error, unexpected NEWLINE (token “”) from file /Users/ada/Documents/csoundqt-temp.csd (1), line 5:
And on windows 10 is this count far less predictable…

cheers,
Giovanni

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1
#define macro#
ii=0