You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The k2.8 parser is recursive:
k2.8 defines globals that are contained in a function as the function is being parsed.
This may not be a bug in Kona, nor a critical difference between k and Kona,
but I thought it was worth documenting the difference.
$ rlwrap -n ./k
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.
abc:{3+def(x)}
\v
def abc
def 5
5
$ rlwrap -n ./k
kona \ for help. \\ to exit.
abc:{3+def(x)}
\v
,`abc
def 5
value error
def
^
The text was updated successfully, but these errors were encountered:
But, there are boundary cases were k2.8 and Kona both define a global contained in a function. Since "global assignment" (::) is not used, you might guess that "def" is local to the function "abc".
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.
abc:{def,:2}
\v
def abc
def
abc 5
def
(;2)
$ rlwrap -n ./k
kona \ for help. \\ to exit.
abc:{def,:2}
\v
`abc `def
def
abc 5
(;2) /note: Kona displays a result here, where k2.8 does not
def
(;2)
The k2.8 parser is recursive:
k2.8 defines globals that are contained in a function as the function is being parsed.
This may not be a bug in Kona, nor a critical difference between k and Kona,
but I thought it was worth documenting the difference.
The text was updated successfully, but these errors were encountered: