This is a vector of 512 characters (128 words) for use with TRTEST. The vector is entirely filled with zeroes to begin with. You may then put non-zero values in the positions that correspond to the characters you wish to scan for. You are expected to return the table to its original state after you are finished with the testing process. Note that you must also restore the table before calling any other routine that might use it, e.g. SCAN.
/* Scan for a blank or end of string */ fndspace(string) { auto pos; extrn .trt0; lchar(.trt0, ' ', 1); lchar(.trt0, '*e', 1); pos = trtest(string, 0, .trt0); lchar(.trt0, ' ', 0); lchar(.trt0, '*e', 0); return(pos); }
Copyright © 1996, Thinkage Ltd.