Re: include on the fly?
- Posted by Irv Mullins <irvm at ellijay.com> Aug 11, 2001
- 485 views
----- Original Message ----- From: John McAdam <johnmcadam at clix.pt> Subject: include on the fly? > > Hi there, > I want to write a program that can include a file on the fly > something like this: > > s=prompt_string("What is the file to run?") > include s > > This should work in the interpreted mode, but of course not > in the compiled mode. The interpreter should just keep on > doing its thing with the newly included file. > > But he returns the error "s not found". The include command > apparently only works for literal strings, not varables. > > I'm probably coming at it from the wrong direction, but it > seems to make sense to me. Your observation is correct, it only works on 'literal' strings. You might try something like: (pseudo code follows) copy file s => "IncludeMe.e" include IncludeMe.e Regards, Irv