On C programming, switch-cases and the GOSUB
The switch-statement in C and C++ is an interesting construct lending itself to many unorthodox uses. In this video I explore some of those uses. I also showcase a little BASIC program (visible from 1:16 through 1:42) that I wrote in 1993.
WARNING: May include trace amounts of rant!
Twitter: https://twitter.com/RealBisqwit
Patreon: https://patreon.com/Bisqwit (alternatives at https://iki.fi/bisqwit/donate.html)
Twitch: https://twitch.tv/RealBisqwit
Homepage: https://iki.fi/bisqwit/
Third-party software information, in approximate order of appearance:
• Operating system: Debian GNU/Linux ― http://debian.org/
• Graphics window system: X.Org
• Window manager: Enlightenment
• Window theme: 23oz (only used for window borders)
• Editor: joe ― http://joe-editor.sourceforge.net/ *
• Terminal: aterm ― http://www.afterstep.org/aterm.php
• Terminal: xterm ― http://en.wikipedia.org/wiki/Xterm
• Compiler: GCC ― http://gcc.gnu.org/
• Compiler: Clang ― http://clang.llvm.org/
• Interpreter: GW-BASIC ― http://en.wikipedia.org/wiki/GW-BASIC
• Platform emulator: DOSBox ― http://www.dosbox.com/
• Window sitter: Macopix ― http://rosegray.sakura.ne.jp/macopix/index-e.html
*) In most of my programming videos I use a custom editor I wrote myself for use in DOSBox. This video however was not created in DOSBox, but in a real Linux desktop, although a staged one for video making. My own editor only runs in DOS, so I used Joe here. Or more to the point, I don't use Joe in DOSBox, because it does not run in DOS. That's why I created my own editor. So in this video I used Joe, i.e. Joseph Allen's editor.
Addendum: In my view, lambda functions / closures target pretty much the same goal and purpose that GOSUB does, even though it is not exactly the same. I'm glad C++ has lambda functions today.
The entire source code of the dirt-dropping program (that is shown in the end of the video) is seen at 1:32.
Видео On C programming, switch-cases and the GOSUB канала Bisqwit
WARNING: May include trace amounts of rant!
Twitter: https://twitter.com/RealBisqwit
Patreon: https://patreon.com/Bisqwit (alternatives at https://iki.fi/bisqwit/donate.html)
Twitch: https://twitch.tv/RealBisqwit
Homepage: https://iki.fi/bisqwit/
Third-party software information, in approximate order of appearance:
• Operating system: Debian GNU/Linux ― http://debian.org/
• Graphics window system: X.Org
• Window manager: Enlightenment
• Window theme: 23oz (only used for window borders)
• Editor: joe ― http://joe-editor.sourceforge.net/ *
• Terminal: aterm ― http://www.afterstep.org/aterm.php
• Terminal: xterm ― http://en.wikipedia.org/wiki/Xterm
• Compiler: GCC ― http://gcc.gnu.org/
• Compiler: Clang ― http://clang.llvm.org/
• Interpreter: GW-BASIC ― http://en.wikipedia.org/wiki/GW-BASIC
• Platform emulator: DOSBox ― http://www.dosbox.com/
• Window sitter: Macopix ― http://rosegray.sakura.ne.jp/macopix/index-e.html
*) In most of my programming videos I use a custom editor I wrote myself for use in DOSBox. This video however was not created in DOSBox, but in a real Linux desktop, although a staged one for video making. My own editor only runs in DOS, so I used Joe here. Or more to the point, I don't use Joe in DOSBox, because it does not run in DOS. That's why I created my own editor. So in this video I used Joe, i.e. Joseph Allen's editor.
Addendum: In my view, lambda functions / closures target pretty much the same goal and purpose that GOSUB does, even though it is not exactly the same. I'm glad C++ has lambda functions today.
The entire source code of the dirt-dropping program (that is shown in the end of the video) is seen at 1:32.
Видео On C programming, switch-cases and the GOSUB канала Bisqwit
Показать
Комментарии отсутствуют
Информация о видео
Другие видео канала
![Are C♯ and D♭ same? Interval & Octave explained: Music & law of frequencies](https://i.ytimg.com/vi/-F12ugKuCaM/default.jpg)
![Let’s try ChatGPT. Is it any good?](https://i.ytimg.com/vi/q2A-MkGjvmI/default.jpg)
![I Studied a Year at a University and This Happened](https://i.ytimg.com/vi/L6Wnzapbav0/default.jpg)
![Logic 4: Natural Deduction with Logical Axioms — Tutorial 4/4](https://i.ytimg.com/vi/v-1ikd_89Mg/default.jpg)
![Logic 3: Quantifiers (univ. & exist.), Proofs part 1 — Tutorial 3/4](https://i.ytimg.com/vi/mnDjmMuIdzQ/default.jpg)
![Logic 2: Karnaugh Map, Fallacies, 7400 Series — Tutorial 2/4](https://i.ytimg.com/vi/Fcg0W8GjbgQ/default.jpg)
![Logic 1: Binary Propositions, De Morgan’s Law, What is an Implication — Tutorial 1/4](https://i.ytimg.com/vi/oRRsm75wo7o/default.jpg)
![How I got Mario in That Editor — And how Norton Got 🐁](https://i.ytimg.com/vi/7nlNQcKsj74/default.jpg)
![YouTube deletes your comments #Shorts](https://i.ytimg.com/vi/PVlobDyTqeY/default.jpg)
![What are EXE files made of?](https://i.ytimg.com/vi/hhgxsrAFyz8/default.jpg)
![How Bisqwit started — Frequently Asked Questions, Part 4/4](https://i.ytimg.com/vi/6EeGnowqHyo/default.jpg)
![Where did Bisqwit learn C++? — Frequently Asked Questions, Part 3/4](https://i.ytimg.com/vi/1vFtkfz_v4Q/default.jpg)
![School & army background — Bisqwit — Frequently Asked Questions, Part 2/4](https://i.ytimg.com/vi/zqZHteVhIeQ/default.jpg)
![Origin of “Bisqwit”? Married? Font&color theme — Frequently Asked Questions, Part 1/4](https://i.ytimg.com/vi/uITpN-OZcuo/default.jpg)
![Illumination Tutorial for Software 3D Rendering (2/2+) [c++20]](https://i.ytimg.com/vi/eXU-6_jmw7Q/default.jpg)
![Illumination Tutorial for Software 3D Rendering (1/2+) [c++20]](https://i.ytimg.com/vi/Nwfm6cpskIM/default.jpg)
![Why Refactor? Let’s Refactor the 3D Polygon Renderer. [c++20]](https://i.ytimg.com/vi/GnKh8Eb1zU8/default.jpg)
![Texture Mapping & Polygon Rasterizing Tutorial (2/2) [C++20]](https://i.ytimg.com/vi/hxOw_p0kLfI/default.jpg)
![Texture Mapping & Polygon Rasterizing Tutorial (1/2) [C++20]](https://i.ytimg.com/vi/PahbNFypubE/default.jpg)
![Dual-Boot Windows-Linux Tutorial (& NVME & LVM & disk migration)](https://i.ytimg.com/vi/DgiQcJfTYKU/default.jpg)
![Which editor/IDE does Bisqwit use? Answers & some history.](https://i.ytimg.com/vi/ZMBQmhO8KqI/default.jpg)