× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi Peter,

I see two solutions that do the job, but do not explain why your code
doesn't work.  The problem is that CHECK and CHECKR look for the first
character that is NOT in the "search" string.  The CHECK for a blank starts
at the beginning and looks for the first character that is non-blank, which
is of course the first character in your example, so it results in BLANKPOS
= 1.

The CHECKR for a '/' starts at the end and looks in reverse for the first
non-slash character, which is of course the last character, hence the
DASHPOS = 256.

What would be useful here is %SCANR or SCANR -- scan in reverse.

hth,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax


----- Original Message -----
From: <Peter_Vidal@pall.com>
Sent: Tuesday, February 05, 2002 12:39 PM
Subject: Find the rightmost character ('/') on an address link
> For example, I have a link like this:
> NPR-SERVER-NT/SCANNING/Common/Steve%20Maher/EAR90881/AC9012F1240Y6.B.HPGL

> I need to just get the file name only.  However, I am trying to use the
CHECKR
> and CHECK commands to "surround" the file name but apparently I can't make
it to
> work.
>
> (DRLINK is 256 char long:)
>
> '/'           Checkr    drlink        DashPos
> ' '           Check     drlink        BlankPos
>               Eval      Link_File_Name =
>                         %subst(drlink:
>                         DashPos + 1:
>                         (BlankPos - 1) - DashPos)
>
> The results are:
> DASHPOS = 256
> BLANKPOS = 1



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.