Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #13087 > unrolled thread
| Started by | richard <noreply@example.com> |
|---|---|
| First post | 2014-03-07 22:22 -0500 |
| Last post | 2014-03-08 09:16 -0500 |
| Articles | 5 — 3 participants |
Back to article view | Back to comp.lang.php
When a random file is not found then what? richard <noreply@example.com> - 2014-03-07 22:22 -0500
Re: When a random file is not found then what? Jerry Stuckle <jstucklex@attglobal.net> - 2014-03-07 22:56 -0500
Re: When a random file is not found then what? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-03-08 04:03 +0000
Re: When a random file is not found then what? richard <noreply@example.com> - 2014-03-08 08:47 -0500
Re: When a random file is not found then what? Jerry Stuckle <jstucklex@attglobal.net> - 2014-03-08 09:16 -0500
| From | richard <noreply@example.com> |
|---|---|
| Date | 2014-03-07 22:22 -0500 |
| Subject | When a random file is not found then what? |
| Message-ID | <1668mopewczco.c3whop265tfe.dlg@40tude.net> |
I want to set up a routine so that when a file does not exist, another file is selected. 1) select the year randomly. 2) selectt one of 100 numbers. 3) combine the pair. 4) locate file and play. 5) if file does not exist, do it again until one is found. My thinking is, create an array of file names. Then cycle through that until a match is found. Any other ways?
[toc] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-03-07 22:56 -0500 |
| Message-ID | <lfe4ct$o1k$1@dont-email.me> |
| In reply to | #13087 |
On 3/7/2014 10:22 PM, richard wrote: > I want to set up a routine so that when a file does not exist, another file > is selected. > > 1) select the year randomly. > 2) selectt one of 100 numbers. > 3) combine the pair. > 4) locate file and play. > 5) if file does not exist, do it again until one is found. > > My thinking is, create an array of file names. > Then cycle through that until a match is found. > > Any other ways? > On a clear disk, you can seek forever... -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [next] | [standalone]
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Date | 2014-03-08 04:03 +0000 |
| Message-ID | <0.a0d1a3d61cdfaaeab0c9.20140308040315GMT.87r46d49rw.fsf@bsb.me.uk> |
| In reply to | #13087 |
richard <noreply@example.com> writes: > I want to set up a routine so that when a file does not exist, another file > is selected. > > 1) select the year randomly. > 2) selectt one of 100 numbers. > 3) combine the pair. > 4) locate file and play. > 5) if file does not exist, do it again until one is found. Why not select and play a file chosen randomly from those that do exist, possibly filtered by some criterion such a the year? -- Ben.
[toc] | [prev] | [next] | [standalone]
| From | richard <noreply@example.com> |
|---|---|
| Date | 2014-03-08 08:47 -0500 |
| Message-ID | <1ba490war220a.1qml1y3otvc0d$.dlg@40tude.net> |
| In reply to | #13089 |
On Sat, 08 Mar 2014 04:03:15 +0000, Ben Bacarisse wrote: > richard <noreply@example.com> writes: > >> I want to set up a routine so that when a file does not exist, another file >> is selected. >> >> 1) select the year randomly. >> 2) selectt one of 100 numbers. >> 3) combine the pair. >> 4) locate file and play. >> 5) if file does not exist, do it again until one is found. > > Why not select and play a file chosen randomly from those that do exist, > possibly filtered by some criterion such a the year? yeah that could work. read the directory, build the array on what's in it. select from the array.
[toc] | [prev] | [next] | [standalone]
| From | Jerry Stuckle <jstucklex@attglobal.net> |
|---|---|
| Date | 2014-03-08 09:16 -0500 |
| Message-ID | <lff8ob$a33$1@dont-email.me> |
| In reply to | #13089 |
On 3/7/2014 11:03 PM, Ben Bacarisse wrote: > richard <noreply@example.com> writes: > >> I want to set up a routine so that when a file does not exist, another file >> is selected. >> >> 1) select the year randomly. >> 2) selectt one of 100 numbers. >> 3) combine the pair. >> 4) locate file and play. >> 5) if file does not exist, do it again until one is found. > > Why not select and play a file chosen randomly from those that do exist, > possibly filtered by some criterion such a the year? > That would make too much sense. Remember who you're talking to... -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ==================
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.php
csiph-web