tag:blogger.com,1999:blog-5959624822312939768.post3896167914353568628..comments2019-08-01T03:21:19.402-07:00Comments on SACG Blog: What is a Scratch Variable in IBM SPSS Statistics Syntax? by Keith McCormickStatistics & Analytics Consultants Grouphttp://www.blogger.com/profile/09473022702558365771noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5959624822312939768.post-78365547128407386822011-12-07T13:35:06.112-08:002011-12-07T13:35:06.112-08:00Thanks Jon ... I have explicitly initialized a scr...Thanks Jon ... I have explicitly initialized a scratch variable, I think. I didn't know about point 2. You've just saved me a step.Keithhttps://www.blogger.com/profile/17249699546150076717noreply@blogger.comtag:blogger.com,1999:blog-5959624822312939768.post-60657456694459073712011-12-07T06:22:44.620-08:002011-12-07T06:22:44.620-08:00Three additional points:
1. Scratch variables isol...Three additional points:<br />1. Scratch variables isolate the code that uses them from the variables in your dataset. Since scratch variables are never part of the "real" data, you can be confident that you are not overwriting a permanent variable.<br /><br />2. They are automatically initialized to 0 or blank, according to type.<br /><br />3. These variables are not reset when a case is read, so they are handy for constants and accumulators as well as things like loop indexes.Jon Peckhttps://www.blogger.com/profile/16443075230127258437noreply@blogger.com