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

Re: when...



The Greene Family wrote:

>At 06:07 AM 6/17/99 +0000, you wrote:
>>The problem with those is that weŽd have to reimplement almost the
>>complete fsanf/fprintf functionality for that because of that /&§%/§$

>Going to have to do it sooner or later :-)

grrmbl. I guess you're right. :(

>I suppose I could.  Heck I could easily go to the normal stdio functions
>and I'd hardly have to change anything, and go back at anytime.  I was

Yup. You'd just have to add the "ppf" prefix everywhere and change the
CapiTalIzAtioN ;)

BTW - it's better if you use stdio for now as I'm rewriting big parts of
PFile - and during that time it almost crtainl won't be usable.

>remove a couple of directories from the CVS archive that PEter accidentally
>put in, in all caps. (yikes!) Can you help there?

Sorry, you're out of luck. It's impossible to remove directories from CVS.
You can only use the -P switch with commit/update (telling CVS to remove
the empty dirs from your working copy).

>Also, on the Derek is an idiot and ignorant side of things:  Can someone
>explain to me wtf namespaces are and do? :-)

Have a look at the following snippet:

namespace XYZ
{
	char *Hello = "World";
	bool  AmIStupid (void);
	int   Everything = 42;
};

Here the two vars and the function are in the "XYZ" namespace. That means
if you want to access them from the "outside", you have to prepend "XYZ::"
(e.g. int Answer = XYZ::Everything;).
If you want to access them from within the namespace (e.g. if you're in the
body of function AmIStupid () and want to access Hello) you don't need that.

That means all those names don't clutter the global namespace, but from
within the namespace you don't have to use any prefix or whatever. Kinda
like classes, but you can divide namespaces over several files, like:

---file1.h
namespace XYZ
{
	ppu64 MyIQ (void);
}
----------

---file2.h
namespace XYZ
{
	int CalculateAnswer ();
}
----------

---file1.cc
namespace XYZ
{
	ppu64 MyIQ (void)
	{
		return (pow(2, 63));
	}
}
-----------

---file2.cc
namespace XYZ
{
	int CalculateAnswer ()
	{
		return 42;
	}
}
-----------



	Christian


--

Drive A: not responding...Formatting C: instead