logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: "Secret" operators: msg#00027

Subject: Re: "Secret" operators
* McGlinchy, Alistair (Alistair.McGlinchy@xxxxxxxxxxxxxxxxxxxxx) wrote:
> Hi All,
> 
> High in fun, but low in usefulness is -+- , a high precedence string
> numerifier. It sort of looks like an A C Clarke style spacestation so
> that's what I've been calling it. Although I'm not too sure that Larry's
> spaceship <=3D> would be able to dock to easily.

Of course it would!

  <=>
   |
   +
   |

Larry's probably been there a couple of times...

> Examples:
>       print -+-'23a'    # prints 23
>       print -+-'3.00'   # prints 3=09
>       print -+-'1.2e3'  # prints 1200
> =09
> I know 0+ does the trick too, but binary + has a relatively low
> precedence. Perl will automatically numerify the arguments of the *
> operator but won't do so for x, !~ or =3D~. Hence this operator is =
> useful
> for removing unsightly parenthesises from some expressions.
> 
>       print 0+'20GBP'   x 3;  # Wrong. Prints 20   =3D=3D
> 0+"20GBP20GBP20GBP"
>       print (0+'20GBP') x 3;  # Wrong. x 3 is applied to the return of
> print
>       print((0+'20GBP') x 3); # Right, but too Lispy=20
>       print -+-'20GBP'  x 3;  # Right. Spacestation to the rescue!
> 
> Unfortunately -+- is bugged [*], but I'll leave these as gotcha's for
> your production code. :-)
> 
> 
> 
> Cheers,
> 
> Alistair
> 
> [*] You might want to consider: print    -+- '-2B'      x 5;  # Bug?
> 
> 
> -----------------------------------------------------------------------
> 
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D
> Registered Office:
> Marks and Spencer plc
> Waterside House
> 35 North Wharf Road
> London
> W2 1NW
> 
> Registered No. 214436 in England and Wales.
> 
> Telephone (020) 7935 4422
> =46acsimile (020) 7487 2670
> 
> <<www.marksandspencer.com>>
> 
> Please note that electronic mail may be monitored.
> 
> This e-mail is confidential. If you received it by mistake, please =
> let us know and then delete it from your system; you should not =
> copy, disclose, or distribute its contents to anyone nor act in =
> reliance on this e-mail, as this is prohibited and may be unlawful.
--
Jose Alves de Castro <cog@xxxxxxxx>
      http://jose-castro.org/



Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe