Re: slurp-file



z0d wrote:
Matt wrote:

Hi, I'm new and I'm trying to load a file into a string and return it, but this just returns an empty string. I guess the array is going out of scope? How should I write this?

Maybe it will be interesting for you: http://www.emmett.ca/~sabetts/slurp.html

Yeah, I saw that one, thanks. Looking at the last version on there, I guess I don't need the call to (values) at the end. I guess I knew that, but damn! It's hard to remember all the rules sometimes! :-)

Matt
.



Relevant Pages

  • Re: slurp-file
    ... but this just returns an empty string. ... I guess the array is going out of scope? ... Wade ...
    (comp.lang.lisp)
  • Re: slurp-file
    ... Wade Humeniuk wrote: ... but this just returns an empty string. ... I guess the array is going out of scope? ...
    (comp.lang.lisp)
  • Re: Is it possible to use the value of the PROGRAM ID within the source code?
    ... Until the universal availability of scope terminators there were ... But 'reusability' is not a unique feature of OO design. ... remain and some are now garbage. ... A tree can be made faster by increasing its width; an array ...
    (comp.lang.cobol)
  • Re: Packages and returning errors
    ... > array intact. ... sub is_a_instance_method { ... my $class = shift; ... You need to fix the scope of $error by moving its declaration outside ...
    (comp.lang.perl.misc)
  • Re: Postscript questions
    ... It looks as if you believe the curly braces are defining a scope. ... Curly braces are behaving much more like the square brackets, the array "delimiters". ... The difference is deferred execution, ... Evaluating an executable name means that the interpreter searchs the name through the dictionnary stack and when found, evaluate the value associated with the name. ...
    (comp.lang.postscript)