I’m sorry. I guess I was being a bit, um, pedantic.
The ‘k’ prefix is a convention in Macintosh programming, (or at least it used to be). It indicates that a variable is a “constant,” which I use simply to mean that the property should be treated as read-only. I use ‘c’ to indicate a ‘character’, as opposed to a multi-character string ‘s’, an array or list ‘a’, a boolean ‘b’, etc. I am in the habit of using such conventions in particular situations, but I probably shouldn’t when posting to this list.
kcAsc0 == constant character ASCII 0
The point was simply to create a “sentinal”, that is, a value that was not likely to exist in your data. When you can insert a unique character into a string, it can often be used to speed up certain kinds of string-processing. The point of placing it into a script property instead of a variable was to avoid using the “ASCII character” command during the execution of the script, (it’s quite slow to repeatedly call a scripting addition command). Commands set to script properties are executed when the script is compiled, and not when the script is run.
Um… d, e, and f are the characters that follow a, b, and c in the alphabet.
I was just showing an example string, like yours:
“One two three 1234 four five 890 six 56 seven eight nine.”
I just wanted to show how the null character was being used in the script with the example string, such that when my comment showed:
→ loop 1: “abc ~1~23 def”
you would know to interpret it as:
→ loop 1: "abc " & ascii character 0 & “1” & ascii character 0 & …
It looks like I was being more helpful without comments…