[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: XPL question: offset into a string?
- Subject: Re: XPL question: offset into a string?
- From: Harry Binswanger hb@xxxxxxxx
- Date: Tue, 9 Jan 1996 06:02:10 -0500
At 11:15 PM 1/8/96 GMT, you wrote:
>Is there any way of pulling a substring from a string in XPL by an
>offset, rather than using the XS command. That is, if I have the string
>"hello there", could I get the "there" into it's own variable just by
>knowing that the 't' is offset in by 7 characters? In this particular
>case I could use XS to divide the string into what is before and after
>the space, but I want to do something far more involved (which I won't
>waste your time with). Basically I want the equivalant of Basic's MID$.
>
>Thanks.
Charles:
Joe Solla's suggestion is supposed to work, but doesn't if there's a space
in the string involved.
If you have FTP capability, you can pick up XYBASIC.ZIP from this server's
site. Unzip XYCOMP.EXE--it allows you to use MID$ directly--as well as LEFT$
and RIGHT$ and virtually the whole BASIC language, adapted to Xy. Short of
that, I could post the routine I wrote to accomplish the MID$ translation,
but it's a bit awkward to do without the context of xycomp.exe.
Regards,
Harry Binswanger
hb@xxxxxxxx