CompuServe Thread

parse var problem

3 messages in this thread
#43171From: John Toebes/SYSOPOct 17, 1994 1:06 PM
I'm modifying an Arexx script; here's a line I need to change, and I don't remember enough arexx to know what I'm doing… any advice? > parse var rcvdstr . 'Annex address is ' a '.' b '.' c '.' d '.'. > host_ip = a||'.'||b||'.'||c||'.'||d > say 'The Annex address is :'||host_ip||':' rcvdstr is a string received over the serial port. I *think* what this bit of code does is remove the 'Annex address is' and puts the values for a,b,c, and d into host_ip. (like this: a.b.c.d). This is what I want, but I will never get the "Annex address is ' from the serial port.. what I expect to get is: > SL/IP session from (198.69.219.3) to 198.69.219.23 beginning…. and I need to extract those two numbers from that string. Like I said, any advice? "…I'm obnoxious and disliked…" John Adams '1776' Eet
#43179From: Charles BlaquiereOct 17, 1994 8:25 PM
How about this? parse var rcvdstr . 'SL/IP session from (' firstaddr , ') to ' secondaddr, ' ' . I used commas at the end to split the code into multiple lines, in order to make it more readable. You can code the parse statement in one long line if you wish. Blaq!
#43180From: John Toebes/SYSOPOct 17, 1994 9:17 PM
THANKS! I'll try it! "…I'm obnoxious and disliked…" John Adams '1776' Eet