edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [edbrowse-dev] comma-separated return statements
Date: Sat, 20 Jul 2019 23:11:17 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.21.1907202301000.193917@carhart.net> (raw)


Wow, I should have looked this up many days ago.  There's a phrasing 
created by minimization which is misleading for human readers.

FYI if you don't already know, in the compound return statement,

return a,b,c,d

The a,b,c are simply going to be run.  The real return value is the d.  It 
is not somehow a compound value which draws from all of them because that 
isn't how return works.

So return a,b,c,d is functionally the same as
a;
b;
c;
return d;

And this means that there can be a chance to echo values in between those 
lines.  Otherwise, I thought I was stuck with these impenetrable blocks 
that became illegal if you break them up.



                 reply	other threads:[~2019-07-21  6:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.21.1907202301000.193917@carhart.net \
    --to=kevin@carhart.net \
    --cc=edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).