Note that within each iterations of the loop, the values of col and ncol are changing. Since the program prints the results in a continuous row, instead of adding new line for each iteration, the program has to monitor the user's linesize. This is one of the reasons that shows the importance of specifying the expected Stata version in the program. the _continue_ option is not supported in Stata 13, however the program is working correctly, because it reminds Stata to work with Stata 9.2 framework. and eversince, smcl markup has been changing. Note that the program is written for Stata version 9.2.
Once you read that article, you notice that the two macros, col and ncol define the positions of "`i'" and `""' will take the value of `i' and returns its corresponding ascii character. So go a head and read that article if you haven't read it already. When I started writing about Stata programming, I began with writing about SMCL Markup Language because using SMCL in the program can be super confusing if you are not familiar with how Stata uses this markup language to print results and create tables.
Next, the author defines a new macro, called ncol which I guess means "Next Column." The author will use this macro along with the col macro to define the place of the each ascii number and its corresponding character.
Look at the code carefully and try to make sense of it as much as you can. So let's have a look at the whole program before explaining it part by part.
So the program is pretty simple but still it can teach you how to define value in the syntax, how to run a loop and print the results, and more interestingly, how to neatly organize the results in rows without exceeding the line size of Stata. And if the results line exceeds the Stata's line size, begins a new row.prints the ascii numbers and characters in a row as long as they are less than the Stata line size.checkes the linesize to stay within the linesize of the Stata output.prints the ascii number and its corresponding ascii character.Define the default ascii characters (in case the user does not specify the minimum number) to number 33.Define the syntax of the program to return all ascii characters "from the specified number" to 255.The algorithm of the program can be simplified as described below: I will discuss the algorithm and the procedure of the program below. You may look at the upper table to figure out why the user-written package prints the ASCII characters from number 33 which prints the exclamation mark. Other users who have found the question cross-posted are encouraged to share the links as a reply as well.Each of the printed ASCII characters has a corresponding number which are ranging from 33 to 253.