[Csnd-dev] csoundCompileCsdText return alwas OK

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd-dev] csoundCompileCsdText return alwas OK

Tarmo Johannes-3
Hi,


How is this meant to be? I guess if there are errors in csdText like
csoundCompileCsdText(csound, "YEP"); the function should return something like
-1, but the returnvalue is alsways 0 (CSOUND_OK) ?

tarmo
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] csoundCompileCsdText return alwas OK

Tarmo Johannes-3
No,
I think It returned 0, ie CSOUND-OK correctly. The problem was that the result was the always the same, whether compilation was wit errors or not. I would expect to get different result if compilation fails.

I had a look at the code in Top/main.c and it seems to me that the problem comes from csoundCompileCsd - do I get it right that CompileCsdText creates temporary file and compiles that? csoundCompileCsd seems to return FAILED when it cannot find the file, but even if there are errors, returns OK.

I am not by computer for a week and cannot test, I hope I remembered correct.

Thanks!
Tarmo

18.07.2017 13:09 kirjutas kuupäeval "Victor Lazzarini" <[hidden email]>:
It looks like the error result was flipped (1 for read the CSD Ok and 0 for not ok). I think I’ve fixed it now in git.
Can you check?
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 18 Jul 2017, at 00:25, Tarmo Johannes <[hidden email]> wrote:
>
> Hi,
>
>
> How is this meant to be? I guess if there are errors in csdText like
> csoundCompileCsdText(csound, "YEP"); the function should return something like
> -1, but the returnvalue is alsways 0 (CSOUND_OK) ?
>
> tarmo


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] csoundCompileCsdText return alwas OK

Michael Gogins-2
Yes, a temporary file. Should be possible to test for that.

Best,
Mike

On Jul 18, 2017 6:08 AM, "Tarmo Johannes" <[hidden email]> wrote:
No,
I think It returned 0, ie CSOUND-OK correctly. The problem was that the result was the always the same, whether compilation was wit errors or not. I would expect to get different result if compilation fails.

I had a look at the code in Top/main.c and it seems to me that the problem comes from csoundCompileCsd - do I get it right that CompileCsdText creates temporary file and compiles that? csoundCompileCsd seems to return FAILED when it cannot find the file, but even if there are errors, returns OK.

I am not by computer for a week and cannot test, I hope I remembered correct.

Thanks!
Tarmo

18.07.2017 13:09 kirjutas kuupäeval "Victor Lazzarini" <[hidden email]>:
It looks like the error result was flipped (1 for read the CSD Ok and 0 for not ok). I think I’ve fixed it now in git.
Can you check?
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 18 Jul 2017, at 00:25, Tarmo Johannes <[hidden email]> wrote:
>
> Hi,
>
>
> How is this meant to be? I guess if there are errors in csdText like
> csoundCompileCsdText(csound, "YEP"); the function should return something like
> -1, but the returnvalue is alsways 0 (CSOUND_OK) ?
>
> tarmo


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] csoundCompileCsdText return alwas OK

Victor Lazzarini
I think I fixed this already, that is what I said.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 18 Jul 2017, at 14:15, Michael Gogins <[hidden email]> wrote:

Yes, a temporary file. Should be possible to test for that.

Best,
Mike

On Jul 18, 2017 6:08 AM, "Tarmo Johannes" <[hidden email]> wrote:
No,
I think It returned 0, ie CSOUND-OK correctly. The problem was that the result was the always the same, whether compilation was wit errors or not. I would expect to get different result if compilation fails.

I had a look at the code in Top/main.c and it seems to me that the problem comes from csoundCompileCsd - do I get it right that CompileCsdText creates temporary file and compiles that? csoundCompileCsd seems to return FAILED when it cannot find the file, but even if there are errors, returns OK.

I am not by computer for a week and cannot test, I hope I remembered correct.

Thanks!
Tarmo

18.07.2017 13:09 kirjutas kuupäeval "Victor Lazzarini" <[hidden email]>:
It looks like the error result was flipped (1 for read the CSD Ok and 0 for not ok). I think I’ve fixed it now in git.
Can you check?
========================
Prof. Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 18 Jul 2017, at 00:25, Tarmo Johannes <[hidden email]> wrote:
>
> Hi,
>
>
> How is this meant to be? I guess if there are errors in csdText like
> csoundCompileCsdText(csound, "YEP"); the function should return something like
> -1, but the returnvalue is alsways 0 (CSOUND_OK) ?
>
> tarmo


Loading...