help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with source() ?


From: Daniel Friedman
Subject: Problem with source() ?
Date: Wed, 18 Nov 1998 11:51:30 -0500 (EST)

Note: Subject was "source-ing files vs. entering on cmd line?"
I've changed the subject to address a slightly different question which
must be answered first.

In response to a question on 17-Nov-1998 regarding source-ing files vs.
entering the
script (or its contents, line-by-line) as on the command line, 
JWE and Mario Storti responded, saying that the command I need is
   source ("bar/mstuff.m");

JWE also offered a patch to indicate an error if the script file doesn't
execute properly.

While my original question hasn't yet been answered, let's first clear
up the problem I notice now with the patch applied--namely, the source
command doesn't appear to work for me:

shell-prompt> cat ./scr1.m
eight = 8;
shell-prompt> octave
Octave, version 2.0.13 (i686-pc-linux-gnulibc1).
Copyright (C) 1996, 1997, 1998 John W. Eaton.
This is free software with ABSOLUTELY NO WARRANTY.
For details, type `warranty'.

  octave:1> source("scr1")
  error: source: error sourcing file `scr1'
  error: evaluating index expression near line 1, column 1
  octave:1> source("./scr1")
  error: source: error sourcing file `./scr1'
  error: evaluating index expression near line 1, column 1
  octave:1> source("./scr1.m")
  octave:2> scr1
  octave:3> eight
  eight = 8
  octave:4> quit

It appears the source command just doesn't work at all for me.  Maybe it
never worked, just now I have the error message.  So what's wrong?

BTW: If it makes a difference, I configured Octave with the
--enable-shared and --enable-dl options.

Thanks very much,
--dan
---------------------------------------------------------------------------
 Daniel Friedman    address@hidden    http://www.isr.umd.edu/~danielf



reply via email to

[Prev in Thread] Current Thread [Next in Thread]