zsh-users
 help / color / mirror / code / Atom feed
From: "Com MN PG P E B Consultant 3" <mn-pg-p-e-b-consultant-3.com@siemens.com>
To: "Bart Schaefer" <schaefer@brasslantern.com>, <zsh-users@sunsite.dk>
Subject: RE: Style question: Can this be written in a more elegant way?
Date: Tue, 25 Apr 2006 08:37:26 +0200	[thread overview]
Message-ID: <6F0CB04509C11D46A54232E852E390AC013D9EF9@MCHP7R6A.ww002.siemens.net> (raw)

> I think you mean:
> 
>     file=( X*(Nom[1]) )
>     (( $+file )) && PROG_SUCCESS $file || PROG_FAIL
> 
> However, that will run PROG_FAIL if PROG_SUCCESS fails, as well as if
> there are no matching files.  I don't think you can avoid if/else.
> 
>     if (( $+file )); then PROG_SUCCESS $file; else PROG_FAIL; fi
> 
> Note that in the event that there are two or more files with the same
> time stamp, there's no guarantee which one of them is chosen, and in
> fact X*(om[1]) and X*(Om[1]) might both choose the same file.

Thank you. This ambiguity would not be a problem in my case. Just out of
curiosity:

[OT] How exact are time stamps on files? If, basically, a time_t value
is choosen
for a time stamp, then in practice the only possibility for two files to
come
up with the same time stamp, is when the time stamp is explicitly
supplied
via "touch", isn't it?

Ronald
-- 
Ronald Fischer (phone +49-89-63676431)
mailto:mn-pg-p-e-b-consultant-3.com@siemens.com


             reply	other threads:[~2006-04-25  6:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-25  6:37 Com MN PG P E B Consultant 3 [this message]
2006-04-25  8:01 ` Marc Chantreux
2006-04-25 15:06   ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2006-04-24  7:26 Com MN PG P E B Consultant 3
2006-04-24  8:27 ` Marc Chantreux
2006-04-24 15:21   ` Bart Schaefer
2006-04-25  7:55     ` Marc Chantreux
2006-04-25 14:41       ` Bart Schaefer
2006-04-25 14:58         ` Marc Chantreux
2006-04-25 17:03           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6F0CB04509C11D46A54232E852E390AC013D9EF9@MCHP7R6A.ww002.siemens.net \
    --to=mn-pg-p-e-b-consultant-3.com@siemens.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).