cancel
Showing results for 
Search instead for 
Did you mean: 

Is this behavior expected?

kuentang
New Contributor

 

 

KDB+ 3.3 2015.11.03 Copyright (C) 1993-2015 Kx Systems    

 

                                                          

q)f:{x}                                                   

q).[f;(),1]                                               

1                                                          

q).[f;(),1;{`$x}]                                         

1                                                         

q).[`f;(),1]                                               

1                                                         

q).[`f;(),1;{`$x}]   / imho: this should not throw an error

'type                                                     

 

Kim                       

 

2 REPLIES 2

quintanar401
New Contributor
Yes, .[fn;arg;errFn] is a catch block and it requires a real fn not its name,  otherwise the meaning of this statement would be unclear - is it a catch block or unary function application to the global:

f:{x}
.[`f;();{x 1}]

q)f
1

WBR, Andrey Kozyrev.

суббота, 9 января 2016 г., 20:03:17 UTC+3 пользователь kuentang написал:

 

 

KDB+ 3.3 2015.11.03 Copyright (C) 1993-2015 Kx Systems    

 

                                                          

q)f:{x}                                                   

q).[f;(),1]                                               

1                                                          

q).[f;(),1;{`$x}]                                         

1                                                         

q).[`f;(),1]                                               

1                                                         

q).[`f;(),1;{`$x}]   / imho: this should not throw an error

'type                                                     

 

Kim                       

 

Yes, the night was too long and forgot that dot with three arguments can also mean functional application.

 

Actually this breaks my bt library:  https://github.com/kimtang/btlib-bt

 

Thanks,

 

Kim

 

Von: personal-kdbplus@googlegroups.com [mailto:personal-kdbplus@googlegroups.com] Im Auftrag von Andrew Kozyrev
Gesendet: Montag, 11. Januar 2016 11:51
An: Kdb+ Personal Developers
Betreff: [personal kdb+] Re: Is this behavior expected?

 

Yes, .[fn;arg;errFn] is a catch block and it requires a real fn not its name,  otherwise the meaning of this statement would be unclear - is it a catch block or unary function application to the global:

 

f:{x}

.[`f;();{x 1}]

 

q)f
1

 

WBR, Andrey Kozyrev.


суббота, 9 января 2016 г., 20:03:17 UTC+3 пользователь kuentang написал:

 

 

KDB+ 3.3 2015.11.03 Copyright (C) 1993-2015 Kx Systems    

 

                                                          

q)f:{x}                                                   

q).[f;(),1]                                               

1                                                          

q).[f;(),1;{`$x}]                                         

1                                                         

q).[`f;(),1]                                               

1                                                         

q).[`f;(),1;{`$x}]   / imho: this should not throw an error

'type                                                     

 

Kim                       

 

--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to personal-kdbplus+unsubscribe@googlegroups.com.
To post to this group, send email to personal-kdbplus@googlegroups.com.
Visit this group at https://groups.google.com/group/personal-kdbplus.
For more options, visit https://groups.google.com/d/optout.