[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: beginner Q: Kernel#puts, STDOUT, $stdout relation

Andreas S

12/9/2006 12:50:00 AM

Ah, yes, I decided to snoop around in the c files and this fits what I
thought I saw in there.

Thanks so much to all.

Regards,

-andre


>From: Eric Hodel <drbrain@segment7.net>
>Reply-To: ruby-talk@ruby-lang.org
>To: ruby-talk@ruby-lang.org (ruby-talk ML)
>Subject: Re: beginner Q: Kernel#puts, STDOUT, $stdout relation
>Date: Sat, 9 Dec 2006 09:39:56 +0900
>
>On Dec 8, 2006, at 14:16 , Andreas S wrote:
>>Can anybody help me understanding the relation between Kernel#puts,
>>STDOUT and $stdout?
>>
>>I thought 'puts' is equivalent to '$stdout.puts'. Why 'puts' doesn't give
>>same result as 'STDOUT.puts'?
>>
>>class << STDOUT
>> def puts(*args)
>> args[0] = "I say " + args[0] unless args.empty?
>> super(args)
>> end
>>end
>>
>>puts "hello"
>
>This calls $stdout.write "hello\n"
>
>>STDOUT.puts "hello"
>>$stdout.puts "hello"
>>=> hello
>> I say hello
>> I say hello
>
>PS:
>
>Please mess with $stdout, not STDOUT, if at all possible.
>
>http://blog.se.../articles/2006/08/17/stdout...
>
>--
>Eric Hodel - drbrain@segment7.net - http://blog.se...
>
>I LIT YOUR GEM ON FIRE!
>
>

_________________________________________________________________
Talk now to your Hotmail contacts with Windows Live Messenger.
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://get.live.com/messenge...


3 Answers

Hunter

2/4/2012 12:21:00 PM

0

In article <barmar-E3B9C7.18083903022012@news.eternal-september.org>,
barmar@alum.mit.edu says...
>
> In article <jghkim$ha1$2@news.albasani.net>,
> "Adam H. Kerman" <ahk@chinet.com> wrote:
>
> > Professor Bubba wrote:
> > >Adam H. Kerman <ahk@chinet.com> wrote:
> > >>Professor Bubba wrote:
> >
> > >>>The GE Building, OTOH, is at 30 Rockefeller Plaza, which is a real
> > >>>street address and has been since 1933. The plaza didn't exist before
> > >>>that. (They created Rockefeller Plaza by cutting through the middles
> > >>>of 48th through 51st Sts. between Fifth and Sixth Aves.)
> >
> > >>The plaza is a real place but it's not a dedicated street.
> >
> > >Okay, I don't get the distinction.
> >
> > John D. Rockefeller had the clout to do something the rest of us don't.
> > It's like Donald Trump being allowed to use the name of one of his
> > buildings as its address.
>
> But this is obviously not just the name of the building, like "Chrysler
> Building". The number 30 indicates that there's a whole plaza, with
> each building getting a number as an address.
----
Exactly.
>
> In Cambridge, MA, there's a section of town adjacent to MIT called
> "Kendall Square", and the buildings there are address 1 Kendall Square,
> 2 Kendall Square, etc. instead of using the street names in their
> addresses.
----
Here in New York City as an example other than 30 Rockefeller Plaza was (and
will be again) World Trade Center Plaza. Because of 9/11 1, 2 & 7 World Trade
Center being the most famous buildings. No actual street address in the
conventional sense. One World Trade Center *was* the Street address. If you put
that on an envelope along with the rest of the prerequisite address notations
that is where the US mail would send your letter to. So "30 Rock" is a legit
address. It has a building number and the building location, not on a
conventional street or avenue or boulevard but definitely a location.

Now there are buildings at the new World Trace Center Plaza that are known by
their WTC address *and* their street address. Four World Trade Center for
example will also be called 150 Greenwich Street. At least three other
buildings will also have a plaza and street building number but the new One
World Trade Center will be its only address reference.
>
> And getting a street named after yourself doesn't always require much
> clout. In my town, at least 80% of the street names are named after
> people -- when they were turning farmland into residential developments
> in the 19th century, the developers got to choose the street names, and
> they often named themselves or their relatives.
-----
True. If you spend the money on the place then you get to name it, even after
yourself. Like Levitt Town. :-)
--
----->Hunter

"No man in the wrong can stand up against
a fellow that's in the right and keeps on acomin'."

-----William J. McDonald
Captain, Texas Rangers from 1891 to 1907

Professor Bubba

2/4/2012 5:46:00 PM

0

In article <MPG.2996eca1d51d3f98a4b1@news.optonline.net>, Hunter
<buffhunter@my-deja.com> wrote:

> Here in New York City as an example other than 30 Rockefeller Plaza was (and
> will be again) World Trade Center Plaza. Because of 9/11 1, 2 & 7 World Trade
> Center being the most famous buildings. No actual street address in the
> conventional sense. One World Trade Center *was* the Street address.

IIRC the WTC also had its own Zip code, too.

Michael Black

2/4/2012 6:16:00 PM

0