Re: skip an item to WRITE using a FORMAT

From: Phillip Helbig---remove CLOTHES to reply (helbig_at_astro.multiCLOTHESvax.de)
Date: 12/08/04


Date: Wed, 8 Dec 2004 18:45:48 +0000 (UTC)

In article <1102524349.769695.131020@c13g2000cwb.googlegroups.com>,
beliavsky@aol.com writes:

> Is it possible to skip the WRITE'ing of an item in an output list by
> modifying the FORMAT? For example, to print elements [1,2,4] of array
> ivec(1:4) I can just write
>
> write (*,"(100i6)") ivec((/1,2,4/))
>
> but I would like to do it as
>
> write (*,fmt_skip) ivec
>
> where fmt_skip tells the compiler to skip printing ivec(3). I want to
> be able to change the output of a program by changing the format
> string, which can be read from a text file, rather than changing the
> source code. It would be nice if something like

The FORMAT can be a character variable, which of course you can read
from a text file. Or am I missing something?



Relevant Pages

  • Re: vm02 update
    ... Instant Pascal was a misguided attempt at creating an IDE with automatic formatting and almost instant feedback. ... Editing the source in a tokenized format would keep the memory constraints lower and ease the first pass of the compiler. ... compiled to machine code at all. ...
    (comp.sys.apple2.programmer)
  • Re: OT: ASCII files and Intel P4 MMX instructions
    ... ASCII ... The file format is clean, one number per line, no fuzz. ... While I have played a bit with the settings in the compiler, ... are often dominated by the conversion from and to the external character ...
    (comp.dsp)
  • Re: Strange error in CLISP
    ... I removed the last parameter to #'format by mistake, ... Didn't expect the compiler to be ... the very flexible nature of format string directives, ... (defun test (flag) ...
    (comp.lang.lisp)
  • Re: replace statement and free format
    ... doesn't) that a vendor PRODUCE a compile-time listing of the source code. ... Free form reference format allows for each source line to have 255 characters ... - Depending on how many "passes" your compiler does of source code, ...
    (comp.lang.cobol)
  • Re: Deleting un(?)reachable code
    ... CDR form. ... Usually when I get these "deleting unreachable code" errors its because I did something stupid, generally rather far from the code which is flagged. ... Why does the compiler single out the format strings as ...
    (comp.lang.lisp)

Loading