Strings and Operators

From: JamesW (gingaloon_at_hotmail.com)
Date: 02/20/04


Date: 20 Feb 2004 00:49:10 -0800

Sorry if this occurs twice, my nicely typed one just vanished. Anyway in brief:

I want to store a range in a string, e.g. '2-5'.

I tried $range = $numOne.'-'.$numTwo+1;

And $range stored the sum of $numOne+1!
I got it to work with,

$range = $numOne.'-'.($numTwo+1);

I understand why this works not not why my initial instinct didn't.
Could someone please enlighten me?

Thanks
James



Relevant Pages

  • Re: Storing a value for later use in vba or a Macro
    ... Dim strCurrentCustomer as String ... do you programmatically store a value from one record to use in ...
    (microsoft.public.access.gettingstarted)
  • Re: Storing wave files in database
    ... analyse them and store everything in some sort of database. ... You don't store the Wave files in the database. ... ByVal lpOperation As String, _ ... Dim lRet As Long, varTaskID As Variant ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Question about a data structure
    ... I'll store the ... string, it could just be a simgle 150 character string. ... , personally, I'd avoid 'stringing' together responses. ...
    (alt.php)
  • RE: adding data to a file before it gets regexed
    ... The reasion I am trying to add the string to the line, is so that I can use ... it is not a good idea to store entire files in memory and it is really ... the arrays are the contents of the files broken down by lines. ... Any opinion expressed in this e-mail is personal to the sender ...
    (perl.beginners)
  • Re: Java Applet saving results on home server
    ... I can also store the results to a string and write that to a ... that has some data structures to store all the things I need, ... This puts you right back into your original question. ... I've got a problem with the Jakarta ftp client. ...
    (comp.lang.java.help)