Skip to content

Commit 4ecf719

Browse files
authored
Merge pull request #403 from gyorokpeter/handle_zero
improve details on handle 0
2 parents 006784b + f8d88bb commit 4ecf719

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

docs/basics/handles.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,21 +51,20 @@ A handle is an [applicable value](glossary.md#applicable-value). It (and its neg
5151

5252
### Console
5353

54-
Where `h` is 0 and `x` is a string or parse tree, evaluates `x` in the main thread and returns the result.
54+
Where `h` is 0 and `x` is an object, evaluates [`.z.ps`](../ref/dotz.md#zps-set) (which defaults to [`value`](../ref/value.md)) on `x` and returns the result.
5555

5656
```q
5757
q)0 "1 \"hello\"" /string
5858
hello1
5959
60-
q)0 (+;2;2) /parse tree
60+
q)0 (+;2;2) /application in list form
6161
4
6262
```
6363

64+
In kdb+ versions up to 4.0, the expression is evaluated in the current thread, which means it is subject to the restrictions on secondary threads when used in [`peach`](../ref/each.md). Starting from kdb+ version 4.1, attempting to use handle 0 in a thread other than the main thread results in a [`nosocket`](errors.md#nosocket) error.
65+
6466
:fontawesome-solid-book:
65-
[`eval`](../ref/eval.md)
66-
<br>
67-
:fontawesome-solid-book-open:
68-
[Parse trees](parsetrees.md)
67+
[`.z.ps`](../ref/dotz.md#zps-set), [`value`](../ref/value.md)
6968

7069

7170
### File, stdout, stderr

0 commit comments

Comments
 (0)