that's interesting, and what i was looking for, but as they say there, you 
don't need this unless there's a change to syntax that fuddles the parser.  
so i can just use "if".  duh!  cheers, andrew

On Sunday, 24 May 2015 14:50:22 UTC-3, Mauro wrote:
>
> There is this issue, which I think would do what you want: 
> https://github.com/JuliaLang/julia/issues/7449 
>
> On Sun, 2015-05-24 at 19:26, andrew cooke <[email protected] <javascript:>> 
> wrote: 
> > Julia 0.4 has changed the rand! api (in a good way - the generator is 
> now 
> > explicit) and I am wondering whether I can support both in a single code 
> > base. 
> > 
> > What I'd really like, being old fashioned and simple, is something like 
> > cpp's macros that let me switch between two different sets of code: 
> > 
> > #ifdef 0.4 
> > rand!{...}(...) = ... 
> > #else 
> > rand!{...}(...) = ... 
> > #endif 
> > 
> > That seems like it would be simple and easy for me to understand and 
> read 
> > and maintain in the future. 
> > 
> > It also seems like it should be possible with macros, so I wondered if 
> > anyone had done so? 
> > 
> > (I did look at the Compat package, but it doesn't seem to support this 
> > particular issue). 
> > 
> > Does anything like this exist? 
> > 
> > Thanks, 
> > Andrew 
>
>

Reply via email to