var procedure

Hi, KDB FolksI copy this procedure from Shasha’s Kdb+ Database and Language Primerand got an error compiling it:q))var:{x-(avg)*(avg)}'assignCan you give some hint?Thanks,dbtouch

kdb+ blocks overwriting values of keywords

however, you can explicitly overwrite via .q.var:{x-(avg)*(avg)}

or otherwise use a different variable name, e.g.

myvar:{x-(avg)*(avg)}

Date: Wed, 4 Nov 2009 23:14:11 +0200Message-ID: Subject: Re: [personal kdb+] var procedureFrom: Felix LUNGU <felix.lungu>To: personal-kdbplus@googlegroups.comvar is implemented already and it is reserved word.2009/11/4 dbtouch :>> Hi, KDB Folks>> I copy this procedure from Shasha’s Kdb+ Database and Language Primer> and got an error compiling it:>> q))var:{x-(avg)*(avg)}> 'assign>> Can you give some hint?>> Thanks,>> dbtouch> >></felix.lungu>

I am cool with that.On Nov 4, 4:08?pm, dbtouch <dbto…> wrote:> Hi, KDB Folks>> I copy this procedure from Shasha’s Kdb+ Database and Language Primer> and got an error compiling it:>> q))var:{x-(avg)*(avg)}> 'assign>> Can you give some hint?>> Thanks,>> dbtouch</dbto…>