slang-users mailing list

[2019 Date Index] [2019 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] Re: Stack underflow()


Am 10.12.2019 um 00:51 schrieb Bernd Eggink:
slsh> define f() {}
slsh> () = f();
Stack Underflow Error

I wonder why this is considered an error. If "()=" means "pop anything left on the stack", isn't "nothing" (in a mathematical sense) also "anything"?

OK, ignore this, now I realize that I hadn't fully understood the return value mechanism. I re-read chapter 9 of the guide, which answers the question sufficiently.

-Bernd
--
http://www.sudrala.de
_______________________________________________
For list information, visit <http://jedsoft.org/slang/mailinglists.html>.


[2019 date index] [2019 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]