logoalt Hacker News

chasilyesterday at 8:16 PM1 replyview on HN

Awk also says it's 12.

  awk 'BEGIN{a=5; a = a++ + ++a; print a}'
  12

Replies

kencauseyyesterday at 9:19 PM

https://www.gnu.org/software/gawk/manual/gawk.html#index-pre...

"When side effects happen is implementation-defined. In other words, it is up to the particular version of awk."

show 1 reply