Command line

From: Andreas (andreasv_at_telia.com)
Date: 04/21/04

  • Next message: Stephen Leake: "Re: Command line"
    Date: Tue, 20 Apr 2004 23:39:03 GMT
    
    

    Hello

    In a part of a program i'm writing, i need to read each row in a file and
    check if the format is what i want it to be. I use a procedure (that takes
    no arguments) to check if the format is OK. This procedure shall raise an
    error if the format is bad, but will not handle the error; the procedure
    that calls this procedure is supposed to do that.
    I need to write the file name in the command line when i start my program.

    To clear up the difficulties:

    First i start the program by typing

    myprog < data.txt

    Then the main procedure runs, and calls the format check procedure, once for
    each row in the file. If the format check procedure raised an error; handle
    it in the main function (once error check for each call to the format check
    procedure).

    I've got a 500+ pages ADA programming book, but it doesn't help. I really
    can't find what i'm looking for there.

    Thanks in advance,

    /Andreas


  • Next message: Stephen Leake: "Re: Command line"

    Relevant Pages

    • Re: Flash memory formating - Mac/Windows?
      ... For the format test, I used Disk Utility. ... 1:23.98 - immediately after writing the files ... 0:01.11 - the second time after the re-insert ... MS-DOS file system (FAT32) ...
      (comp.sys.mac.system)
    • Re: DVD / DVD+R /DVD-R / DVDRW. Are they all really distinct media
      ... lots of dusty disks: it rejects many once-used disks as unreadable. ... What's the best way to figure out what format my Laptop supports? ... Are these distinctions only relevant when writing disks at home as ... A little more complex is the difference between the '-' discs and '+' ...
      (microsoft.public.windowsxp.hardware)
    • Re: Build a better mousetrap ...
      ... I was recently involved in two books (technical reference, ... all writing is required to be submitted to the ... publisher in Microsoft Word format. ... How much less money are you willing to make to support ...
      (rec.arts.sf.written)
    • Re: C Program Portability
      ... Now, since this is a binary file, any transfer is likely to ... that any code writing data as a binary file needs to be adapted for the ... It's more that if you are dealing with reading, processing, writing a ... binary format (say, doing some image processing on a greyscale image ...
      (comp.lang.c)
    • Re: Frustration: working with collaborators in Word..
      ... So, writing collaboratively ... As well, he's pressuring collaboration with ... I need to write in LaTeX, as I believe it's output is far superior to ... Convert back and forth into a word-compatible format (hopefully ...
      (comp.text.tex)