Path: utzoo!attcan!uunet!snorkelwacker!apple!portal!cup.portal.com!MJB From: MJB@cup.portal.com (Martin J Brown-Jr) Newsgroups: comp.lang.rexx Subject: arexx variable substitution Message-ID: <30411@cup.portal.com> Date: 1 Jun 90 11:51:39 GMT Organization: The Portal System (TM) Lines: 42 I'm having this problem with variable substitution in arexx commands. In this first code segment the variable "i" gets properly drawn into the "show()" command: --------- code seg #1 ------------------------------------ /* tests for number of TxEd's currently running */ do i = 1 to 10 /* assume there won't be 10 editors running */ z = show("P","TxEd"i) /* translates to show("P","TxEd1"), TxEd2, etc. */ if z = 0 then break end ----------------------------------------------------------- /* assume there are 3 editors running, TxEd1, TxEd2, TxEd3 */ /* therefore, when "break" occurs i=4 */ /* --------- continuing ------------- */ address command e /* this will start a new editor, which will be TxEd4 */ /* NOW COMES THE PROBLEM */ address 'TxEd'i 'LOA' a /* loa = load, a = filename arg */ ^^^^^^^^ I can't get this substitution to work Have any ideas how to make this work? I think I've tried everything...well, hopefully not ;-> Actually, I was surprised the substitution in the first code seg worked. Even if you use a variable for the address, the address command won't work. k = 'TxEd4' address k 'LOA' a /* doesn't work */ Any help would be appreciated! - MJB - USENET: mjb@cup.portal.com