[prev in list] [next in list] [prev in thread] [next in thread]
List: gnuplot-info-beta
Subject: Re: Scoping of variables in block constructs
From: Achim Gratz <Stromeko () nexgo ! de>
Date: 2017-10-10 16:34:26
Message-ID: 87bmlfner1.fsf () Rainer ! invalid
[Download RAW message or body]
Ethan A Merritt via gnuplot-beta writes:
>> Also, why is there no block "else if" or maybe even "elsif"?
>
> No particular reason.
> So far as I can see, all it would gain is to reduce the number of
> required curly brackets by one pair.
> Is there something more subtle I'm missing?
Maybe. If the conditional expressions themselve need to be nested, you
will either end up with unwieldy formatting
--8<---------------cut here---------------start------------->8---
if (…) {
else {
if (…) {
else {
if (…) {
else {
if (…) {
else {
if (…) {
else {
if (…) {
--8<---------------cut here---------------end--------------->8---
or you'll need to explicitly repeat (and revert) the logical expression
from the former branches.
Regards,
Achim.
--
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+
Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
gnuplot-beta mailing list
gnuplot-beta@lists.sourceforge.net
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic