Re: [Activetcl] split doing two different things
by Dossy Shiobara other posts by this author
Apr 8 2008 10:56AM messages near this date
view in the new Beta List Site
Re: [Activetcl] split doing two different things
|
Re: [Activetcl] split doing two different things
On 2008.04.08, Bahr, Michael <mbahr@[...].gov> wrote:
> > Indeed, as Jeff noted, how do you tell the difference between:
> >
> > split a,b,c, ","
> > and split a,b,c ","
> >
> > This is a very important distinction, one that Tcl won't trip
> > you up over. You can actually get Perl to do the same, it's
> > just the default will strip trailing empties.
> >
>
> I see these two strings as the same because I **see** a carriage return
> immediately after the comma (delimiter). This indicates to me that
> there **may be** another field but there is not.
Wow, Perl has deformed your sense of appropriate reality in sad ways.
:-)
What's the difference between these two arrays:
("a", "b", "c", "") and ("a", "b", "c")
Not being able to tell the difference programatically is a bug in the
programming language, not a feature.
--
Dossy Shiobara | dossy@[...].com | http://dossy.org/
Panoptic Computer Network | http://panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
_______________________________________________
ActiveTcl mailing list
ActiveTcl@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Gene Osteen
Jeff Hobbs
Flavio Salgueiro
Michael Bahr
Jeff Hobbs
Michael Bahr
Dossy Shiobara
Michael Bahr
Dossy Shiobara
Michael Bahr
Jeff Hobbs
Enrico Herzke
Michael Bahr
Jeff Dinsmore
Michael Bahr
Gene Osteen
Jeff Dinsmore
Enrico Herzke
|