|
In languages where ELSEIF is not supported ELSE followed by IF will be. Not as elegant but ...My problem with the ELSEIF is just what you state. In C-based languages you can get away with ELSE IF because of punctuation. Languages with a closing ENDIF must have a separate ELSEIF to allow the same syntax.
I guess we are all somewhat enslaved by our own particular mental models.The trick is to progress beyond them, Jon. For example, I grew up with switch/case. But today I use the better tool - I use SELECT for multiple branching conditions and IF to test a single condition. SELECT signals clearly that there are multiple conditions to be processed, whereas IF signals a single branch point. That's my new mental model, made possible by RPG.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.