More syntax highlighting woes
BlitzMax Forums/BlitzMax Programming/More syntax highlighting woes
| ||
Using the highlight function, the following test (If (Keywords[i] = test)) never validates. Any idea why? (I know it's case sensitive ATM) Global Keywords:String[] = ["Print","If", "Then", "Else"] Function highlight:Int(test:String) For Local i:Int = 0 To Keywords.length-1 If (Keywords[i] = test) Return True End If Next Return False End Function |
| ||
You should save your keywords in lower case and test it this way if (keywords[i] = test.tolower() ) otherwise you might run into case problems. |
| ||
Yeah. Discovered that to seconds after posting. Thanks anyway :) |