[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #56389] Documentation for webXXX functions
From: |
Guillaume |
Subject: |
[Octave-bug-tracker] [bug #56389] Documentation for webXXX functions |
Date: |
Wed, 5 Jun 2019 05:24:31 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 |
Follow-up Comment #4, bug #56389 (project octave):
@Kai: Thanks for pushing your implementation of web(). One tiny thing I
noticed, for compatibility with Matlab, is that nothing is returned if you
don't specify an output argument. Not sure what is the preferred way for this:
either using varargout or as below:
diff -r f0da934bca61 scripts/web/web.m
--- a/scripts/web/web.m Tue Jun 04 15:27:42 2019 -0700
+++ b/scripts/web/web.m Wed Jun 05 10:11:01 2019 +0100
@@ -93,12 +93,8 @@
url = ["file://" fname];
endif
- status = __open_with_system_app__ (url);
- if (status == 1)
- status = 0;
- else
- status = 2;
- endif
+ sts = __open_with_system_app__ (url);
+ sts = ifelse (sts == 1, 0, 2);
h = []; # Empty handle, as we cannot control an external browser.
@@ -107,6 +103,10 @@
url = [];
endif
+ if (nargout > 0)
+ status = sts;
+ endif
+
endfunction
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56389>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/