QBasic Tutorial 35 - Making A Sub In QBasic 1.1

Опубликовано: 10 Апрель 2026
на канале: SchoolFreeware
14,017
70

http://www.SchoolFreeware.com

As programs become more advanced placing all the code in the main program can make the program more difficult to program, maintain, and understand. Slicing the program into sections can help. These sections are called by many names. The names include: subs, sub-modules, sub-procedures, procedures and sub-programs.

The way that the subs work is that the main program, another sub or function will call the sub. Once the sub is called, it will run. When the sub is done running the main program main program, another sub or function will continue with its code.

Before we can start programming with subs we have to know how to create the subs.

Subs can be created in QBasic 1.1 by going to Edit -- New Sub and typing the name of your new sub in the box