recursive structures NOT recursive 
Author Message
 recursive structures NOT recursive

Hi,

I've a problem with a programming language which doesn't allow
recursive calls. (here: I want to read a directory structure with
all subdirectories in word-basic.)

Thus I have to solve the program task with for, while, if and
other ordinary commands.
Does anyone have a solution?

-Dirk

P.S.

 function Recursive1(param)
 if param < 2 then Recursive1(param+1);end
 /* functional part: e.g. read directory structure with all subdirectories */
 Recursive1=Number_of_subdirectories
 end function



Sun, 15 Apr 2001 03:00:00 GMT  
 recursive structures NOT recursive

Quote:
>I've a problem with a programming language which doesn't allow
>recursive calls. (here: I want to read a directory structure with
>all subdirectories in word-basic.)

>Thus I have to solve the program task with for, while, if and
>other ordinary commands.
>Does anyone have a solution?

What happens when you try?  I've never had a problem with recursive calls in
Word Basic.  If you're running out of memory or stack space, you probably
have the ending condition wrong.

Tom Lake



Sun, 15 Apr 2001 03:00:00 GMT  
 recursive structures NOT recursive

Quote:

>>I've a problem with a programming language which doesn't allow
>>recursive calls. (here: I want to read a directory structure with
>>all subdirectories in word-basic.)

>>Thus I have to solve the program task with for, while, if and
>>other ordinary commands.
>>Does anyone have a solution?

>What happens when you try?  I've never had a problem with recursive calls in
>Word Basic.  If you're running out of memory or stack space, you probably
>have the ending condition wrong.

>Tom Lake

Word tells me that the macro-function I want to call is already
running if I use the notation
  call macro-name.function-name(parameter)
If I'm using
  function-name(parameter)
as call it's just not called and no warning appears.

Probably an example would help me out.

Ah, by the way: I'm using Winword 7.0.

-Dirk



Sun, 15 Apr 2001 03:00:00 GMT  
 recursive structures NOT recursive
To solve this you must call interrupts. If DOS, you must set up a user
defined type, and pass dir info into such a variable. If Win95 use an
integer to save the file handle for long file name searches. Place these
in an array. If the file attribute indicates a directory, increment to
the next element in the array, and start over. When at the end of a
subdirectory, decrement the array element and continue where the parent
directory left off.

Quote:
>Hi,

>I've a problem with a programming language which doesn't allow
>recursive calls. (here: I want to read a directory structure with
>all subdirectories in word-basic.)

>Thus I have to solve the program task with for, while, if and
>other ordinary commands.
>Does anyone have a solution?

>-Dirk

>P.S.

--
http://cust.iamerica.net/mcdivitt/


Sun, 15 Apr 2001 03:00:00 GMT  
 recursive structures NOT recursive
Sorry if duplicate. I didn't see it come back across.

To solve this you must call interrupts. If DOS, you must set up a user
defined type, and pass dir info into such a variable. If Win95 use an
integer to save the file handle for long file name searches. Place these
in an array. If the file attribute indicates a directory, increment to
the next element in the array, and start over. When at the end of a
subdirectory, decrement the array element and continue where the parent
directory left off.

Quote:
>Hi,

>I've a problem with a programming language which doesn't allow
>recursive calls. (here: I want to read a directory structure with
>all subdirectories in word-basic.)

>Thus I have to solve the program task with for, while, if and
>other ordinary commands.
>Does anyone have a solution?

>-Dirk

>P.S.

--
http://cust.iamerica.net/mcdivitt/


Sun, 15 Apr 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Reading structure of directories (recursive)

2. Passing large data structures in recursive functions

3. Save/Load Hierarchical Recursive Structure to String

4. Recursive sub will not work??

5. Recursive Recordsets

6. Cascading Delete for Recursive Relationship

7. recursive copy and deletion of directories

8. Recursive scanning filesystem

9. Recursive Dir Function required

10. recursive Searching only once through a document

11. Recursive calls with a delegate

12. Recursive Control Searching - Page.FindControl

 

 
Powered by phpBB® Forum Software