Include guards for UDOs
Date | 2017-05-04 19:19 |
From | Ed Costello |
Subject | Include guards for UDOs |
Hey, How does one do C style include guards for udos? I’ve tried: #ifndef TEST #define TEST # opcode test, k, k k1 xin k1 = 200 printk2 k1 xout k1 endop # #endif But I get an error when trying to use it like this: |
Date | 2017-05-04 22:15 |
From | John ff |
Subject | Re: Include guards for UDOs |
What error?
Sent from TypeApp
On 4 May 2017, at 19:19, Ed Costello <phasereset@GMAIL.COM> wrote: Hey, |
Date | 2017-05-04 23:16 |
From | Ed Costello |
Subject | Re: Include guards for UDOs |
I get: error: syntax error, unexpected T_IDENT (token "test") from file main.csd (1) line 20: >>> k1 test <<< Unexpected untyped word kk when expecting a variable Same happens when I just copy the udo into the file like this: <CsoundSynthesizer> <CsInstruments> #ifndef TEST #define TEST # opcode test, k, k k1 xin k1 = 200 printk2 k1 xout k1 endop # #endif instr main k1 test 34 endin schedule("main", 0, -1) </CsInstruments> </CsoundSynthesizer> Thanks Ed
|
Date | 2017-05-04 23:40 |
From | Ed Costello |
Subject | Re: Include guards for UDOs |
Never mind, it was a typo on my part. Thanks Ed
|