[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Rplfil And Apfil



Mr. Holmgren, You're right, there is no obvious reference to these commands as
far as I can tell in any of the XY4 documentation. Fortunately, these commands
were documented in the Signature Programming Language User's Guide (SPLUG) pp
128-129. I will reprint the info here in case you don't have access to this
manual.

The formats of the two commands are: RPLFIL/=FILENAME,NM=STRING
APFIL/=FILENAME,NM=STRING

= is a delimiter FILENAME is the name of the file in which you want to replace
the string NM is unique text that you want XyWrite to search for that
immediately precedes the second delimiter in filename STRING is the text you
want the value for NM replaced with

XyWrite searches filename for a specific line of text (NM=) starting with a
carriage return and replaces anything after the second = with STRING

For example, the following replaces the existing MD BO value in SETTINGS.DFL
with 23

rpfil/=settings.dfl,md bo=23

Result: XyWrite searches the file SETTINGS.DFL for the text "[ASCII 27]md bo="
and replaces the text after the = to the end of the line with "23".

Note: I had to type in [ASCII 27] in lieu of the carriage return character in
this editor on the BBS

Signature Note: The delimiter can be any character, typically = or <. You
cannot use a comma as a delimiter. If a comma appears in the line of text you
are searching for (NM), use an ASCII 6 charcter as the first delimiter. In
this case, XyWrite replaces everything after the second comma with STRING.

For example, the following replaces the contents of macro 1001 with the string,
"NO:"

rplfil/[ASCII 6] settings.dfl,sg=1001,NO

Result: XyWrite searches the file SETTINGS.DFL for the text "SG=1001," and
replaces the existing value from the comma up to the carriage return with
"NO".

I hope you find this useful.

Sincerely, Kevin Duval