TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Wankadia
from: Michael Stapleton
date: 1996-10-25 20:01:00
subject: Re: Auto string-length deter

-=> Quoting Paul Wankadia to Frank Adam <=-

Hi Paul (& Frank),

FA> OOP is still C , it's just more object oriented :)

PW> Yeah, but if I start using classes and objects all over the
PW> place and then start asking about them in HERE...  <:-\

True, we'll flame you.  :) OTOH, it's quite possible to do OOP
without C++; an OOP oriented language like C++ just keeps things
less cluttered by hiding the details.

PW> Where's the closest SNIPPETS site to 3:640/772.3 that I can pick

The new version is due out this month.

PW> I was taught to "hate" global variables...  Come to think of it
PW> -- why

There's no need to hate them, they can be very useful, but because
they compromise the modularity of a program, they should be used
sparingly.  This is most important in larger programs, but consider
that it's a good habit to develop while working on smaller programs.

Generally, you can get by with external static variables, which are
only visible to the functions in the same source file.  You should
only use truly global variables when they really do have to be
accessable by many different functions spread over different source
modules.

Another point to consider is that depending on various factors,
including the compiler & the architecture, global variables may make
your code slower &/or larger, because of addressing requirements.

FA> I think it's just that, having the variables declared near the
FA> procedure using them, makes the code more readable.

Agreed, although comments can help, too.  :)

FA> On larger programs a number of functions may act on the same
FA> global variable making it hard to keep track of things after a
FA> while, strange bugs etc...

Been there, done that.  :)

PW> Damn.  What's ISO's address?  I'll write to them and tell them
PW> to put this heapwalk() function (and the rest of the
PW> heap-related functions of

FA> :-)

Interesting...  I wonder what it'd do on my Amiga...  :) I've seen
PC programmers talking about "the heap" and I guess it's where
malloc() gets its memory, but the rest is a mystery.  Memory
allocation is more anarchic over here. :)

PW> Well, if heapwalk() is so useful, why not?  Maybe someone could
PW> code their own portable heapwalk() and post it here???

In case you haven't guessed by now, that sort of thing is
environment-dependant.

PW> Righto.  So you want a BMW and I want a 10Mbit link to the US...
PW> :)

FA> Dammit, you'll probably get it first :)

PW> That's a PRIVATE link, mind you ;)

That's probably faster than accessing mmy old 80M Quantum.  :)

Michael Stapleton of Graphic Bits.

 * AmyBW v2.10 *
... This tagline is encrypted
--- AdeptXBBS v1.07f (Registered)
* Origin: Mach One BBS (3:713/615)
SEEN-BY: 633/267 270
@PATH: 713/317 711/808 50/99 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.