How to complex switch?

Matthew Ong ongbp at yahoo.com
Thu May 12 05:07:14 PDT 2011


Sample Code of Bash left out in previous post.

----------------------------------------------------------------------
case $space in
[1-6]*) // <<< That if some sort of such logic can be supported in D.
  Message="All is quiet."
  ;;
[7-8]*)
  Message="Start thinking about cleaning out some stuff.  There's a partition that
is $space % full."
  ;;
9[1-8])
  Message="Better hurry with that new disk...  One partition is $space % full."
  ;;
99)
  Message="I'm drowning here!  There's a partition at $space %!"
  ;;
*)
  Message="I seem to be running with an nonexistent amount of disk space..."
  ;;
esac


More information about the Digitalmars-d mailing list