Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

there's a wey better way...

 [1/5] from: kpeters:otaksoft at: 11-Nov-2007 13:23


Right now I am using switch month [ 1 [ quarter: 1 ] 2 [ quarter : 1 ] 3 [ quarter : 1 ] 4 [ quarter : 2 ] 5 [ quarter : 2 ] 6 [ quarter : 2 ] 7 [ quarter : 3 ] 8 [ quarter : 3 ] 9 [ quarter : 3 ] 10 [ quarter : 4 ] 11 [ quarter : 4 ] 12 [ quarter : 4 ] ] Any suggestions? TIA Kai

 [2/5] from: luca:truffarelli:it at: 11-Nov-2007 22:47


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Maybe add to-integer ((add month -1) / 3) 1 but I'm not sure if it's worth it. Kai Peters wrote:
> Right now I am using > switch month [
<<quoted lines omitted: 12>>
> ] > Any suggestions?
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHN3hcU4grFviuxVQRAqwqAJ9jBjYfaczrTNZcyPRJdQeTpLbabgCfQaHh JZsyqzOkM3gOzzDFCJFxBhQ=q5nF -----END PGP SIGNATURE-----

 [3/5] from: luca:truffarelli:it at: 11-Nov-2007 22:51


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Or just quarter: select [1 1 2 1 3 1 4 2 5 2 6 2 7 3 8 3 9 3 10 4 11 4 12 4] month Kai Peters wrote:
> Right now I am using > switch month [
<<quoted lines omitted: 14>>
> TIA > Kai
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHN3lxU4grFviuxVQRApJ6AJ9e7L4s7yeTq1bD0v7Ocw5p86oVTgCfTnvx HhnuG8v7Nv3YiNLIifJZG70=38au -----END PGP SIGNATURE-----

 [4/5] from: dhsunanda:gm:ail at: 10-Nov-2007 18:29


quarter: pick [1 1 1 2 2 2 3 3 3 4 4 4] month Sunanda

 [5/5] from: compkarori:gmai:l at: 11-Nov-2007 23:14


If you using switch, you can factor out the set-word like this quarter: switch month [ n [ nn ]] but this is simpler quarter: 1 + to-integer month / 4 On Nov 12, 2007 10:23 AM, Kai Peters <kpeters-otaksoft.com> wrote:
> Right now I am using > switch month [
<<quoted lines omitted: 17>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Graham Chiu http://www.synapsedirect.com Synapse-EMR - innovative electronic medical records system

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted