This is a vector of 512 characters (128 words) for use with TRTEST. The vector is entirely filled with one bits to begin with. You may then put zero values in the positions that correspond to the characters you do NOT 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 non blank character */ fndspace(string) { auto pos; extrn .trt1; lchar(.trt1, ' ', 0); pos = trtest(string, 0, .trt1); lchar(.trt1, ' ', -1); return(pos); }
Copyright © 1996, Thinkage Ltd.