Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!psuvax1!schwartz From: schwartz@shire.cs.psu.edu (Scott Schwartz) Newsgroups: comp.lang.pascal Subject: Re: Standard Pascal Message-ID: Date: 15 Jul 89 04:19:17 GMT References: <8736@pyr.gatech.EDU> <168@bms-at.UUCP> Sender: news@psuvax1.cs.psu.edu Distribution: usa Organization: Pennsylvania State University, computer science Lines: 51 In article <168@bms-at.UUCP> stuart@bms-at.UUCP (Stuart Gathman) writes: | So in one case the terminating char is in "Filevar^", and in the | other case it is in "ch". Big deal. It is a big deal if "ch" is out of scope for whoever wants that character, yes/no? YES. | If pascal had macros, you could either in terms of the other. I doubt it. I've seen lots of people get exactly this construction wrong in C using macros. No more on this topic or I call the thought police. :-) | The pointer | stuff is a bother. The file variable stuff is just a convention as | to where your one character read ahead is kept. Using "ch" as a convention | is just as good as using "FileVar^", and more efficient to boot. What "pointer stuff" are you bothered by, and why? BY DEFINITION read (File, ch) MEANS begin ch := File^; get (File) end Care to explain HOW "ch" can be "more efficient" than "FileVar^"? It just ain't so. Also, "using 'ch' as a convention" is inferior from a software engineering standpoint (if nothing else) since now you are committed to having a global variable float around maintaining state for everyone. | (I prefer "unget(ch)" myself :-) Oops. Wrong newsgroup. :-) | BTW, Shouldn't "get(input)" be "get(FileVar)"? Yes. The posting you quoted had a typo. | In that case get and put | are even more braindamaged with such an inconsistent use of pointer notation. Could you explain that? Get is a procedure that takes a pointer to some hidden structure and modifies that structure. Seems consistent to me. -- Scott Schwartz