There is an interesting current thread on Twitter about the use of locals vs. scalars. Stata experts won't be surprised with the content, but those with lower levels of expertise (e.g. me) may find this to be a particularly valuable reminder.
The thread is at https://twitter.com/nomadj1s/status/1143505196775104512
The thread's essence is
The thread is at https://twitter.com/nomadj1s/status/1143505196775104512
The thread's essence is
Code:
. do "/var/folders/d5/6w9t_lzx3plbpmk6zpyz93dm0000gp/T//SD05991.000000" . local j=-2 . di `j' -2 . local i=`j'^2 . di `i' -4 . local i=(`j')^2 . di `i' 4 . scalar k=-2 . di k -2 . di k^2 4 . end of do-file
Comment