Hi, allI have the function which accept string as its input , I key in qconsole such as : myfunc “GOOG” ; it works well, but I am lazy anddon’t want to entry the double quotation marks, I would like q do thejob by such syntax: myfunc GOOG .So how to let q accept that ?Thanks,Halley
To: personal-kdbplus@googlegroups.com
X-Mailer: Apple Mail (2.1257)
you can’t. q evaluates everything and does variable substitution and =
unlike lisp there no macro substitution.
if you don’t have to many variants for your arg, use it as a symbol (1 =
char less).
could write a custom handler inside .z.pi
create parse tree, replace args to myfunc, execute
but maybe it is easier to overcome the lazyness ;-)
i will use symbol as input and translate to string in myfunc. justwant to get rid of quotation mark for aesthetic reason.. Thanks.On Mar 16, 5:03?pm, Charles Skelton <char…> wrote:> could write a custom handler inside .z.pi> create parse tree, replace args to myfunc, execute>> but maybe it is easier to overcome the lazyness ;-)>>>> On Fri, Mar 16, 2012 at 9:47 AM, Felix Lungu <felix.lu…> wrote:> > you can’t. q evaluates everything and does variable substitution and> > unlike lisp there no macro substitution.>> > if you don’t have to many variants for your arg, use it as a symbol (1> > char less).>> > On 16 Mar 2012, at 10:25, bigbug wrote:>> > > Hi, all>> > > I have the function which accept string as its input , I key in q> > > console such as : ?myfunc “GOOG” ; it works well, but I am lazy and> > > don’t want to entry the double quotation marks, I would like q do the> > > job by such syntax: ?myfunc GOOG .>> > > So how to let q accept that ?>> > > Thanks,> > > Halley>> > > –> > > You received this message because you are subscribed to the Google> > Groups “Kdb+ Personal Developers” group.> > > To post to this group, send email to personal-kdbplus@googlegroups.com.> > > To unsubscribe from this group, send email to> > personal-kdbplus+unsubscribe@googlegroups.com.> > > For more options, visit this group at> >http://groups.google.com/group/personal-kdbplus?hl=en.>> > –> >
Submitted via Google Groups</felix.lu…></char…>
you still need to put `GOOG
half lazyness?