My new Batch site! (Improved for visit)

Pages: 12
Visit here: http://batchforums.wordpress.com

If you visit this, be sure to spread the word!
Reply on what you think!
wow thanks guys for the 29 visits in less than 30 minutes
Ooh! do you like bash mr program programer
I don't really see the point in advertising a site with such little content.
its as sparse as when you first made it, put some actualy bash on there, just rip some stuff of another thread pretend its yours and promote your site elsewhere for a while before bringing it here, its empty pointlessness is annoying me for some sad ocd reason
closed account (Dy7SLyTq)
Making a batch site is kind of pointless. There are some exceptions
But unless you put mind blowing revolutionary batch code on
It what makes it better than the numerous cook book sites?
Hey I just started it. And I'm still learing batch,
closed account (3qX21hU5)
as sparse as when you first made it, put some actualy bash on there, just rip some stuff of another thread pretend its yours and promote your site elsewhere for a while before bringing it here, its empty pointlessness is annoying me for some sad ocd reason

Really bad advise that can get him into a lot of trouble possibly. If you ever copy anything that is not your nake sure you give credit to the original poster and have permission to post it first.
Yeah this is proly not a good way to start my coding career :P
Batch is a weird thing to actually sit down and learn. It's usually just something that people learn as they need it. You'd be better suited learning an actual language
Program Programmer, I seriously recommend you carry on with C++ if you want to learn more about programming. It's a lot harder and the benefits aren't so obvious immediately, but it's far more worth your time. Spending more time in Batch files could also be counter-intuitive, or at least is wasting your time.

Take my word for it, or if you don't please read this whole post.

For one thing, the simple aspects of C++ are all easily far more advanced than what Batch files can provide and way more powerful. They're also probably roughly 10000 times faster.

Basic C++ programming is a type of structured programming. This is a fancy name to point out that C++ doesn't rely on a very linear limited control-flow system (that batch files happen use). In batch-files you control program flow using IF statements in conjunction with GOTO and labels, right? Well you've probably already noticed that it's easier to read Batch files when they're nicely split-up into different sections, i.e. different blocks of consecutive commands in the file for different logical parts of the program (like different menus, or a saving mechanic). The idea of structured programming is to use actual syntax to represent these different logical parts, either separating entire parts of a program (into functions) or representing common control-flow patterns (loops / if statements with blocks).

For example, I bet at some point you have a menu that's structured something like this:

:mymenu
CLS
ECHO. This is my menu, choose an option.
ECHO.
SET /P choice= x to quit:
IF "%choice%"=="x" GOTO menuskip
GOTO mymenu
:menuskip

Well in typical non-structured style you must read the whole thing to understand what's going on.

Now let's see how it could be implemented in C++:

1
2
3
4
5
6
string choice;
do {
	system("CLS");
	cout << "This is my menu, choose an option.\n\n x to quit: ";
	cin >> choice;
} while (choice != "x");


Provided you understand the syntax, you can instantly recognise how that functions; it's obvious from the syntax at a quick glance. Isn't that a better way of doing it?

Not only that, but there are no named labels. This is nice too, because you don't have to come up with names for different lines of code continuously while thinking to yourself "if only there was some nice way of getting it to do all this automatically".

Don't get me wrong, it's not actually too much of a bother writing everything with GOTO commands, labels and all that. Eventually people adopt a kind of 'style' in their batch files that makes it easier to read their own code and do common things like menus without breaking a sweat. It's just that in C++, provided you know how to write C++ and have a little practise with programming structures, you can have that ease for free straight away because loops, functions, etc. can be moulded into pretty much whatever flow you need and don't require too much thought to make readable for even other programmers to understand.

AND AS A MASSIVE PS:
For any other members of this forum who managed to see my use of system() without dying of a heart-attack, yes I'm aware it's bad practise and a bad idea to show to people learning C++. However, if it will convince someone to stop learning Batch files on the basis that if they really need to they can still get any of the old functionality back then I believe it's the lesser of two evils. ProgramP: using system() will make your program specific to Windows, if you avoid it and manage to write a program without it you can compile that program on any system, whether Windows, Mac, Linux, and it should still run. So one day maybe you won't need it but for now you can get away with it.
Why do you want to learn batch mister program programmer? do you want to be a hacker/cracker?? I remember some people thinking thats what a hacker language is, don't see how it would help though.

EDIT: I think maybe whoever said that was taking the piss, or maybe its for once your 'in'
Last edited on
closed account (Dy7SLyTq)
... batch is the worst language to "hack in".
batch, except for people who have enormous time on their hands, is primarily used for executing groups of commands together, or at a certain time
closed account (N36fSL3A)
I have a feeling someone other than me is gonna mention Spoonlicker here...

I also have a feeling that this is going to turn into a language debate, so hold onto your seats here.

Anyway, that site looks amazing.
closed account (Dy7SLyTq)
spoonlicker
Anyway, that site looks amazing.

It did? I thought it looked horrible... in fact, kind of hurts my eyes
Last edited on
closed account (N36fSL3A)
I guess I just eat up things from old fashioned computers. I think I was born in the wrong generation, I wish I was 40 and not 12.
I like it too fredbill. don.t wish you were forty please fredbill.
@Fredbill30
It's funny, because when you're 40 you'll wish you were 12. Trust me, you have it easy now.
Pages: 12