String help!

Mark Roddy mroddy at enmasse.UUCP
Sat Mar 2 01:24:38 AEST 1985


> 

> (a confused hon-hacker writes...) Why would you want to keep a pointer to
> a constant string (or at least a constant length string)??
foo(n)
{
static char str="foobar 0x0000\n";
	hexdigit(n,&str[9]);		/* puts n into string */
	return(str);
}

As to why, imagine an environment without stdio etc- i.e., as is 
happening more frequently, C used to implement intelligent peripheral
device software.

-- 
						Mark Roddy
						Net working,
						Just reading the news.

					(harvard!talcott!panda!enmasse!mroddy)



More information about the Comp.lang.c mailing list