1. Re: include limit

> Is there a limit to how many files can be included, and if so; is
> there a way to push this limit?

I've discovered the nested include files are limited to a depth of about
10.  At the time, I was trying to work out how to do an unlimited number
of dynamic includes in an interactive Euphoria shell.

> Anyone with a clue, please give me a hint.

Rob could probably increase this number, but I doubt he has ever decreased
it, so I don't see why existing programs wouldn't work.

> Best Regards,
>
> Tor Gausen

An example of a program running into this limit is Rod Jacksons E!
interactive interpreter.  You can only type 11 statements before running
into the "includes are nested too deeply" error...  Rod might have to find
a different way of dynamically generating code. (if he does, please
share it!)

---------------------------
E!
Interactive Euphoria interpreter

Created May 18, 1999 by Rod Jackson

Based on the Euphoria programming language
from Rapid Development Software

 > ? 1+1
2
 > ? 2+2
4
 > ?3+3
6
 > ?4+4
8
 > ?5+5
10
 > ?6+6
12
 > ?7+7
14
 > ?8+8
16
 > ?9+9
18
 > ?10+10
20
 > ?11+11
\xq000009.e:3
includes are nested too deeply
include \xq000010.e
                  ^

-------------------------------
here's the code for my little interactive Euphoria shell:
-- shell.ex
integer i, fn
i = 0
global procedure input()
    integer fn
    puts(1, "Eu> ")
    fn = open(sprintf("sh%06d.tmp",{i}),"w")
    i += 1
    printf(fn, gets(0) & "input()\ninclude sh%06d.tmp\n",{i})
    close(fn)
end procedure

input()

include sh000000.tmp
------------------------------------

Later,
 _______  ______  _______  ______
[    _  \[    _ ][ _   _ ][    _ ]
[/| [_] |[/| [_\][/ | | \][/| [_\]
  |  ___/  |  _]    | |     |  _]
[\| [/]  [\| [_/] [\| |/] [\| [_/]
[_____]  [______] [_____] [______]
xseal at harborside.com  ICQ:13466657
http://www.harborside.com/home/x/xseal/euphoria/

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu