RS> I have a question that I've been "fighting" for quite some time.
RS> I am trying to extract a pathname from a *.DAT file. This pathname is
RS> called out as a directory (ie C:\BBS), but in the dat file, it is decl
RS> a "STRING * 81". How can I "strip" the spaces from the right? I have t
RS> RTRIM$ (among others) with no luck at all. What I need to be able to d
RS> to use the directory name & "tack on" a filename.
Are you sure the characters on the right are spaces? It doesn't sound
like it. Use LIST or your favorite program that will show the hex code
values (you could even do it in PB, a FOR loop along the string) and
see what the ascii values are. They may be TABS or NULL (chr$(0)).
If so, then I believe the syntax is, assuming it was the null,
x$=rtrim$(x$,chr$(0))
if its a mix and match you will have to do them one at a time, unless
the rtrim$ supports the ANY option. ie:
either
x$=rtrim$(x$,any chr$(0,9))
or
x$=rtrim$(x$,chr$(0))
x$=rtrim$(x$,chr$(9))
i don't have my manual handy and this mail program doesn't let me shell
out (or i just don't know the command) or i'd look it up and make sure
its right. I think you can get the jist of it though... eric
--- QM v1.00
---------------
* Origin: Creekside Manor (805) 484-8016 CdCom Support BBS (1:206/2512.0)
|