|
From: | Doug Stewart |
Subject: | Re: Knight's tour |
Date: | Mon, 11 Feb 2019 17:25:29 -0500 |
The error I am seeing is this
error: 'SpiralNumbering' undefined near line 52 column 25
error: called from
spiralknightsmove>@<anonymous> at line 52 column 25
spiralknightsmove at line 78 column 19
What I suddenly realised is that spiralknightsmove calls spiralNumbers
I had it in my head that the subroutine had to be within the main code. It
should work provided spiralknightsmove can see spiralNumbers.
So what I have done is to use 'pwd' and that tells me where Octave is
looking. In my case it is
>> pwd
ans = /Users/Simon
Next I accessed both files in Dropbox. I used direct download and then
moved both files to /Users/Simon
Next to be sure I typed
>> ls
spiralNumbers.m
spiralknightsmove.m
There is a lot of other stuff there folders and files but both of these
files are there
Next I opened spiralknightsmove.m in Octave and hit Run. That gives the
error above. So Octave is not seeing the other file even though it is in
the same path. I am not sure why it is still not seeing it.
I am on a Mac but that should not make any difference or is it a file
permission issue?
Simon
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
[Prev in Thread] | Current Thread | [Next in Thread] |