home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ESSEX.STFX.CA!andrea
- From: andrea@ESSEX.STFX.CA (John Andrea)
- Newsgroups: comp.lang.modula2
- Subject: RE: DOS compilers
- Message-ID: <00964EF9.ED4454E0.16140@esseX.stfx.ca>
- Date: 11 Dec 92 19:29:38 GMT
- Sender: daemon@ucbvax.BERKELEY.EDU
- Reply-To: Modula2 List <INFO-M2%UCF1VM.BITNET@uga.cc.uga.edu>
- Distribution: world
- Organization: The Internet
- Lines: 25
-
- >Woody asks
- >I need a DOS Modula-2 compiler that will pack subranges, for example,
- >[0..255] would be stored in 1 BYTE. The compiler that I ues store it as an
- >INTEGER.
-
- For a case like this i just use an ordinary character as a byte value
- then do the conversions with the standard built in functions.
-
- VAR
- c :CHAR;
- i :CARDINAL;
-
- BEGIN
-
- i := 100;
-
- c := CHR( i );
-
- i := ORD( c );
-
- WriteCard( i, 0 );
- -----------> should show "100"
-
- John Andrea
- andrea@essex.stfx.ca
-