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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!usc!ucsd!ucbvax!EDVZ.UNI-SALZBURG.ADA.AT!1LENDL From: 1LENDL@EDVZ.UNI-SALZBURG.ADA.AT Newsgroups: comp.lang.ada Subject: Help !!!! Message-ID: <9007061745.AA27779@ajpo.sei.cmu.edu> Date: 7 Jul 90 07:23:46 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet X-Unparsable-Date: Fri, 06 Jul 90 10:19 CET List-Id: Hi all, I need some ADA help. ( I hope there are some ADA-freaks here ! ) Question 1: I have to read a Text-file. All works well with GET_LINE. BUT : The file is from an IBM-PC, and it is in German that means there are the special German characters ( Umlaute, scharfes S ) in it. These characters are encoded as 132, 142, ... all above 127 ! As far as I know, the type character is defined as an enumeration, from 0 to 127, so the special characters are not defined in it. Funny enough, when I try to read such characters I do not get any error, exception or other faults. When I "put" it afterwards, the original special character is written. Anyway, I want to make a CASE statement over all characters read: case char is when 'a' .. 'z' => -- This works fine when character'pos(132) => -- This gives a compiler-error: -- "Choices have to be static" What shall I do ? Making an IF-clause out of it ? ( is character'pos(132) legal ? ) Question 2: I want to read/write a simple file with no structure, a simple stream of bytes. I tried it with : type BYTE is range 0 .. 255; for BYTE'SIZE use 8; package byte_io is new DIRECT_IO ( Element_type => BYTE ); ... byte_io.write ( fh, byte(34) ); ... In the file there is the Value I wanted to write, then a 0, a value, a 0, .... Why THAT ???? ( Thinks were easy in C .... ) What have I done wrong ? I use the SYSTEAM Ada compiler on a VAX running VMS. Please send all help for DIRECT to me, for I'm not on this List. ======== ( No time for reading so much mail ! ) Thanks ! --Otmar Lendl-- 3\ 3 3\ /3 3\ 3\ 3 3\ 3 3\/3 3\ /\ 3\ /3\ 3\ 3\ 3\ X 3 X 3 3 3 3/ 3 3 o 3> 3 3 o 3\ 3 3 3\ 3 3\ 3/ 3 3 3/ \3 3 3 3\ 3 3 3 3 3 3 3 3 3 3 3 3\ 1LENDL@EDVZ.UNI-SALZBURG.ADA.AT PSI%023225629007::1LENDL And for the ones, who don't know where Austria is : 1lendl%edvz.uni-salzburg.ada.at@CUNYVM.CUNY.EDU