Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: SUPER BATCH  (Read 34306 times)

0 Members and 2 Guests are viewing this topic.

Geek-9pm


    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: SUPER BATCH
« Reply #15 on: February 08, 2009, 10:28:56 PM »

Quote
programming is getting the computer to do what you want. If you do that in batch, your programming.

So if I can write a letter to my family in notepad and print it on a printer using the computer I am a programmer. - Right?

Bash and the other UNIX shells are listed as programming languages, by a stretch of your mind.  I can not find any references BATCH as being a language. The term BATCH is often used to mean a control script the is started by a human that then runs a number of tasks, also called jobs,  that do not require attention of the operator.  The interpreter is COMMAND.COM or one if its kin. So  the command language for the command interpreter is used in BATCH files. But a BATCH file make also contain commands fro another program. The command interpreter passes the parameters to the application. Those commands are switches for the application. BATCH is not a language. It describes the nature and purpose of a file. It is a BATCH file that contains commands for some program(s). COMMAND.COM is on of the programs the batch file invokes. Use another Shell and you have another set of commands.
  • WinDOS
  • Seal
  • Qube
  • DOSStart
  • X-Window
So if you write a BATCH file for these, what is it called?
Don't call it a BATCH language. Each of the shells has a different set of commands. Yes some things are similar, but it is a different set of things.
I know a lady that speaks three languages. But she is not a language. She is a speaker of languages.

macdad-



    Expert

    Thanked: 40
    Re: SUPER BATCH
    « Reply #16 on: February 09, 2009, 11:26:34 AM »
    Quote
    Yes... It is a form of programming most surely.
    Urban Myth

    programming is getting the computer to do what you want. If you do that in batch, your programming.


    or you could try to make a Command Line app in VB.NET.
    take my FINFO app i made in VB.NET.
    http://www.computerhope.com/forum/index.php/topic,72108.msg470826.html#msg470826

    and be sure to add error checking and all those goodies.

    Or my BCScript Script interpreter in my sig! Except that's a console app created in VB6... I have to actually use API calls to determine the start mode (console or GUI) and manually acquire the handles to the opened Stdout,stdin, and stderror streams. Even then, I need to use the API WriteFile and ReadFile functions to read or write anything to or from console. yep, it's tough using VB6 in today's world, but well worth avoiding the requirement of .NET.

    Besides... I have all the console code in a module. I just add the module and the app has Console support.

    Tricky part was the late binding... Never realized how lost I could be without intellisense.

    nice BC, i'll give it a try, and yea VB6 does have its advantages...does BCScript have a command in it for console parameter parsing?
    If you dont know DOS, you dont know Windows...

    Thats why Bill Gates created the Windows NT Family.

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: SUPER BATCH
    « Reply #17 on: February 09, 2009, 12:28:36 PM »
    nice BC, i'll give it a try, and yea VB6 does have its advantages...does BCScript have a command in it for console parameter parsing?

    No- you know the good old COMMAND$ function in VB6 and earlier- well, I wrote a library for parsing the arguments. BCCParser.dll. makes it SO much easier to parse arguments and such. a collection of switches and arguments, and each switch can have arguments (like with /D:filename.txt) and it even parses out quotes... which has actually become second nature thanks to my expression evaluator itself.

    I don't really have any documentation included with it though- I merely packaged up the exes DLLs, and two or three sample scripts I had been using for testing.


    the commandline parser would be a lot easier to document then my evaluation library, since with the Evaluator, I'll have to document how to use the library and everything, AND the hundred of bloody functions, AND how to trap parsing events and create plugins. Sometimes I just set myself up for painful documentation. Even worse, I'll have to actually look at the code myself since I forgot half of the clever stuff I did.

    The best part of BCScript as I've created it is that it won't throw out that annoyingly generic "ActiveX component cannot create object" error that occurs when a library isn't present. It doesn't say WHAT is missing, which makes the error a complete PITA.

    So instead, every object (the parser, commandlineparser, etc) is accessed via late-binding (object variables and CreateObject()) so that the program can throw out a proper error if libraries aren't found and such. I'm thinking if implementing some rudimentary command-line parsing in the program that can be used if the BCCParser lib isn't found, and then it will just state the fact that parsing abilities are limited or something.

    It's actually quite short because of the use of the libraries- the BCScript main routine is around a single page.

    I used to have a LOT more libraries I wrote and activeX controls... custom tab controls, a "CreditScroller" control that shows credits... sigh. All gone because of a HD crash over 2 or 3 years ago. Oh well. a second writing always comes out better. Especially in the case of a expression evaluator, which I've written over 3 times.

    Since I didn't include any documentation or whatnot with it, feel free to PM me if your having problems :)
    I was trying to dereference Null Pointers before it was cool.

    Dias de verano

    • Guest
    Re: SUPER BATCH
    « Reply #18 on: February 09, 2009, 12:56:32 PM »
    I can not find any references BATCH as being a language.

    http://www.google.co.uk/search?source=ig&hl=en&rlz=&=&q=batch+programming+language&btnG=Google+Search&meta=lr%3D

    Batch is a programming language. You are wrong. Suck it up.

    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: SUPER BATCH
    « Reply #19 on: February 09, 2009, 03:33:45 PM »
    Quote
    Batch is a programming language. You are wrong. Suck it up.
    Thank you for the links. They say what I said, BATCH is NOT a language.The references are to the use of the command interpreter, which has a its own language.

    American is not a language.
    European is not a language.
    ASNII is not a language.
    Batch is not a language. It is a BATCH.

    COMMAND line programming is programming in the command line language.
    References to BATCH programming are short forms of reference to doing command line programming using a file that contains the script the COMMAND program will interpret.



    Dias de verano

    • Guest
    Re: SUPER BATCH
    « Reply #20 on: February 09, 2009, 03:46:20 PM »
    Geek-9pm, stop digging.

    The fact that you have your own private definition of what the word "program" means does not mean that everybody else has to abide by that.

    Quote
    which has a its own language.

    Sounds like yours isn't English.

    Quote
    References to BATCH programming are short forms of reference to doing command line programming using a file that contains the script the COMMAND program will interpret.

    So it's programming then. Look, you wrote it.

    Please tell me why a command script is not a program, while a Qbasic source code file is.


    Geek-9pm


      Mastermind
    • Geek After Dark
    • Thanked: 1026
      • Gekk9pm bnlog
    • Certifications: List
    • Computer: Specs
    • Experience: Expert
    • OS: Windows 10
    Re: SUPER BATCH
    « Reply #21 on: February 09, 2009, 03:53:59 PM »
    Quote
    Please tell me why a command script is not a program, while a Qbasic source code file is.

    Yes a command script is written in a programming language. It is the language of the interpreter that is used to process it.
    The name of the language is not script.
    The name of the language is not Batch.

    A Google of the phrase. 'Batch is a programming language' only picks of one forum user that made that as a positive, true statement.
    Was that not you?
    Tell me that it was not you.
    Then I will have an answer to the question next time somebody in a casual compensation brings up the subject.


    Gekk9pm: Wow, the batch programming has me down!
    Jack: Well no wonder, it is hardly a language.
    Geek9pm: Say what you want, but there are people out there who say it is a language.
    Jack: Huh? No Batch itself is not a programming language. A batch is a file with a script.
    Geek9pm: No, really I know users who will really tell you, literally, quote "Batch is a programming Language.", unquote.
    Jack: You know some of those kind?
    Gekk9pm: I know them ALL.  I meet up with BOTH of them.

     ;D
    « Last Edit: February 09, 2009, 04:16:18 PM by Geek-9pm »

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: SUPER BATCH
    « Reply #22 on: February 09, 2009, 04:19:29 PM »
    Quote
    Batch is a programming language. You are wrong. Suck it up.
    Thank you for the links. They say what I said, BATCH is NOT a language.The references are to the use of the command interpreter, which has a its own language.

    American is not a language.
    European is not a language.
    ASNII(ANSI?)  is not a language.
    Batch is not a language. It is a BATCH.
    American is a dialect of English(generally referred to as "American-English",but reference to the "American" language is common as well, especially among English speakers), in that it is a variant of the "queen's English" which in and of itself is likely a variant of Saxon tongues. This type of heirarchy occurs with Programming languages as well, for example- C branches of to C++, and Java can be said to root in both Visual Basic and C. The fact that any Real-life language is merely a dialect of some other previous vernacular makes it no less of a language.

    the Windows/MS-DOS command-line is the only one whose programmatic entity is referred to as a "Batch Program" within standard vernacular. you don't here people refer to Bash Batch files or Bourne Batch files. they are called scripts. And they are referred to as Programming, if only at the highest OS level by those who write them and the linux community in general. Nobody in the Linux community would likely oppose calling these "scripts", even if it implies "programming". Which brings up yet another question. If it isn't actually "batch programming" but rather "command-line" programming, why is it that "Visual Basic Programming" or "C Programming", both being comprised of the creation of Batches of Statements in that particular language, aren't called "Batch Visual Basic " or "Batch C"? Because the ability to have blocks of statements execute sequentially is defined in the language itself. In a similar vein, since Batch files allow for the use of parentheses for grouping and other commands that aren't possible to use at the command-line, it is thus a superset of the command-line itself, and thus it cannot be referred to as simply a "batch" of commandline language statements, as it defines it's own constructs not available at the command-line.


    Of course, this definition means that Pre-NT DOS batch programming was not programming either- however, it was. Since, according to the definition of "programming language":


    Quote
    A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer. Programming languages can be used to create programs that specify the behavior of a machine, to express algorithms precisely, or as a mode of human communication.

    "Batch" meets all of what this definition states, in all it's forms. And despite what I believe might be your main proposal, calling it "Batch programming" is not ambiguous to other command-line implementations of what a "Batch" is in DOS/Windows simply because those shells refer to their implementation of Batch programming as "Scripting"... Scripting is a form of programming and since this is essentially an implementation of similar functionality from Batch, batch is thus also "batch Scripting"... Scripting is programming.


    HTML, SGML, XML, etc. While not introduced in this discussion, do not meet the requirements of being a programming language. They are used to define how data is displayed, but do not provide the actual algorithms for how the display parameters are to be met. As an example, the <HR> tag creates a hard rule section break on a HTML page. While you can change the properties used to draw that rule (such as size, Color, etc) there is no definition of how those properties are to be applied to create a section break, since that logic is within the web browser. In a similar vein, batch programming does both- it can invoke other applications and commands to perform particular tasks with specified parameters, or it can be used to create the logic behind such commands.




    COMMAND line programming is programming in the command line language.
    References to BATCH programming are short forms of reference to doing command line programming using a file that contains the script the COMMAND program will interpret.



    I was trying to dereference Null Pointers before it was cool.

    macdad-



      Expert

      Thanked: 40
      Re: SUPER BATCH
      « Reply #23 on: February 09, 2009, 06:11:09 PM »
      the term BATCH comes from the days of mainframes, punched cards and all those goodies(as all of us know) you would write a program with punched cards, and feed em in one by one in "BATCHES", and batch files are just text files that contain CMD(Or DOS) commands that are read sequintally(one by one) which leads to the BATCH term again.

      their just batches of commands in a special text file, that is read by CMD or DOS.
      If you dont know DOS, you dont know Windows...

      Thats why Bill Gates created the Windows NT Family.

      BatchFileCommand



        Hopeful
      • Thanked: 1
        Re: SUPER BATCH
        « Reply #24 on: February 09, 2009, 07:08:49 PM »
        I see you all arguing about how batch is a language, and how it isn't. Well, think of it this way. Why do they refer to programming as languages. Because they are languages that the computer speaks (analogical). The computer speaks batch, as well as Java, VB6, C etc. (assuming they are installed). So programming with computers is all the same. You type commands and the computer does them. That's how it works with every
        programming language. Why not Batch? Why do people refer to thing like

        "I am scripting in C++."
        "I am scripting in Batch."

        Any language can be referred to as scripting, batch is referred to
        as scripting but not a language...... C++ is referred to scripting and a language.

        So why can't Batch called a language too? After all, the computer can speak it
        like any other language.
        οτη άβγαλτος μεταφ βαθμολογία

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: SUPER BATCH
        « Reply #25 on: February 09, 2009, 07:49:59 PM »
        Batch is just not turing complete  8)
        I was trying to dereference Null Pointers before it was cool.

        Geek-9pm


          Mastermind
        • Geek After Dark
        • Thanked: 1026
          • Gekk9pm bnlog
        • Certifications: List
        • Computer: Specs
        • Experience: Expert
        • OS: Windows 10
        Re: SUPER BATCH
        « Reply #26 on: February 09, 2009, 09:34:21 PM »

        BatchFileCommand



          Hopeful
        • Thanked: 1
          Re: SUPER BATCH
          « Reply #27 on: February 10, 2009, 06:07:57 AM »
          What's the point of that link?
          οτη άβγαλτος μεταφ βαθμολογία

          Dias de verano

          • Guest
          Re: SUPER BATCH
          « Reply #28 on: February 10, 2009, 08:12:41 AM »
          What's the point of that link?

          No point whatsoever, other than to illustrate that he has run out of arguments.

          macdad-



            Expert

            Thanked: 40
            Re: SUPER BATCH
            « Reply #29 on: February 10, 2009, 03:00:44 PM »
            when you think of it fully. BATCH seems like a semi-language. the same file is the source code as well as the built program itself. it is just used as a program when opened in CMD(or DOS) or used as a textfile(the source code) in Notepad.
            If you dont know DOS, you dont know Windows...

            Thats why Bill Gates created the Windows NT Family.