It's C#. This should've been obvious from the preceding posts.
It takes the scriptLine variable (which seems to be a string) and splits it up, using spaces as the cutoff points, and removing all the empty bits (that is, "a b c" will become {a, b, c} and not {a, , b, c}). The resulting set is put in keywords. It then takes the first item in keywords and determines what to do depending on that. If it's "jump", it prepares a thing to search for by taking the second keyword and putting ": " in front of it. It then loops through what seems to be a list of strings, starting at the beginning until the end, in single steps, to find the first line that matches the thing we just prepared (labelName). Once found, a scriptPointer property is reset to the point we found, and we break the loop. The final break is to prevent the "jump" case from falling through to the next one.
What we can infer from this is that the script is stored as a set of lines (be it Array or List is irrelevant here), and there's a scriptPointer that indicates where execution is at. This is not a pointer in the C sense, because those are frowned upon in .Net -- it's just an integer indexing into the script array.
|