Thanks, I've tried this and I'm having some problems. I'm probably not doing things right.
I'm doing something similar to: string filename = "/tmp/xyz"; int fd = open( filename.c_str(), O_RDONLY ); Workspace::load_DUMP( COUT, UTF8_string( filename ), handle, false ); The load seems to succeed, but none of the code in the file seems to be executed. What am I doing wrong here? Or, should I be using InputFile directly? Regards, Elias On 5 August 2014 23:57, Juergen Sauermann <juergen.sauerm...@t-online.de> wrote: > Hi Elias, > > I guess something like that exists already. Have look at > how *)LOAD* works for .*apl *files. There is a stack of file descriptors > for the files read by *Input* and you can push an open file descriptor > onto it. The > only thing that doesn't work is to stop in the middle of a file (unless > you insert > a *]NEXTFILE* command at that point. > > /// Jürgen > > > > On 08/05/2014 05:39 PM, Elias Mårtenson wrote: > > Hello Jürgen, > > What I mean by the somewhat mysterious subject is that I have had a > request to implement (or rather, improve) a feature in the Emacs Mode that > allows a user to evaluate all or part of a file. > > Specifically, what is needed is a way for me to take a set of source > lines (usually a portion of a source .apl file) and pass it to some > function that will load execute those lines in exactly the same manner as > if the content had been saved to a file and then loaded using )COPY. > > Ideally, I would also need the ability to specify the name of the file > and starting line number. This is so that the symbol metadata (filename and > line number) are correct in functions that are defined in this manner. > > Would it be possible for you to implement a function that provides such > interface? > > Regards, > Elias > > >