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

Re: yabasic problem



Hi,

i wrote:
> > why use such a C-BASIC when there is gcc, gdb and valgrind ?

> 'Cause the last time I used C was about 4 *DECADES* ago ;}

This way you missed the everlasting joy of hunting bugs which trigger
SIGSEGV at some arbitrary point of program execution.
valgrind widely industrialized that hunt. But its reports can be nearly
as cryptic as the messages from gcc if you omitted a semicolon somewhere.

Nevertheless, between C and shell there is few room for BASIC.
C for what is complicated and must run fast.
shell for what is rather simple and must be programmed fast.


Back to the literal question:

I doubted that the "open" commands failed at all. A decent BASIC in dialog
mode should show the error message automatically. And the docs say that
a running BASIC program shall abort if "open" fails and is not wrapped in
an "if" command.
Instead i suspected that the messages of peek$("error") stem from other
earlier attempts to open files. You meanwhile reported that strace shows
such attempts.

Did you make experiments to verify or falsify my theory ?
E.g. by provoking an error different from "File not found" and then
checking whether this message sticks to peek().


But Mark Fletcher has a different theory, which should be verified:
> Isn’t the problem that you misspelled “experimental” in your original file
> paths?

Your directory name "expermental_copies" looks fishy indeed.

Did you really test by copy+paste to an "ls" command in a shell terminal
that your path in the BASIC commands is correct ?
Don't trust your eyes. Trust your mouse.


Have a nice day :)

Thomas


Reply to: