[Csnd] Parser behavior
Date | 2012-09-16 15:03 |
From | Louis Cohen |
Subject | [Csnd] Parser behavior |
Hi, everyone, I just began using a current version of Csound (5.17), hence the new parser. Of course I'm getting some syntax errors with code that worked OK with the old parser, and it's actually helping me to clean up my code. But I was wondering about this: if( |
Date | 2012-09-16 15:27 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Parser behavior |
I suspect that there is no definition of an empty statement. I suspect it could be changed in this case, but I rather expected it to indicate an error, or at least very odd behaviour I am open to discussion. btw the latest version is 5.18.02 ==John > Hi, everyone, > > I just began using a current version of Csound (5.17), hence the new > parser. Of course I'm getting some syntax errors with code that worked > OK with the old parser, and it's actually helping me to clean up my > code. > > But I was wondering about this: > > if( |
Date | 2012-09-16 19:22 |
From | Louis Cohen |
Subject | Re: [Csnd] Parser behavior |
John, Thanks for your response. Based on my experience with Java and the Netbeans compiler, the only other language I use these days, an empty statement gets a warning but is not fatal. I think I prefer that empty statements not be fatal. I often comment out a line of code when I'm trying a new idea. By commenting it out, I can conveniently bring it back just deleting the semicolon. Then I don't have to reconstruct the statement, which could invite an error. I'm guessing that in the case of Csound not all empty statements are fatal; just the ones that cause the inside of an if statement to be empty? If so, I can easily live with it even though I prefer otherwise. The way I dealt with the problem today was simply to comment out all the lines from "if...." to "endif". In that way I can easily revive the statement if I need to. -Lou PS: about the latest version of Csound, I just made the jump from OSX 10.5.8 to OSX 10.8. I downloaded what was the latest version of Csound at the time and then promptly took ill. As I slowly recover, my first project is to simply get my important csd's running in the new environment. I figured that Csound 5.17 would be good enough for that. If you think it's important for me to upgrade to 5.18 right away, please let me know. On Sep 16, 2012, at 10:27 AM, jpff@cs.bath.ac.uk wrote: > I suspect that there is no definition of an empty statement. I > suspect it > could be changed in this case, but I rather expected it to indicate an > error, or at least very odd behaviour > > I am open to discussion. > > btw the latest version is 5.18.02 > > ==John >> Hi, everyone, >> >> I just began using a current version of Csound (5.17), hence the new >> parser. Of course I'm getting some syntax errors with code that >> worked >> OK with the old parser, and it's actually helping me to clean up my >> code. >> >> But I was wondering about this: >> >> if( |
Date | 2012-09-16 19:51 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Parser behavior |
Code very easy to change; need to check with the author of that section to see if there is something I have missed ==John > > Thanks for your response. Based on my experience with Java and the > Netbeans compiler, the only other language I use these days, an empty > statement gets a warning but is not fatal. > > I think I prefer that empty statements not be fatal. I often comment > out a line of code when I'm trying a new idea. By commenting it out, I > can conveniently bring it back just deleting the semicolon. Then I > don't have to reconstruct the statement, which could invite an error. > > I'm guessing that in the case of Csound not all empty statements are > fatal; just the ones that cause the inside of an if statement to be > empty? If so, I can easily live with it even though I prefer > otherwise. The way I dealt with the problem today was simply to > comment out all the lines from "if...." to "endif". In that way I can > easily revive the statement if I need to. > > -Lou > > PS: about the latest version of Csound, I just made the jump from OSX > 10.5.8 to OSX 10.8. I downloaded what was the latest version of Csound > at the time and then promptly took ill. As I slowly recover, my first > project is to simply get my important csd's running in the new > environment. I figured that Csound 5.17 would be good enough for that. > If you think it's important for me to upgrade to 5.18 right away, > please let me know. > > > > On Sep 16, 2012, at 10:27 AM, jpff@cs.bath.ac.uk wrote: > >> I suspect that there is no definition of an empty statement. I >> suspect it >> could be changed in this case, but I rather expected it to indicate an >> error, or at least very odd behaviour >> >> I am open to discussion. >> >> btw the latest version is 5.18.02 >> >> ==John >>> Hi, everyone, >>> >>> I just began using a current version of Csound (5.17), hence the new >>> parser. Of course I'm getting some syntax errors with code that >>> worked >>> OK with the old parser, and it's actually helping me to clean up my >>> code. >>> >>> But I was wondering about this: >>> >>> if( |
Date | 2012-09-17 09:14 |
From | jpff@cs.bath.ac.uk |
Subject | Re: [Csnd] Parser behavior |
Checked into git. Still needs a little more testing > Code very easy to change; need to check with the author of that section to > see if there is something I have missed > ==John > >> >> Thanks for your response. Based on my experience with Java and the >> Netbeans compiler, the only other language I use these days, an empty >> statement gets a warning but is not fatal. >> >> I think I prefer that empty statements not be fatal. I often comment >> out a line of code when I'm trying a new idea. By commenting it out, I >> can conveniently bring it back just deleting the semicolon. Then I >> don't have to reconstruct the statement, which could invite an error. >> >> I'm guessing that in the case of Csound not all empty statements are >> fatal; just the ones that cause the inside of an if statement to be >> empty? If so, I can easily live with it even though I prefer >> otherwise. The way I dealt with the problem today was simply to >> comment out all the lines from "if...." to "endif". In that way I can >> easily revive the statement if I need to. >> >> -Lou >> >> PS: about the latest version of Csound, I just made the jump from OSX >> 10.5.8 to OSX 10.8. I downloaded what was the latest version of Csound >> at the time and then promptly took ill. As I slowly recover, my first >> project is to simply get my important csd's running in the new >> environment. I figured that Csound 5.17 would be good enough for that. >> If you think it's important for me to upgrade to 5.18 right away, >> please let me know. >> >> >> >> On Sep 16, 2012, at 10:27 AM, jpff@cs.bath.ac.uk wrote: >> >>> I suspect that there is no definition of an empty statement. I >>> suspect it >>> could be changed in this case, but I rather expected it to indicate an >>> error, or at least very odd behaviour >>> >>> I am open to discussion. >>> >>> btw the latest version is 5.18.02 >>> >>> ==John >>>> Hi, everyone, >>>> >>>> I just began using a current version of Csound (5.17), hence the new >>>> parser. Of course I'm getting some syntax errors with code that >>>> worked >>>> OK with the old parser, and it's actually helping me to clean up my >>>> code. >>>> >>>> But I was wondering about this: >>>> >>>> if( |
Date | 2012-09-17 14:15 |
From | Louis Cohen |
Subject | Re: [Csnd] Parser behavior |
Thanks, John! best, Lou Cohen On Sep 17, 2012, at 4:14 AM, jpff@cs.bath.ac.uk wrote: > Checked into git. Still needs a little more testing > > >> Code very easy to change; need to check with the author of that >> section to >> see if there is something I have missed >> ==John >> >>> >>> Thanks for your response. Based on my experience with Java and the >>> Netbeans compiler, the only other language I use these days, an >>> empty >>> statement gets a warning but is not fatal. >>> >>> I think I prefer that empty statements not be fatal. I often comment >>> out a line of code when I'm trying a new idea. By commenting it >>> out, I >>> can conveniently bring it back just deleting the semicolon. Then I >>> don't have to reconstruct the statement, which could invite an >>> error. >>> >>> I'm guessing that in the case of Csound not all empty statements are >>> fatal; just the ones that cause the inside of an if statement to be >>> empty? If so, I can easily live with it even though I prefer >>> otherwise. The way I dealt with the problem today was simply to >>> comment out all the lines from "if...." to "endif". In that way I >>> can >>> easily revive the statement if I need to. >>> >>> -Lou >>> >>> PS: about the latest version of Csound, I just made the jump from >>> OSX >>> 10.5.8 to OSX 10.8. I downloaded what was the latest version of >>> Csound >>> at the time and then promptly took ill. As I slowly recover, my >>> first >>> project is to simply get my important csd's running in the new >>> environment. I figured that Csound 5.17 would be good enough for >>> that. >>> If you think it's important for me to upgrade to 5.18 right away, >>> please let me know. >>> >>> >>> >>> On Sep 16, 2012, at 10:27 AM, jpff@cs.bath.ac.uk wrote: >>> >>>> I suspect that there is no definition of an empty statement. I >>>> suspect it >>>> could be changed in this case, but I rather expected it to >>>> indicate an >>>> error, or at least very odd behaviour >>>> >>>> I am open to discussion. >>>> >>>> btw the latest version is 5.18.02 >>>> >>>> ==John >>>>> Hi, everyone, >>>>> >>>>> I just began using a current version of Csound (5.17), hence the >>>>> new >>>>> parser. Of course I'm getting some syntax errors with code that >>>>> worked >>>>> OK with the old parser, and it's actually helping me to clean up >>>>> my >>>>> code. >>>>> >>>>> But I was wondering about this: >>>>> >>>>> if( |