Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Extra libraries, Code snippets, applications etc. » U++ Esc Interpreter, Esc Macros and templates » Esc: how to use recursion?
Esc: how to use recursion? [message #3105] Sun, 07 May 2006 14:58 Go to next message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior Veteran
Administrator
Esc: how to use recursion?
If I use a function name from inside to call itself, it doesn't work for me...
"self(arg1)"? - no success... Any tricks?

[Updated on: Sun, 07 May 2006 14:58]

Report message to a moderator

Re: Esc: how to use recursion? [message #3129 is a reply to message #3105] Mon, 08 May 2006 13:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 11179
Registered: November 2005
Ultimate Member
fudadmin wrote on Sun, 07 May 2006 08:58

Esc: how to use recursion?
If I use a function name from inside to call itself, it doesn't work for me...
"self(arg1)"? - no success... Any tricks?


It should work. Well, one thing - there is a limit on recursion depth (50 stack frames).

There is also a limit number of total EscValue values existing at one moment (one milion). Breaking those limits ends in "out of memory" errors.

Mirek
Re: Esc: how to use recursion? [message #3135 is a reply to message #3129] Mon, 08 May 2006 18:11 Go to previous message
fudadmin is currently offline  fudadmin
Messages: 1298
Registered: November 2005
Location: London, UK
Senior Veteran
Administrator
luzr wrote on Mon, 08 May 2006 12:44

fudadmin wrote on Sun, 07 May 2006 08:58

Esc: how to use recursion?
If I use a function name from inside to call itself, it doesn't work for me...
"self(arg1)"? - no success... Any tricks?


It should work. Well, one thing - there is a limit on recursion depth (50 stack frames).

There is also a limit number of total EscValue values existing at one moment (one milion). Breaking those limits ends in "out of memory" errors.

Mirek


Yes, it works. I think the problem was related to global vars "declarations"...
Previous Topic: How to declare a global var without id in *.upt?
Next Topic: Esc: maps nested in arrays and vice versa - underdevelopment or a bug?
Goto Forum:
  


Current Time: Mon Dec 11 15:53:02 CET 2017

Total time taken to generate the page: 0.02372 seconds