From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9e47ad8d460f46b8,start X-Google-Attributes: gid103376,public From: jmoor@my-deja.com Subject: Extracting Fields in Files Date: 2000/01/12 Message-ID: <85hu94$tk3$1@nnrp1.deja.com>#1/1 X-Deja-AN: 571602489 X-Http-Proxy: 1.0 DCC-PROXY, 1.0 x36.deja.com:80 (Squid/1.1.22) for client 209.49.118.18 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Jan 12 13:06:52 2000 GMT X-MyDeja-Info: XMYDJUIDjmoor Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) Date: 2000-01-12T00:00:00+00:00 List-Id: I am reading a file containing variable length records, the maximum size being 250 bytes and the minimum size 5 bytes. I read each record by doing the following: While not end_of_file(tip0125) loop Get_line (tip0125,rec01,rec01_length); . . METHOD 1 I break the individual fields up by doing the following: Command_code := rec01(073..077); Date_entered := rec01(001..008); . . . METHOD 2 After writing the program, I bought an Ada book (Bad timing. I should have bought the book before writing the program) that said that the individual fields should be broken up by using the "text_io.get" on each field. Is it inherently wrong to use METHOD 1 to break up individual fields instead of METHOD 2. I am experiencing problems with ignoring some records, but I would doubt that METHOD 1 is the culprit. Sent via Deja.com http://www.deja.com/ Before you buy.