[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] substring function and bounds checks
From: |
John Cowan |
Subject: |
Re: [Chicken-hackers] substring function and bounds checks |
Date: |
Thu, 7 Feb 2013 21:50:20 -0500 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Alex Shinn scripsit:
> This is where you have a contradiction - the field is "fixed width"
> but the full width is not available, which means you have an invalid
> format.
Yes, in one sense. However, when transferring textual data between
heterogeneous systems it is very common for trailing spaces to be
discarded willy-nilly, and the approach described recovers from that
nicely. Be liberal in what you accept.
> If the goal is to take a fixed field you should be taking that. If
> the format allows either then the format itself is ambiguous, which
> means you have a _much_ bigger problem than whatever language
> idioms you use.
Purism has its place, but is not always the appropriate response
to Real World issues. In this case, kicking back such records
as "invalid/ambiguous format" simply would not have served the
organization's goals.
--
In my last lifetime, John Cowan
I believed in reincarnation; http://www.ccil.org/~cowan
in this lifetime, address@hidden
I don't. --Thiagi
- Re: [Chicken-hackers] substring function and bounds checks, (continued)
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, John Cowan, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Peter Bex, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/06
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, John Cowan, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks,
John Cowan <=
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, John Cowan, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/07
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/08
- Re: [Chicken-hackers] substring function and bounds checks, Alex Shinn, 2013/02/08
- Re: [Chicken-hackers] substring function and bounds checks, Michele La Monaca, 2013/02/08
- Re: [Chicken-hackers] substring function and bounds checks, Felix, 2013/02/08