You can use
if text[xxx]
...
endif
If you want to compare two long text variables use the statement "CompareText".