SET X=$ZYHASH(X) works correctly
Final Release Note
The code SET X=$ZYHASH(X)
where X
is a local variable assigns the result of the function to the variable. Previously it made X undefined. The workaround was to use an intermediate variable, e.g., SET Y=$ZYHASH(X),X=Y
. This was discovered in the YottaDB development environment and never reported by a user. [#757 (closed)]
Description
Test case
YDB>set x=$zut write x," ",$zyhash(x),! set x=$zyhash(x) write x,!
1626286741219359 0xda24b1331e5db559c50815f373617d5d
%YDB-E-LVUNDEF, Undefined local variable: x
YDB>set ^x=$zut write ^x," ",$zyhash(^x),! set ^x=$zyhash(^x) write ^x,!
1626287153158389 0xa15f98fb9fe725dcabf7b46c290a218d
0xa15f98fb9fe725dcabf7b46c290a218d
YDB>write $zyrelease
YottaDB r1.32 Linux x86_64
YDB>
Draft Release Note
The code SET X=$ZYHASH(X)
where X is a local variable does not make X undefined. Previously it did. The workaround was to use an intermediate variable, e.g., SET Y=$ZYHASH(X),X=y
. [#757 (closed)]
Edited by K.S. Bhaskar