On Tuesday, November 18, 2014 10:19:44 PM UTC+10, Mike Innes wrote: > > Ah ok, that's a nice trick too – I didn't know you could do that (although > it makes perfect sense). > > Note that this also constructs the string at runtime, though. >
If x is a string constant a "sufficiently smart" (tm) compiler would catenate them at compile time. Cheers Lex > > On 18 November 2014 12:13, <[email protected] <javascript:>> wrote: > >> >> >> On Tuesday, November 18, 2014 7:40:53 PM UTC+10, Mike Innes wrote: >>> >>> The basic reason for this is that it's fairly common to write something >>> like: >>> >>> quote >>> let x = 5 >>> "x is $x" >>> end >>> end |> eval #> "x is 5" >>> >> >> But to do what the OP wants I think you can do "x is $($x)" (but I don't >> have Julia available just now to test. >> >> Cheers >> Lex >> >> [...] >> > >
