RE Substr 
Author Message
 RE Substr

Hi again,

I am wrtting a pm Front end for tar.gz with DrDialog and Rexx,
Under OS/2 Warp- at present it should be able to run under both Rexx and
ORexx, it works ok, except
the dir search (to select a dir to unarchive into)
To start with I made so a double click on a directory
would give you a listing of all Directories and Sub-dirs
this, as you would imagine took to long!  I am now trying to get it to
go down one directory level at a time (on Double click and give that new
directory level a unique Label(value,
eg Dirloop1, dir loop2...) So I can use a button to go back up
the structure....(does that make sense....)

So Far the code looks like this:

/* First lets get the last dirs name */
LPD1=SelectDir_2.Item( SelectDir_2.Select() )
D1 = LastPos('\', LPD1)
D2=  Left()    

DirOnlyA = Substr(LPD1, D1 + 1)
/* Now get the path only */
UAPathOnly=Substr(LPD1, -3) /* this will never work like this */

Say DirOnlyA

say UAPathOnly

CALL UnarchDialog2.SelectDir_2.Delete
Call UpDir_2.enable
NewpathA=Origpath'\'DirOnlyA'\*.*'
RC=SysFileTree(NewpathA, NewDir, DO)
do x=1 to NewDir.0
        call UnarchDialog2.SelectDir_2.add NewDir.x
end
UnarchiveToDir=SubDir1

Any ideas, the simpler the better

--
Regards

Adrian Suri
**************


http://www.*-*-*.com/

The Home of OS/2 Zipmag......
   the mag on the net



Wed, 07 Feb 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. substr() question

2. substr command

3. Substr() question

4. Error on substr-statement in SELECT ....

5. String#substr

6. String#substr ?

7. method substr cannot found

8. Regina substr() performance issue

9. DCL (SUBSTR, INDEX) BUILTIN;

10. DCL (SUBSTR,INDEX) BUILTIN;

11. Strange behavior of substr ???

12. PL/I SUBSTR

 

 
Powered by phpBB® Forum Software