I'm writing some axlSkill that reads the variants.lst file. Originally posted in cdnusers.org by AshCan
The statement xx = infile("variants.lst") opens the file for reading.
The statement gets(s xx) gets the first line written to a string object s.
Now I'm trying to use a getchar call to look at each character of the string and then decide what to do with the line. Specifically I'm looking for strings that start with "(" (for example).
I try getchar(s 1) == "(" hoping for a return value of t. But even though the first character of string s is ( the getchar call returns nil.
I'm guessing there is an easy way to parse a string and I haven't found it.