🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #205

Re: TP or C ?

#205
From: Stuart Woolford
Date: Mon, 27 Jul 1992 00:51
59 lines
1896 bytes
tmkk@uiuc.edu (Khan) writes:


>In article <1992Jul23.182026.57480@cc.usu.edu> sl8nl@cc.usu.edu writes:
>>> what I want added to C:
>>> add scope control with '.' ie:
>>> int a;
>>> blort()
>>> 	{
>>> 	int a;
>>> 	a=1;	/* set LOCAL A=1 */
>>> 	.a=1;	/* set GLOBAL A=1 */
>>> 	}
>>> 
>>
>>Turbo Pascal already has that feature <sneer :)>

>GACK!! By allowing a programmer to have umpteen variables with the same
>name, Pascal actually ENCOURAGES you to write unintelligible code!!!
>Of course, C doesn't NEED that kind of scope control, because a C
>programmer would have written the above code fragment like this:


>// begin code fragment

>int a;

>void blort(void)
>//
>// B L O R T
>//
>// Description: A stupid example code snippet for posting to a Usenet
>//     newsgroup.
>//
>// Parameters:
>//     None.
>//
>// Global Variables Used:
>//     a
>//
>{
>int b;

>    b = 1;	// set LOCAL variable to 1
>    a = 1;	// set GLOBAL variable to 1
>}

>// end code fragment


>;-)

...GASP....But you are using C++....Not fair on poor little Pascal !! ;-)
(really, only c++ allows // comments  B-)
------------------------------------------------------------------------------
stuartw@ccu1.aukuni.ac.nz

			>>>>In VI Where Available<<<<
------------------------------------------------------------------------------
Technical Details
Message-ID: <1992Jul27.005111.3185@ccu1.aukuni.ac.nz>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!stuartw
References: <1992Jul23.182026.57480@cc.usu.edu> <cg.0afn@ami-cg.UUCP> <1992Jul15.153252.25417@esds.mdc.com> <1992Jul23.213310.17575@ccu1.aukuni.ac.nz> <BrwACA.1ru@news.cso.uiuc.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!waikato.ac.nz!aukuni.ac.nz!stuartw
Newsgroups: rec.games.programmer
Subject: Re: TP or C ?
Message-ID: <1992Jul27.005111.3185@ccu1.aukuni.ac.nz>
From: stuartw@ccu1.aukuni.ac.nz (Stuart Woolford)
Date: Mon, 27 Jul 1992 00:51:11 GMT
References: <1992Jul23.182026.57480@cc.usu.edu> <cg.0afn@ami-cg.UUCP>   
 <1992Jul15.153252.25417@esds.mdc.com>    <1992Jul23.213310.17575@ccu1.aukuni.ac.nz> <BrwACA.1ru@news.cso.uiuc.edu>
Organization: University of Auckland, New Zealand.
Lines: 59