Re: add a0 format to language to print trimmed character variables



On May 1, 3:24 pm, Clive Page <j...@xxxxxxxxxxxx> wrote:
In message <4q6Zh.1911$tp5.1...@xxxxxxxxxxxxxxxxxxxxxxxxxx>, Gary Scott
<garylsc...@xxxxxxxxxxxxx> writes

In order to be analogous to I0 though wouldn't it need to trim both
leading and trailing spaces? I don't think that would be the usual
desire though, but maybe you could specify '0a0' to trim leading and
trailing spaces.

I don't there such a pressing need - I0 only removes leading spaces
(there are no trailing ones). A0 would only trim trailing spaces (can
use ADJUSTL in the unusual case of wanting to trim leading ones as
well).

I admit it would be a minor inconsistency in the language, but not
unlike the need to use 123_kind for an integer constant, but
kind_"string" for a character constant. People seem to cope with that.

If you're going to the trouble to introduce a trailing space trim
edit, I see no reason not to introduce a similar leading space trim
edit. I agree that it would be needed less frequently, but that's no
reason not to add it when it would be so easy to do so and provide a
more complete solution.

--
Clive Page


.



Relevant Pages

  • Re: Simple Select Query
    ... was able to Trim them all out after the Chrwas removed (what a BAD ... I have a few simple character strings that won't "Trim", ... No luck with trailing spaces - does not make sense. ...
    (microsoft.public.access.gettingstarted)
  • RE: Pivot Table
    ... leading and trailing spaces removed). ... When you do the trim, ... Recreate your pivot table. ... Smith 10 hours ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Trim equivilant
    ... about Re: Trim equivilant ... CS>> standard is ... CS>> TRIM eliminates leading spaces, ... CS>> TRIM eliminates trailing spaces, ...
    (comp.lang.cobol)
  • Re: Trim equivilant
    ... Am I correct that the "temporary data item" created by the TRIM function will ... > Presuming DESTINATION PIC X, and presuming also MOVE LOW-VALUES TO ... > STRING FUNCTION TRIM (MY-DATA, RIGHT) DELIMITED BY SIZE INTO DESTINATION: ... >>> embedded and trailing spaces; ...
    (comp.lang.cobol)
  • Re: Trim()
    ... From the HelpFile of FM6 I copied the following. ... Trim has never done anything else ... You are correct about the Trim, it is only for leading and trailing spaces. ... In order to deal with multiple returns, you have to use a multiple ...
    (comp.databases.filemaker)