Curious error message

2 views
Skip to first unread message

Fred H Olson

unread,
May 1, 2022, 11:31:37 PM5/1/22
to Semware
The very simplified code below compiles and does nothing.
But the equivalent of second fp1() below did not return a string as a
I remembered (it printed the string). So when I tried compiling it with
a version of fp1() like the second one I got a curious result.
To try it change which fp1() is commented out.

string proc fp1() return("dd") end // Makes Main() do nothing, ie "works"

// proc fp1() noop() end // With this version of fp1()
// one gets a puzzling error: "File not found:"
// when after compiling it is "Executed" or "Loaded"

proc main()
while fp1()<>"dd"
endwhile
warn("done")
end

<f7> main()

--- end code ---

Fred

--
Fred H. Olson Minneapolis,MN 55411 USA (near north Mpls)
Email: fholson at cohousing.org 612-588-9532
My Link Pg: http://fholson.cohousing.org

knud van eeden

unread,
May 2, 2022, 4:05:53 AM5/2/22
to Semware
It can further be simplified to this source code, still giving the same error 'File not found:'


-------

proc fp1()
end

proc main()
 while fp1()<>"dd"
 endwhile
end

-------

Note: there is of course an error here, as 
'proc fp1()' does not return a string value
and one is checking for that return string
value in main().
While in 'string proc fp1()' (which works thus without
error) one supplies a return value and that works.

with friendly greetings
Knud van Eeden


--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+unsub...@googlegroups.com.

knud van eeden

unread,
May 2, 2022, 4:11:04 AM5/2/22
to Semware
It is further also not depending on the names used,
as also this gives the same error 'File not found:'

-----

proc foobar()
end

proc main()
 while foobar()<>"whatever"
 endwhile
end

-----

Carlo Hogeveen

unread,
May 2, 2022, 4:14:22 AM5/2/22
to sem...@googlegroups.com

Additionally:
The compiler should have reported it as an error, that a string is compared with a function that does not return a string.
Funnily, it does take a lot longer to compile the erroneous syntax, so the compiler is confused by something.
Even more fun, starting the debugger goes in an infinite loop.



knud van eeden

unread,
May 2, 2022, 4:19:01 AM5/2/22
to Semware
It is also not depending on the type (string or integer) checked,
because also here still the same error 'File not found:'

-----

 proc foobar()
 end

 proc main()
  while foobar()<>1
  endwhile
 end

===

Conclusion:

In this context a clean TSE 4.42.00 sees 'foobar()' as some (empty "") filename which
has to be found and shows therefore that error.


knud van eeden

unread,
May 2, 2022, 4:28:50 AM5/2/22
to Semware
Same error: 'File not found:'

-----

 proc foobar()
 end

 proc main()
  while foobar()==1
  endwhile
 end

-----

===

Same error: 'File not found:'

-----

 proc foobar()
 end

 proc main()
  repeat until foobar()==1
 end

-----

So the common factor in this issue should be only the procedure 'foobar()'.



Reply all
Reply to author
Forward
0 new messages