are true and/or false defined constants in csound?
Date | 2015-05-09 17:22 |
From | David Worrall |
Subject | are true and/or false defined constants in csound? |
Attachments | None None |
Hi All, I'm looking to be able to write gMyGlobalVar init True if (gMyGlobalVar) then …. endif rather that gMyGlobalVar init 1 if (gMyGlobalVar == 1 ) then …. endif are True and False defined for csound instrument building? thanks, D. ______________________________________ Prof. Dr. David Worrall International Audio Laboratories Erlangen Fraunhofer-Institut für Integrierte Schaltungen IIS Am Wolfsmantel 33 91058 Erlangen www: iis.fraunhofer.de --- Adjunct Senior Research Fellow School of Music, Australian National University |
Date | 2015-05-09 17:47 |
From | Victor Lazzarini |
Subject | Re: are true and/or false defined constants in csound? |
Attachments | None None |
You could use a macro perhaps? Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2015-05-09 17:54 |
From | Steven Yi |
Subject | Re: are true and/or false defined constants in csound? |
Hi David, There is actually a boolean type within Csound's engine, but it has not been exposed to user code. (Actually there are two boolean types, b and B, which correspond to init and perf-times). I've been thinking recently that it might be nice to have integer and long integer types; perhaps having booleans exposed would be good too. I think this would all have to be done in Csound 7, but it could look like this: myVar:bool = false counter:int = 0 counter2:long = 0L In a later Csound with type inferrance, it would become simpler with: myVar = false counter = 0 counter2 = 0L If interested, you could file an issue and we could look at it for CS7. steven On Sat, May 9, 2015 at 12:22 PM, David Worrall |
Date | 2015-05-09 18:39 |
From | David Worrall |
Subject | Re: are true and/or false defined constants in csound? |
Attachments | None None |
Hi Steven, Thanks, Clearly it would be a nice feature rather than essential. So I have filed: https://github.com/csound/csound/issues/465 thanks, D. On 09.05.2015, at 18:54, Steven Yi <stevenyi@gmail.com> wrote: Hi David, ______________________________________ Prof. Dr. David Worrall International Audio Laboratories Erlangen Fraunhofer-Institut für Integrierte Schaltungen IIS Am Wolfsmantel 33 91058 Erlangen www: iis.fraunhofer.de --- Adjunct Senior Research Fellow School of Music, Australian National University |