Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: simple C



On Fri, 27 Feb 1998, Jim Schweizer wrote:

> Hi all,
> 
> I made the mistake of opening one of those dusty C books tonight
> to experiment with some ASCII. Now I'm really confused. Suppose
> I have a head.h with:
> 
> -----------------------------------
> schweiz:~/devel/C/scratch$ less head.h
> /* This is my li'l header file. */
> 
> #define CONFUSED 227
>  
> -----------------------------------
> 
> and a test file with:
> 

> 
> What I see is an 'a' with a tilde over it, not the pi sign my
> ASCII table says I should be getting...
> 
> Grrrr, how aggrevating - what am I doing wrong?

Your ascii table is wrong.  I think you want #28.  Here's a simple c
program that generates an ascii table for you:

#include <stdlib.h>

int x;

int main(void) {
	for (x=0;x < 256;x++) {
		printf("%d = %c\n",x,x);
	}
	return 0;
}

according to this, #28 is the pi.

--------------------------------------------------
Scott M. Stone <sstone@example.com, sstone@example.com>
               <sstone@example.com>
Linux Developer/Systems Administrator for Pacific HiTech, Inc. 
http://www.pht.com		http://armadillo.pht.co.jp
http://www.pht.co.jp	        http://www.turbolinux.com


---------------------------------------------------------------
Next TLUG Nomikai: 11 March Wed 1998 Tengu TokyoEkiMae 19:30
Chuo-ku, Kyobashi 1-1-6, EchiZenYa Bld. B1/B2 03-3275-3691
Next TLUG Meeting: 11 April 1998 Saturday, Tokyo Station
Featuring Tague Griffith of Netscape i18n talking on source code
---------------------------------------------------------------
a word from the sponsor:
TWICS - Japan's First Public-Access Internet System
www.twics.com  info@example.com  Tel:03-3351-5977  Fax:03-3353-6096



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links