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



Gary Scott wrote:
(snip)

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.

That is one that I don't think you can do. The repeat specifier
comes before the data edit descriptor. If you allowed 0 indicating
to trim leading blanks, how would you apply a repeat specifier to it?

Suffixes can be applied to descriptors, the most common being the
indication of the number of places after the decimal point in descriptors for floating point values. It would look a little
strange, but it would seem possible to use that one.

Otherwise, as a way to get around an implied DO it still
seems a little excessive.

-- glen

.



Relevant Pages

  • Re: add a0 format to language to print trimmed character variables
    ... I don't think that would be the usual desire though, but maybe you could specify '0a0' to trim leading and trailing spaces. ... 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. ...
    (comp.lang.fortran)
  • 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: 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)