Re: yabasic problem
On 08/19/2018 08:36 AM, email@example.com wrote:
-----BEGIN PGP SIGNED MESSAGE-----
On Sun, Aug 19, 2018 at 08:00:31AM -0500, Richard Owlett wrote:
I've installed yabasic from the repository.
I invoked as:> richard@debian-jan13:~$
This is yabasic version 2.78.0,
built on i686-pc-linux-gnu at Mon Jan 23 14:17:02 UTC 2017
My code fragment is:
infile$ = "/home/richard/Documents/cherrytree/edit_bookmarks/expermental_copies/prettytest0txt"
outfile$ = "/home/richard/Documents/cherrytree/edit_bookmarks/expermental_copies/1stpass.txt"
fd_out = open(outfile$,"w")
For both print peek$("error") I'm told "No such file or directory".
The file to be read EXISTS and belongs to "richard"
Most people here won't know what 'print' and 'peek' do. Things you
might want to check:
- is yabasic trying to interpret print's first argument (i.e.
those pesky 'peek()' as some kind of file descriptor or name
where to print to?
According to the manual, "peek$("error")" is explicitly for diagnosing
problems when opening a file.
- try running your program under strace: there you'll see which
system calls are being issued, and perhaps gain some insight
on where this "No such file..." (ENOENT) really happens and
what argument values are being passed to the system call.
(as a very short intro:
strace -o <my/trace/file/name> yabasic
[do your thing]
[go carefully with a pitchfork through your trace file
looking out for your file names and for ENOENT]
Holler here if you need help with strace. It's a handy tool
in any hacker's toolbox.
Didn't know of strace. Just glanced at manpage. On my way out - pursue
I tried to look up their online documentation, but it's one of
Attention economy? I can play that: they won't get mine.
So somebody agrees with me.
A well done HTML manual is in the Debian package.
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
-----END PGP SIGNATURE-----