Control characters
Posted in 1995
>: Will this do it for you? > >: main > graeme asks: >Did you actually test your code? > >I thought the whole point was that your insert/select pair wouldn't work >if bar was CHAR and contained "^M". Even if it works for CHAR(1) are >you sure it works for longer columns? Yes. Everything works with char(1) or char(1+n). ...everything except PROMPT, and isql forms (I didn't try a 4gl screen, I would suspect that it won't work either. I think the original poster must have had a problem with user input, because I can: create cntl characters (let a_char = ascii(12) ) I can add it to a table. I can select it from a table. I can compare them (when input_txt = a_char) I can display it I tested this with the statement "DISPLAY contrl_l" and ran the program like this: test.4ge > junk junk shows the '^L' Someone else suggested something like this: Have the user input '^L' then test like this: DEFINE contrl_l CHAR(1) LET contrl_l = ASCII(12) CASE # . # . when (input_txt = "^L") let new_txt = contrl_l # . # . END CASE display new_txt #( or output to report or something) -- || ======= **** **T* ======= ||John Regep || **** **** ||Store Systems Developement || **** *R** ||Kmart Corporation || =========== ********* =========== ||3100 West Big Beaver || ***A* **** ||Troy, MI 48084 || **** **** ||(810) 643-5078 ||=============== *M** **** ===============||uunet!kmart!jregep