[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Multi-line variable

Googled

11/6/2006 6:44:00 AM

Hi,

is there any Ruby equivalent to:

php:

$var = <<<END
<multi>
<line>sometext</line>
<line>sometext</line>
<line>sometext</line>
</multi>
END;

so I can write multiline in a single variable ?

Regards.

7 Answers

Farrel Lifson

11/6/2006 6:53:00 AM

0

On 06/11/06, Googled <wanted@gmail.com> wrote:
> Hi,
>
> is there any Ruby equivalent to:
>
> php:
>
> $var = <<<END
> <multi>
> <line>sometext</line>
> <line>sometext</line>
> <line>sometext</line>
> </multi>
> END;
>
> so I can write multiline in a single variable ?
>
> Regards.
Almost the same syntax:
irb(main):001:0> var =<<END
irb(main):002:0" <line>sometext</line>
irb(main):003:0" <line>sometext</line>
irb(main):004:0" <line>sometext</line>
irb(main):005:0" END
=> " <line>sometext</line>\n <line>sometext</line>\n <line>sometext</line>\n"

Farrel

Googled

11/6/2006 6:58:00 AM

0

Thank you very much :)

Jano Svitok

11/6/2006 10:53:00 AM

0

there are small variations on the theme:

http://www.zenspider.com/Languages/Ruby/Quick...

<<identifier - interpolated, goes until identifier
<<"identifier" - same thing
<<'identifier' - no interpolation
<<-identifier - you can indent the identifier by using "-" in front

Barb May

12/16/2011 5:56:00 PM

0

Thanatos wrote:
> In article <9956-4EEAF7DD-246@storefull-3172.bay.webtv.net>,
> NewportsRetro@webtv.net (Stephen Newport) wrote:
>
>> From: barbmay@nonofyourbusinessx.tv (Barb May) Not all tax shelters
>> are legal, doofus.
>> http://www.irs.gov/businesses/corporations/article/0,,id=1206...
>> "Listed Abusive Tax Shelters and Transactions"
>> --------------------------------------------
>> SN: There ya go-- as Ethel Merman sang in ANNIE GET YOUR GUN.
>
> Just a list of shelters that can be abused, but which in and of
> themselves are not illegal.

Wrong again Thanny. Let's pick one at random:

http://www.irs.gov/pub/irs-utl/notice_2...
Notice 2000-61
The Internal Revenue Service and the
Treasury Department have become aware
of certain types of transactions that are
being marketed to taxpayers for the
avoidance of federal income taxes.

>
> As some Broadway hack once sang-- NICE TRY.

Irony.
--
Barb


Thanatos

12/17/2011 1:26:00 AM

0

In article <4eeb8a60@news.x-privat.org>,
"Barb May" <barbmay@nonofyourbusinessx.tv> wrote:

> Thanatos wrote:
> > In article <9956-4EEAF7DD-246@storefull-3172.bay.webtv.net>,
> > NewportsRetro@webtv.net (Stephen Newport) wrote:
> >
> >> From: barbmay@nonofyourbusinessx.tv (Barb May) Not all tax shelters
> >> are legal, doofus.
> >> http://www.irs.gov/businesses/corporations/article/0,,id=1206...
> >> "Listed Abusive Tax Shelters and Transactions"
> >> --------------------------------------------
> >> SN: There ya go-- as Ethel Merman sang in ANNIE GET YOUR GUN.
> >
> > Just a list of shelters that can be abused, but which in and of
> > themselves are not illegal.
>
> Wrong again Thanny. Let's pick one at random:
>
> http://www.irs.gov/pub/irs-utl/notice_2...
> Notice 2000-61
> The Internal Revenue Service and the
> Treasury Department have become aware
> of certain types of transactions that are
> being marketed to taxpayers for the
> avoidance of federal income taxes.

Note it says 'avoidance of federal income taxes'. Once again, tax
AVOIDANCE isn't a crime. Tax EVASION is.

Or are you going to claim the IRS really meant tax evasion, just like
you spun it for Newport?

> > As some Broadway hack once sang-- NICE TRY.
>
> Irony.

Yes, it is, but not for the reason you think.

Ubiquitous

12/17/2011 2:00:00 PM

0

atropos@mac.com wrote:
> Someone pretending to be "Barb May" <barbmay@nonofyourbusinessx.tv> wrote:
>> Thanatos wrote:
>> > In article <9956-4EEAF7DD-246@storefull-3172.bay.webtv.net>,
>> > NewportsRetro@webtv.net (Stephen Newport) wrote:
>> >> From: barbmay@nonofyourbusinessx.tv (Barb May) Not all tax shelters
>> >> are legal, doofus.
>> >> http://www.irs.gov/businesses/corporations/article/0,,id=1206...
>> >> "Listed Abusive Tax Shelters and Transactions"
>> >> --------------------------------------------
>> >> SN: There ya go-- as Ethel Merman sang in ANNIE GET YOUR GUN.
>> >
>> > Just a list of shelters that can be abused, but which in and of
>> > themselves are not illegal.
>>
>> Wrong again Thanny. Let's pick one at random:
>>
>> http://www.irs.gov/pub/irs-utl/notice_2...
>> Notice 2000-61
>> The Internal Revenue Service and the
>> Treasury Department have become aware
>> of certain types of transactions that are
>> being marketed to taxpayers for the
>> avoidance of federal income taxes.
>
>Note it says 'avoidance of federal income taxes'. Once again, tax
>AVOIDANCE isn't a crime. Tax EVASION is.
>
>Or are you going to claim the IRS really meant tax evasion, just like
>you spun it for Newport?

Funny how "Barb May" lies whenever she's lost the debate, isn't it?

--
"If Barack Obama isn't careful, he will become the Jimmy Carter of the
21st century."

Barb May

12/17/2011 9:14:00 PM

0

Thanatos wrote:
> In article <4eeb8a60@news.x-privat.org>,
> "Barb May" <barbmay@nonofyourbusinessx.tv> wrote:
>
>> Thanatos wrote:
>>> In article <9956-4EEAF7DD-246@storefull-3172.bay.webtv.net>,
>>> NewportsRetro@webtv.net (Stephen Newport) wrote:
>>>
>>>> From: barbmay@nonofyourbusinessx.tv (Barb May) Not all tax shelters
>>>> are legal, doofus.
>>>> http://www.irs.gov/businesses/corporations/article/0,,id=1206...
>>>> "Listed Abusive Tax Shelters and Transactions"
>>>> --------------------------------------------
>>>> SN: There ya go-- as Ethel Merman sang in ANNIE GET YOUR GUN.
>>>
>>> Just a list of shelters that can be abused, but which in and of
>>> themselves are not illegal.
>>
>> Wrong again Thanny. Let's pick one at random:
>>
>> http://www.irs.gov/pub/irs-utl/notice_2...
>> Notice 2000-61
>> The Internal Revenue Service and the
>> Treasury Department have become aware
>> of certain types of transactions that are
>> being marketed to taxpayers for the
>> avoidance of federal income taxes.
>
> Note it says 'avoidance of federal income taxes'. Once again, tax
> AVOIDANCE isn't a crime. Tax EVASION is.

That's you trying to change the subject. I direct your attention to the
comment you made above, "Just a list of shelters that can be abused, but
which in and of themselves are not illegal."


>
> Or are you going to claim the IRS really meant tax evasion, just like
> you spun it for Newport?

You know better than this, so it just highlights how far you are willing
to go to avoid admitting you're wrong.

The publication I cited is listed in an index called:
http://www.irs.gov/businesses/corporations/article/0,,id=1206...
"Listed Abusive Tax Shelters and Transactions"

Note the use of the word "Abusive" which is IRS-speak for "illegal."

http://www.irs.gov/publications/p550/ch02.html#en_US_2010_publin...
Abusive tax shelters are marketing schemes involving artificial
transactions with little or no economic reality.

Because there are many abusive tax shelters, it is not possible to list
all the factors you should consider in determining whether an offering
is an abusive tax shelter. However, you should ask the following
questions, which might provide a clue to the abusive nature of the plan.

* Do the tax benefits far outweigh the economic benefits?
* Is this a transaction you would seriously consider, apart from the
tax benefits, if you hoped to make a profit?

--
Barb