Usually a dedicated programming language needs a specific compiler and even a runtime, while the compiler and runtime for batch files are just the cmd provided by Windows, which saves a lot of the prerequisites the former needs. It can even directly call system routines, like shutdown, and that is very hard to do in a simple programming language (such as TC2). So DOS has the advantage of write-and-run immediately. Finished batch files can also be compiled into machine code with programs like bat2com and com2exe, which is convenient for protecting one’s ideas.
The command line can replace graphical operations to complete transactional tasks simply and precisely, and can even handle some simple numerical calculation problems. For example, the classic “Tower of Hanoi” problem can be solved with a batch file right on the desktop without relying on a dedicated language. This advantage is especially meaningful when you temporarily run into a problem outside that needs computer calculation.
I’d like to discuss with everyone just how strong DOS really is in programming.
I think the elements a programming language should have are:
1. Variables ----- In DOS you can use set and %c. Can they only represent integers and strings?... Complex data structures --------- arrays, structs... probably not, right?
2. Mathematical operations -------- + - * / logic, shifts
3. Modularity --------- Functionality similar to functions or procedures can be done with goto, and that’s fairly convenient
4. Libraries ----- This is really great! The libraries for batch files are all DOS internal and external commands plus those in path, especially those in system32, which is much more convenient than high-level languages calling system routines
5. Branch control --------- Are IF and FOR the only two available?
6. Input/output ------ I only know three kinds: command-line arguments, choice, redirection, and pipes. I don’t know whether there are others, such as output to a printer or memory
7. Graphical interface -------- I don’t know whether drawing functions or winform calls can be done in DOS. I found the tree command in XP cmd very interesting, it has a bit of a graphical feel
8. Low-level operations ----- debug, this is very powerful! But it’s used little in .bat, asking for materials ing
That’s about all I can think of. Please correct me and add to it, teachers.
Thanks
Salute
The command line can replace graphical operations to complete transactional tasks simply and precisely, and can even handle some simple numerical calculation problems. For example, the classic “Tower of Hanoi” problem can be solved with a batch file right on the desktop without relying on a dedicated language. This advantage is especially meaningful when you temporarily run into a problem outside that needs computer calculation.
I’d like to discuss with everyone just how strong DOS really is in programming.
I think the elements a programming language should have are:
1. Variables ----- In DOS you can use set and %c. Can they only represent integers and strings?... Complex data structures --------- arrays, structs... probably not, right?
2. Mathematical operations -------- + - * / logic, shifts
3. Modularity --------- Functionality similar to functions or procedures can be done with goto, and that’s fairly convenient
4. Libraries ----- This is really great! The libraries for batch files are all DOS internal and external commands plus those in path, especially those in system32, which is much more convenient than high-level languages calling system routines
5. Branch control --------- Are IF and FOR the only two available?
6. Input/output ------ I only know three kinds: command-line arguments, choice, redirection, and pipes. I don’t know whether there are others, such as output to a printer or memory
7. Graphical interface -------- I don’t know whether drawing functions or winform calls can be done in DOS. I found the tree command in XP cmd very interesting, it has a bit of a graphical feel
8. Low-level operations ----- debug, this is very powerful! But it’s used little in .bat, asking for materials ing
That’s about all I can think of. Please correct me and add to it, teachers.
Thanks
Salute
I'm a progamer who work with windos
not a programmer with windows
not a programmer with windows

