Gotchas: Difference between revisions

m
→‎{{header|J}}: another gotcha - including a rosettacode wiki gotcha
(→‎{{header|J}}: more gotchas)
m (→‎{{header|J}}: another gotcha - including a rosettacode wiki gotcha)
Line 232:
B=: 999 NB. legal
B 0} A NB. functional array update (does not change A)
NB. the use of a single brace to denote indexing might also confuse people
999 3 5 7 11
0} A NB. legal
Line 263 ⟶ 264:
7
2*3+1 NB. processed right-to-left
8</syntaxhighlight>
8
 
=={{header|jq}}==
Line 367 ⟶ 368:
 
Like with branches, putting a <code>NOP</code> after a load will solve this problem.
 
=={{header|Perl}}==
Perl has lists (which are data, and ephemeral) and arrays (which are data structures, and persistent), distinct entities but tending to be thought of as inter-changable. Combine this with the idea of <i>context</i>, which can be 'scalar' or 'list', and the results might not be as expected. Consider the handling of results from a subroutine, in a scalar context:
6,951

edits