Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bbn!rochester!rutgers!ames!sdcsvax!ucbvax!Mipl3.JPL.Nasa.GOV!kka059 From: kka059@Mipl3.JPL.Nasa.GOV Newsgroups: comp.os.vms Subject: TPU Range (In)equality Message-ID: <870917081437.01q@Mipl3.JPL.Nasa.Gov> Date: Thu, 17-Sep-87 11:14:37 EDT Article-I.D.: Mipl3.870917081437.01q Posted: Thu Sep 17 11:14:37 1987 Date-Received: Sun, 20-Sep-87 11:42:14 EDT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 46 If anyone has mastered (at least more than I have) the arcane world of TPU variables, I have a question for you... My goal is to find a target string if if it exists in the current line. To do so, I set up the following TPU code: target := 'xyz'; ! In real life this is variable pat1 := target | LINE_END; pat2 := LINE_END; target_range := search (pat1, FORWARD, EXACT); eol_range := search (pat2, FORWARD, EXACT); if target_range = eol_range then message ("String not found"); else message ("Target found"); endif; What I can't figure out is why the only response that I can get from that code is "String not found" when the two ranges are distinctly different. I've also tried setting "pat1 := '' & (target | LINE_END);", that doesn't do what I want either. My question is: What constitutes (in)equality of ranges? How should I set up my patterns to find what I am looking for and take two different actions on the basis of what is found? As usual, please reply directly to me and I will summarize to the net. +----------------------------+------------------------------------------+ | Kurt Andersen | Jet Propulsion Laboratory | | MIPL Applications | Mail Stop 168-427 | | Programmer | 4800 Oak Grove Drive | | Office: 169-425 | Pasadena, Calif. 91109 | +----------------------------+-------------------------+----------------+ | NETWORKS: | "The time has | | SPAN: Mipl3::KKA059 (5.153) | come," the | | ARPA Internet: KKA059@Mipl3.Jpl.Nasa.Gov | walrus said, | | Internet Address: [128.149.1.28] | | | ARPAnet->SPAN: KKA059%Mipl3@Su-Star.Stanford.Edu | "to speak of | | or: KKA059%Mipl3.Span@Jpl-Vlsi.Arpa | many things: | | Ma Bell (R.I.P.): (818) 354-1672 | of patterns | +------------------------------+-----------------------+ and ranges, | | (Apologies to the author) -> | and variables, of TPU and things..." | +------------------------------+----------------------------------------+