1. Find 3: The Reckoning
- Posted by Paul Kerslake <paulk at UNISERVE.COM> Oct 29, 2000
- 502 views
------=_NextPart_000_0010_01C04190.EA48A7A0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable No, it's not a new movie, it's the same problem.........sort of... Have a peek at this: include get.e sequence names,curname object input integer location atom wn wn=3Drand(3) names =3D{"bob","them","worms"} curname=3Dnames[wn] printf(1,"curname: %s\n",{curname}) input=3Dgets(0) ? curname puts(1,"\n") ? input location =3D find(input[1],names[2]) puts(1,"\n") ? location The "location" variable only gives a correct number if "them" is = used. Nothing else. I've looked at all the documentation I've got and = either I am quite blind or, I just haven't found my solution. Anywho, if = you could solve this problem, I'd be most grateful.... Das Svendanya Thomas PS. This should be the last one......... ---------/\=3D=3D=3D=3D=3D=3D=3D ------=_NextPart_000_0010_01C04190.EA48A7A0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>No, it's not a new movie, it's the same = problem.........sort of...</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Have a peek at this:</FONT></DIV> <DIV> </DIV> <DIV><FONT color=3D#000080 face=3DArial size=3D2>include = get.e<BR>sequence=20 names,curname<BR>object input<BR>integer location<BR>atom=20 wn<BR>wn=3Drand(3)<BR>names=20 %s\n",{curname})</FONT></DIV> <DIV> </DIV> <DIV><FONT color=3D#000080 face=3DArial size=3D2>input=3Dgets(0)<BR>?=20 curname<BR>puts(1,"\n")<BR>? input</FONT></DIV> <DIV> </DIV> <DIV><FONT color=3D#000080 face=3DArial size=3D2>location =3D=20 find(input[1],names[2])</FONT></DIV> <DIV> </DIV> <DIV><FONT color=3D#000080 face=3DArial size=3D2>puts(1,"\n")<BR>?=20 location</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2> The "location" = variable only=20 gives a correct number if "them" is used. Nothing else. I've looked at = all the=20 documentation I've got and either I am quite blind or, I just haven't = found my=20 solution. Anywho, if you could solve this problem, I'd be most=20 grateful....</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>Das Svendanya</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>PS. This <EM>should</EM> be the = last=20 one.........</FONT></DIV> <DIV><FONT face=3DArial = ------=_NextPart_000_0010_01C04190.EA48A7A0--
2. Re: Find 3: The Reckoning
- Posted by Derek Parnell <dparnell at BIGPOND.NET.AU> Oct 30, 2000
- 454 views
------=_NextPart_000_014A_01C04234.2004EC20 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Ok Thomas, I'll bite. ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot) include get.e sequence names,curname object input integer location atom wn wn=3Drand(3) names =3D{"bob","them","worms"} curname=3Dnames[wn] printf(1,"curname: %s\n",{curname}) input=3Dgets(0) ? curname puts(1,"\n") ? input location =3D find(input[1],names[2]) This previous line is saying "Find where the first character of input = inside of the second sequence of names". Is this what you are really = trying to find out? I suspect you are trying to find out if "input" is one of the three = possible names. If that is so, try this instead... if sequence(input) then -- Strip off the trailing newline char. input =3D input[1 .. length(input) - 1] -- convert to lowercase. input =3D lower(input) -- See if the input sequence is one of the sequences in names. location =3D find(input, names) -- "location" should equal 0, 1, 2, or 3 now. else -- End-Of-File (Ctrl-Z) entered. location =3D 0 end if =20 puts(1,"\n") ? location The "location" variable only gives a correct number if "them" is = used.=20 And what is the correct number? What were you expecting to see? Nothing else. I've looked at all the documentation I've got and either = I am quite blind or, I just haven't found my solution. Anywho, if you = could solve this problem, I'd be most grateful.... I suspect you are confused by the find() function. It takes two = parameters, the first can be an atom or a sequence but the second must = be a sequence. It then scans each element in the second parameter to see = if it equals the first parameter. If so, it returns the number of the = element in the second parmeter that equalled the first parameter. This means that if the first parameter is a sequence, as is your case = here, then each of the elements in the second parmeter should be = sequences too. Also, this is what you have coded for names. However, in = your coding of find() you used input[1] which is not a sequence but the = first character of input. It is a single character - an atom. Also, you = coded the second parameter as names[2] which is a sequence if characters = - namely "them" . Thus, find() went looking through the characters ''t', = 'h', 'e', and 'm' to see if the first character of input equalled any. This would mean that location would be non-zero, 1 to 4, for any input = that begun with 't', 'h', 'e', or 'm'. Das Svendanya Thomas PS. This should be the last one......... Yeah, sure Thomas.=20 ------=_NextPart_000_014A_01C04234.2004EC20 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial size=3D2>Ok = Thomas, I'll=20 bite.</FONT></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial=20 size=3D2></FONT> </DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial">------<BR>Derek = Parnell<BR>Melbourne,=20 Australia<BR>(Vote [1] The Cheshire Cat for Internet Mascot)<BR></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>include = get.e<BR>sequence=20 names,curname<BR>object input<BR>integer location<BR>atom=20 wn<BR>wn=3Drand(3)<BR>names=20 =3D{"bob","them","worms"}<BR>curname=3Dnames[wn]<BR>printf(1,"curname: = %s\n",{curname})</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>input=3Dgets(0)<BR>?=20 curname<BR>puts(1,"\n")<BR>? input</FONT></DIV> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial color=3D#000080 size=3D2>location =3D=20 find(input[1],names[2])</FONT></DIV></FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This previous line is = saying "Find=20 where the first character of input inside of the second sequence of=20 names". Is this what you are really trying to find = out?</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are trying to = find out if=20 "input" is one of the three possible names. If that is so, try this=20 instead...</FONT></DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"> <DIV dir=3Dltr><STRONG><FONT size=3D2>if sequence(input)=20 then</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- Strip off = the trailing=20 newline char.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D = input[1 ..=20 length(input) - 1]</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- convert to = lowercase.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D=20 lower(input)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- See if the = input=20 sequence is one of the sequences in names.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> location =3D = find(input,=20 names)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- "location" = should=20 equal 0, 1, 2, or 3 now.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2>else</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = End-Of-File (Ctrl-Z)=20 entered.</FONT></STRONG></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG> location =3D=20 0</STRONG></FONT></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG>end if</STRONG><FONT=20 face=3DArial> = </FONT></FONT></DIV> <DIV dir=3Dltr><STRONG><FONT = <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>puts(1,"\n")<BR>?=20 location</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> The "location" = variable only=20 gives a correct number if "them" is used. </FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>And what is the = <STRONG>correct</STRONG>=20 number? What were you expecting to see?</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2>Nothing else. I've looked at all the=20 documentation I've got and either I am quite blind or, I just haven't = found my=20 solution. Anywho, if you could solve this problem, I'd be most=20 grateful....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are confused by = the <STRONG>find()</STRONG> function. It takes two parameters, the = first=20 can be an atom or a sequence but the second must be a sequence. It then = scans=20 each element in the second parameter to see if it equals the first = parameter. If=20 so, it returns the number of the element in the second parmeter that = equalled=20 the first parameter.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This means that if the first = parameter is a=20 sequence, as is your case here, then each of the elements in the second = parmeter=20 should be sequences too. Also, this is what you have coded for = <EM>names</EM>.=20 However, in your coding of <STRONG>find()</STRONG> you used = <EM>input[1]</EM>=20 which is <STRONG>not</STRONG> a sequence but the first character of = input. It is=20 a single character - an atom. Also, you coded the second parameter = as=20 <EM>names[2]</EM> which is a sequence if characters - namely = <EM>"them"</EM> .=20 Thus, <STRONG>find()</STRONG> went looking through the characters ''t', = 'h',=20 'e', and 'm' to see if the first character of <EM>input</EM> equalled=20 any.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This would mean that = <EM>location</EM>=20 would be non-zero, 1 to 4, for any input that begun with 't', 'h', = 'e', or=20 'm'.</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Das Svendanya</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>PS. This <EM>should</EM> be the = last=20 one.........</FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>Yeah, sure Thomas.=20 ------=_NextPart_000_014A_01C04234.2004EC20--
3. Re: Find 3: The Reckoning
- Posted by Al Getz <xaxo at AOL.COM> Oct 29, 2000
- 501 views
Take a look at the sequence returned by gets(0). "input=gets(0)" also "gets" the return char at the end of line when you hit the 'enter' key and looks like a 10 decimal at the end of the sequence. When you try to compare it or 'find' it, what you end up comparing is really the word you type in plus the line feed (decimal 10) at the end of the word. You must remove this before comparing it with any other word by deleting the last char from the word you type in: object inputstring inputstring=gets(0) ? inputstring --view with the extra char at end of word if sequence(inputstring) then inputstring=inputstring[1..length(inputstring)-1] else inputstring="" end if ? inputstring --view without the extra char puts(1,"press a key to exit") ink=wait_key() Good luck with it.... --Al
4. Re: Find 3: The Reckoning
- Posted by Liona Kerslake <paulk at UNISERVE.COM> Oct 31, 2000
- 553 views
------=_NextPart_000_000B_01C04352.1E3BF900 boundary="----=_NextPart_001_000C_01C04352.1E3BF900" ------=_NextPart_001_000C_01C04352.1E3BF900 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ----- Original Message -----=20 From: Derek Parnell=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Sunday, October 29, 2000 10:42 AM Subject: Re: Find 3: The Reckoning Ok Thomas, I'll bite. =20 ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot) =20 include get.e sequence names,curname object input integer location atom wn wn=3Drand(3) names =3D{"bob","them","worms"} curname=3Dnames[wn] printf(1,"curname: %s\n",{curname}) =20 input=3Dgets(0) ? curname puts(1,"\n") ? input location =3D find(input[1],names[2]) This previous line is saying "Find where the first character of input = inside of the second sequence of names". Is this what you are really = trying to find out? I suspect you are trying to find out if "input" is one of the three = possible names. If that is so, try this instead... if sequence(input) then -- Strip off the trailing newline char. input =3D input[1 .. length(input) - 1] -- convert to lowercase. input =3D lower(input) -- See if the input sequence is one of the sequences in names. location =3D find(input, names) -- "location" should equal 0, 1, 2, or 3 now. else -- End-Of-File (Ctrl-Z) entered. location =3D 0 end if =20 =20 =20 puts(1,"\n") ? location =20 =20 The "location" variable only gives a correct number if "them" is = used.=20 And what is the correct number? What were you expecting to see? Nothing else. I've looked at all the documentation I've got and = either I am quite blind or, I just haven't found my solution. Anywho, if = you could solve this problem, I'd be most grateful.... =20 I suspect you are confused by the find() function. It takes two = parameters, the first can be an atom or a sequence but the second must = be a sequence. It then scans each element in the second parameter to see = if it equals the first parameter. If so, it returns the number of the = element in the second parmeter that equalled the first parameter. =20 This means that if the first parameter is a sequence, as is your case = here, then each of the elements in the second parmeter should be = sequences too. Also, this is what you have coded for names. However, in = your coding of find() you used input[1] which is not a sequence but the = first character of input. It is a single character - an atom. Also, you = coded the second parameter as names[2] which is a sequence if characters = - namely "them" . Thus, find() went looking through the characters ''t', = 'h', 'e', and 'm' to see if the first character of input equalled any. =20 This would mean that location would be non-zero, 1 to 4, for any input = that begun with 't', 'h', 'e', or 'm'. =20 Das Svendanya Thomas PS. This should be the last one......... Yeah, sure Thomas. --------I meant the last one on this program, but, = you're right What I'm trying to do here is get the placement of an individual = letter from a word. So if the word is "moor" and the user types in = 'o'.....wait, bad example, there are two o's....would eusphoria see that = as [2..3]? okay, if the user types in 'r', whatever variable I assigned find() to = will be 4. -Hope this clarifies things..... -HAPPY HALLOWEEN!!! -Thomas PS. How'd you like the Halloween-esque sound? ------=_NextPart_001_000C_01C04352.1E3BF900 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff><BGSOUND balance=3D0=20 src=3D"cid:000a01c04395$2bf15c00$0100007f@kerslake" volume=3D0> <DIV> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A href=3D"mailto:dparnell at BIGPOND.NET.AU" = title=3Ddparnell at BIGPOND.NET.AU>Derek=20 Parnell</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20 title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, October 29, 2000 = 10:42=20 AM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Find 3: The = Reckoning</DIV> <DIV><BR></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial = size=3D2>Ok Thomas, I'll=20 bite.</FONT></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial=20 size=3D2></FONT> </DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial">------<BR>Derek = Parnell<BR>Melbourne,=20 Australia<BR>(Vote [1] The Cheshire Cat for Internet Mascot)<BR></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; = MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT color=3D#000080 face=3DArial size=3D2>include = get.e<BR>sequence=20 names,curname<BR>object input<BR>integer location<BR>atom=20 wn<BR>wn=3Drand(3)<BR>names=20 = %s\n",{curname})</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT color=3D#000080 face=3DArial = size=3D2>input=3Dgets(0)<BR>?=20 curname<BR>puts(1,"\n")<BR>? input</FONT></DIV> <DIV><FONT face=3DArial size=3D2> <DIV><FONT color=3D#000080 face=3DArial size=3D2>location =3D=20 find(input[1],names[2])</FONT></DIV></FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This previous line is = saying "Find=20 where the first character of input inside of the second sequence of=20 names". Is this what you are really trying to find = out?</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are trying to = find out if=20 "input" is one of the three possible names. If that is so, try this=20 instead...</FONT></DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"> <DIV dir=3Dltr><STRONG><FONT size=3D2>if sequence(input)=20 then</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- Strip = off the=20 trailing newline char.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D = input[1 ..=20 length(input) - 1]</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- convert = to=20 lowercase.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D=20 lower(input)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- See if = the input=20 sequence is one of the sequences in names.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> location = =3D find(input,=20 names)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = "location" should=20 equal 0, 1, 2, or 3 now.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2>else</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = End-Of-File (Ctrl-Z)=20 entered.</FONT></STRONG></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG> location = =3D=20 0</STRONG></FONT></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG>end if</STRONG><FONT=20 face=3DArial> = </FONT></FONT></DIV> <DIV dir=3Dltr><STRONG><FONT = <BLOCKQUOTE dir=3Dltr=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; = MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT color=3D#000080 face=3DArial size=3D2>puts(1,"\n")<BR>?=20 location</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> The "location" = variable only=20 gives a correct number if "them" is used. </FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>And what is the = <STRONG>correct</STRONG>=20 number? What were you expecting to see?</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; = MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2>Nothing else. I've looked at all = the=20 documentation I've got and either I am quite blind or, I just = haven't found=20 my solution. Anywho, if you could solve this problem, I'd be most=20 grateful....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are confused = by=20 the <STRONG>find()</STRONG> function. It takes two parameters, = the first=20 can be an atom or a sequence but the second must be a sequence. It = then scans=20 each element in the second parameter to see if it equals the first = parameter.=20 If so, it returns the number of the element in the second parmeter = that=20 equalled the first parameter.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This means that if the = first parameter is=20 a sequence, as is your case here, then each of the elements in the = second=20 parmeter should be sequences too. Also, this is what you have coded = for=20 <EM>names</EM>. However, in your coding of <STRONG>find()</STRONG> you = used=20 <EM>input[1]</EM> which is <STRONG>not</STRONG> a sequence but the = first=20 character of input. It is a single character - an atom. Also, you = coded=20 the second parameter as <EM>names[2]</EM> which is a sequence if = characters -=20 namely <EM>"them"</EM> . Thus, <STRONG>find()</STRONG> went looking = through=20 the characters ''t', 'h', 'e', and 'm' to see if the first character = of=20 <EM>input</EM> equalled any.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This would mean that = <EM>location</EM>=20 would be non-zero, 1 to 4, for any input that begun with 't', = 'h', 'e',=20 or 'm'.</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; = MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Das Svendanya</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>PS. This <EM>should</EM> be = the last=20 one.........</FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>Yeah, sure Thomas. = --------I meant=20 the last one on this program, but, you're right </FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>What I'm trying to do here = is get the=20 placement of an individual letter from a word. So if the word is = "moor" and=20 the user types in 'o'.....wait, bad example, there are two = o's....would=20 eusphoria see that as [2..3]?</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>okay, if the user types in = 'r', whatever=20 variable I assigned find() to will be 4.</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>-Hope this clarifies=20 things.....</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D6>-H<FONT = color=3D#ff8000>A</FONT>P<FONT=20 color=3D#ff8000>P</FONT>Y <FONT color=3D#ff8000>H</FONT>A<FONT=20 color=3D#ff8000>L</FONT>L<FONT color=3D#ff8000>O</FONT>W<FONT=20 color=3D#ff8000>E</FONT>E<FONT color=3D#ff8000>N</FONT>!<FONT=20 color=3D#ff8000>!</FONT>!</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>-Thomas</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>PS. How'd you like the = Halloween-esque=20 sound?</FONT><FONT face=3DArial=20 ------=_NextPart_001_000C_01C04352.1E3BF900-- ------=_NextPart_000_000B_01C04352.1E3BF900 name="Guillotn.wav"
5. Re: Find 3: The Reckoning
- Posted by Kat <gertie at PELL.NET> Oct 31, 2000
- 459 views
On 31 Oct 2000, at 15:49, Liona Kerslake wrote: > PS. How'd you like the Halloween-esque sound? What sound? Kat
6. Re: Find 3: The Reckoning
- Posted by Euman <euman at BELLSOUTH.NET> Oct 31, 2000
- 481 views
- Last edited Nov 01, 2000
------=_NextPart_000_000D_01C0438E.B19198E0 boundary="----=_NextPart_001_000E_01C0438E.B19198E0" ------=_NextPart_001_000E_01C0438E.B19198E0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I dont like it!!!! PLEASE dont make us download extra bytes to play sounds...... Thanks: euman at bellsouth.net ----- Original Message -----=20 From: Liona Kerslake=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Tuesday, October 31, 2000 6:49 PM Subject: Re: Find 3: The Reckoning ----- Original Message -----=20 From: Derek Parnell=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Sunday, October 29, 2000 10:42 AM Subject: Re: Find 3: The Reckoning Ok Thomas, I'll bite. ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot) include get.e sequence names,curname object input integer location atom wn wn=3Drand(3) names =3D{"bob","them","worms"} curname=3Dnames[wn] printf(1,"curname: %s\n",{curname}) input=3Dgets(0) ? curname puts(1,"\n") ? input location =3D find(input[1],names[2]) This previous line is saying "Find where the first character of = input inside of the second sequence of names". Is this what you are = really trying to find out? I suspect you are trying to find out if "input" is one of the three = possible names. If that is so, try this instead... if sequence(input) then -- Strip off the trailing newline char. input =3D input[1 .. length(input) - 1] -- convert to lowercase. input =3D lower(input) -- See if the input sequence is one of the sequences in names. location =3D find(input, names) -- "location" should equal 0, 1, 2, or 3 now. else -- End-Of-File (Ctrl-Z) entered. location =3D 0 end if =20 puts(1,"\n") ? location The "location" variable only gives a correct number if "them" = is used.=20 And what is the correct number? What were you expecting to see? Nothing else. I've looked at all the documentation I've got and = either I am quite blind or, I just haven't found my solution. Anywho, if = you could solve this problem, I'd be most grateful.... I suspect you are confused by the find() function. It takes two = parameters, the first can be an atom or a sequence but the second must = be a sequence. It then scans each element in the second parameter to see = if it equals the first parameter. If so, it returns the number of the = element in the second parmeter that equalled the first parameter. This means that if the first parameter is a sequence, as is your = case here, then each of the elements in the second parmeter should be = sequences too. Also, this is what you have coded for names. However, in = your coding of find() you used input[1] which is not a sequence but the = first character of input. It is a single character - an atom. Also, you = coded the second parameter as names[2] which is a sequence if characters = - namely "them" . Thus, find() went looking through the characters ''t', = 'h', 'e', and 'm' to see if the first character of input equalled any. This would mean that location would be non-zero, 1 to 4, for any = input that begun with 't', 'h', 'e', or 'm'. Das Svendanya Thomas PS. This should be the last one......... Yeah, sure Thomas. --------I meant the last one on this program, = but, you're right What I'm trying to do here is get the placement of an individual = letter from a word. So if the word is "moor" and the user types in = 'o'.....wait, bad example, there are two o's....would eusphoria see that = as [2..3]? okay, if the user types in 'r', whatever variable I assigned find() = to will be 4. -Hope this clarifies things..... -HAPPY HALLOWEEN!!! -Thomas PS. How'd you like the Halloween-esque sound? ------=_NextPart_001_000E_01C0438E.B19198E0 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>I dont like it!!!!</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>PLEASE dont make us download extra=20 bytes</FONT></DIV> <DIV><FONT face=3DArial size=3D2>to play sounds......</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Thanks:</FONT></DIV> <DIV><FONT face=3DArial size=3D2><A=20 <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dpaulk at UNISERVE.COM href=3D"mailto:paulk at UNISERVE.COM">Liona = Kerslake</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DEUPHORIA at LISTSERV.MUOHIO.EDU=20 = </A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, October 31, 2000 = 6:49=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Find 3: The = Reckoning</DIV> <DIV><BR></DIV><BGSOUND balance=3D0=20 src=3D"cid:000c01c043b8$9a247d60$37b04cd8@euman" volume=3D0> <DIV> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Ddparnell at BIGPOND.NET.AU = href=3D"mailto:dparnell at BIGPOND.NET.AU">Derek=20 Parnell</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 title=3DEUPHORIA at LISTSERV.MUOHIO.EDU=20 = </A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, October 29, = 2000 10:42=20 AM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Find 3: The=20 Reckoning</DIV> <DIV><BR></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial = size=3D2>Ok Thomas,=20 I'll bite.</FONT></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial=20 size=3D2></FONT> </DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial">------<BR>Derek = Parnell<BR>Melbourne,=20 Australia<BR>(Vote [1] The Cheshire Cat for Internet = Mascot)<BR></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>include = get.e<BR>sequence=20 names,curname<BR>object input<BR>integer location<BR>atom=20 wn<BR>wn=3Drand(3)<BR>names=20 = %s\n",{curname})</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 = size=3D2>input=3Dgets(0)<BR>?=20 curname<BR>puts(1,"\n")<BR>? input</FONT></DIV> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial color=3D#000080 size=3D2>location =3D=20 find(input[1],names[2])</FONT></DIV></FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This previous line = is saying "Find=20 where the first character of input inside of the second sequence of=20 names". Is this what you are really trying to find = out?</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are trying = to find out if=20 "input" is one of the three possible names. If that is so, try this=20 instead...</FONT></DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"> <DIV dir=3Dltr><STRONG><FONT size=3D2>if sequence(input)=20 then</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- Strip = off the=20 trailing newline char.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D = input[1 ..=20 length(input) - 1]</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = convert to=20 lowercase.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D = lower(input)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- See if = the input=20 sequence is one of the sequences in names.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> location = =3D=20 find(input, names)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = "location" should=20 equal 0, 1, 2, or 3 now.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2>else</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = End-Of-File=20 (Ctrl-Z) entered.</FONT></STRONG></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG> location = =3D=20 0</STRONG></FONT></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG>end if</STRONG><FONT=20 face=3DArial> = </FONT></FONT></DIV> <DIV dir=3Dltr><STRONG><FONT = <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>puts(1,"\n")<BR>? = location</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> The "location" = variable=20 only gives a correct number if "them" is used. = </FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>And what is the=20 <STRONG>correct</STRONG> number? What were you expecting to=20 see?</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2>Nothing else. I've looked at all = the=20 documentation I've got and either I am quite blind or, I just = haven't=20 found my solution. Anywho, if you could solve this problem, I'd be = most=20 grateful....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are = confused by=20 the <STRONG>find()</STRONG> function. It takes two parameters, = the=20 first can be an atom or a sequence but the second must be a = sequence. It=20 then scans each element in the second parameter to see if it equals = the=20 first parameter. If so, it returns the number of the element in the = second=20 parmeter that equalled the first parameter.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This means that if the = first parameter=20 is a sequence, as is your case here, then each of the elements in = the second=20 parmeter should be sequences too. Also, this is what you have coded = for=20 <EM>names</EM>. However, in your coding of <STRONG>find()</STRONG> = you used=20 <EM>input[1]</EM> which is <STRONG>not</STRONG> a sequence but the = first=20 character of input. It is a single character - an atom. Also, = you coded=20 the second parameter as <EM>names[2]</EM> which is a sequence if = characters=20 - namely <EM>"them"</EM> . Thus, <STRONG>find()</STRONG> went = looking=20 through the characters ''t', 'h', 'e', and 'm' to see if the first = character=20 of <EM>input</EM> equalled any.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This would mean that = <EM>location</EM>=20 would be non-zero, 1 to 4, for any input that begun with 't', = 'h', 'e',=20 or 'm'.</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Das Svendanya</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>PS. This <EM>should</EM> be = the last=20 one.........</FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>Yeah, sure Thomas. = --------I meant=20 the last one on this program, but, you're right </FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>What I'm trying to do = here is get the=20 placement of an individual letter from a word. So if the word is = "moor" and=20 the user types in 'o'.....wait, bad example, there are two = o's....would=20 eusphoria see that as [2..3]?</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>okay, if the user types = in 'r',=20 whatever variable I assigned find() to will be 4.</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>-Hope this clarifies=20 things.....</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D6>-H<FONT = color=3D#ff8000>A</FONT>P<FONT=20 color=3D#ff8000>P</FONT>Y <FONT color=3D#ff8000>H</FONT>A<FONT=20 color=3D#ff8000>L</FONT>L<FONT color=3D#ff8000>O</FONT>W<FONT=20 color=3D#ff8000>E</FONT>E<FONT color=3D#ff8000>N</FONT>!<FONT=20 color=3D#ff8000>!</FONT>!</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>-Thomas</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>PS. How'd you like the = Halloween-esque=20 sound?</FONT><FONT face=3DArial=20 ------=_NextPart_001_000E_01C0438E.B19198E0-- ------=_NextPart_000_000D_01C0438E.B19198E0 name="Guillotn.wav"
7. Re: Find 3: The Reckoning
- Posted by Euman <euman at BELLSOUTH.NET> Oct 31, 2000
- 455 views
- Last edited Nov 01, 2000
------=_NextPart_000_001D_01C0438F.256F2840 boundary="----=_NextPart_001_001E_01C0438F.256F2840" ------=_NextPart_001_001E_01C0438F.256F2840 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Just kidding.... Happy Halloween.... ----- Original Message -----=20 From: Liona Kerslake=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Tuesday, October 31, 2000 6:49 PM Subject: Re: Find 3: The Reckoning ----- Original Message -----=20 From: Derek Parnell=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Sunday, October 29, 2000 10:42 AM Subject: Re: Find 3: The Reckoning Ok Thomas, I'll bite. ------ Derek Parnell Melbourne, Australia (Vote [1] The Cheshire Cat for Internet Mascot) include get.e sequence names,curname object input integer location atom wn wn=3Drand(3) names =3D{"bob","them","worms"} curname=3Dnames[wn] printf(1,"curname: %s\n",{curname}) input=3Dgets(0) ? curname puts(1,"\n") ? input location =3D find(input[1],names[2]) This previous line is saying "Find where the first character of = input inside of the second sequence of names". Is this what you are = really trying to find out? I suspect you are trying to find out if "input" is one of the three = possible names. If that is so, try this instead... if sequence(input) then -- Strip off the trailing newline char. input =3D input[1 .. length(input) - 1] -- convert to lowercase. input =3D lower(input) -- See if the input sequence is one of the sequences in names. location =3D find(input, names) -- "location" should equal 0, 1, 2, or 3 now. else -- End-Of-File (Ctrl-Z) entered. location =3D 0 end if =20 puts(1,"\n") ? location The "location" variable only gives a correct number if "them" = is used.=20 And what is the correct number? What were you expecting to see? Nothing else. I've looked at all the documentation I've got and = either I am quite blind or, I just haven't found my solution. Anywho, if = you could solve this problem, I'd be most grateful.... I suspect you are confused by the find() function. It takes two = parameters, the first can be an atom or a sequence but the second must = be a sequence. It then scans each element in the second parameter to see = if it equals the first parameter. If so, it returns the number of the = element in the second parmeter that equalled the first parameter. This means that if the first parameter is a sequence, as is your = case here, then each of the elements in the second parmeter should be = sequences too. Also, this is what you have coded for names. However, in = your coding of find() you used input[1] which is not a sequence but the = first character of input. It is a single character - an atom. Also, you = coded the second parameter as names[2] which is a sequence if characters = - namely "them" . Thus, find() went looking through the characters ''t', = 'h', 'e', and 'm' to see if the first character of input equalled any. This would mean that location would be non-zero, 1 to 4, for any = input that begun with 't', 'h', 'e', or 'm'. Das Svendanya Thomas PS. This should be the last one......... Yeah, sure Thomas. --------I meant the last one on this program, = but, you're right What I'm trying to do here is get the placement of an individual = letter from a word. So if the word is "moor" and the user types in = 'o'.....wait, bad example, there are two o's....would eusphoria see that = as [2..3]? okay, if the user types in 'r', whatever variable I assigned find() = to will be 4. -Hope this clarifies things..... -HAPPY HALLOWEEN!!! -Thomas PS. How'd you like the Halloween-esque sound? ------=_NextPart_001_001E_01C0438F.256F2840 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4207.2601" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Just kidding....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Happy Halloween....</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Dpaulk at UNISERVE.COM href=3D"mailto:paulk at UNISERVE.COM">Liona = Kerslake</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A = title=3DEUPHORIA at LISTSERV.MUOHIO.EDU=20 = </A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, October 31, 2000 = 6:49=20 PM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Find 3: The = Reckoning</DIV> <DIV><BR></DIV><BGSOUND balance=3D0=20 src=3D"cid:001c01c043b9$0e09ade0$37b04cd8@euman" volume=3D0> <DIV> </DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A title=3Ddparnell at BIGPOND.NET.AU = href=3D"mailto:dparnell at BIGPOND.NET.AU">Derek=20 Parnell</A> </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 title=3DEUPHORIA at LISTSERV.MUOHIO.EDU=20 = </A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Sunday, October 29, = 2000 10:42=20 AM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Find 3: The=20 Reckoning</DIV> <DIV><BR></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial = size=3D2>Ok Thomas,=20 I'll bite.</FONT></DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial"><FONT face=3DArial=20 size=3D2></FONT> </DIV> <DIV dir=3Dltr style=3D"FONT: 10pt arial">------<BR>Derek = Parnell<BR>Melbourne,=20 Australia<BR>(Vote [1] The Cheshire Cat for Internet = Mascot)<BR></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>include = get.e<BR>sequence=20 names,curname<BR>object input<BR>integer location<BR>atom=20 wn<BR>wn=3Drand(3)<BR>names=20 = %s\n",{curname})</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 = size=3D2>input=3Dgets(0)<BR>?=20 curname<BR>puts(1,"\n")<BR>? input</FONT></DIV> <DIV><FONT face=3DArial size=3D2> <DIV><FONT face=3DArial color=3D#000080 size=3D2>location =3D=20 find(input[1],names[2])</FONT></DIV></FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This previous line = is saying "Find=20 where the first character of input inside of the second sequence of=20 names". Is this what you are really trying to find = out?</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are trying = to find out if=20 "input" is one of the three possible names. If that is so, try this=20 instead...</FONT></DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"> <DIV dir=3Dltr><STRONG><FONT size=3D2>if sequence(input)=20 then</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- Strip = off the=20 trailing newline char.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D = input[1 ..=20 length(input) - 1]</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = convert to=20 lowercase.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> input =3D = lower(input)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- See if = the input=20 sequence is one of the sequences in names.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> location = =3D=20 find(input, names)</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = "location" should=20 equal 0, 1, 2, or 3 now.</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2>else</FONT></STRONG></DIV> <DIV dir=3Dltr><STRONG><FONT size=3D2> -- = End-Of-File=20 (Ctrl-Z) entered.</FONT></STRONG></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG> location = =3D=20 0</STRONG></FONT></DIV> <DIV dir=3Dltr><FONT size=3D2><STRONG>end if</STRONG><FONT=20 face=3DArial> = </FONT></FONT></DIV> <DIV dir=3Dltr><STRONG><FONT = <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial color=3D#000080 size=3D2>puts(1,"\n")<BR>? = location</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2> The "location" = variable=20 only gives a correct number if "them" is used. = </FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>And what is the=20 <STRONG>correct</STRONG> number? What were you expecting to=20 see?</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2>Nothing else. I've looked at all = the=20 documentation I've got and either I am quite blind or, I just = haven't=20 found my solution. Anywho, if you could solve this problem, I'd be = most=20 grateful....</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>I suspect you are = confused by=20 the <STRONG>find()</STRONG> function. It takes two parameters, = the=20 first can be an atom or a sequence but the second must be a = sequence. It=20 then scans each element in the second parameter to see if it equals = the=20 first parameter. If so, it returns the number of the element in the = second=20 parmeter that equalled the first parameter.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This means that if the = first parameter=20 is a sequence, as is your case here, then each of the elements in = the second=20 parmeter should be sequences too. Also, this is what you have coded = for=20 <EM>names</EM>. However, in your coding of <STRONG>find()</STRONG> = you used=20 <EM>input[1]</EM> which is <STRONG>not</STRONG> a sequence but the = first=20 character of input. It is a single character - an atom. Also, = you coded=20 the second parameter as <EM>names[2]</EM> which is a sequence if = characters=20 - namely <EM>"them"</EM> . Thus, <STRONG>find()</STRONG> went = looking=20 through the characters ''t', 'h', 'e', and 'm' to see if the first = character=20 of <EM>input</EM> equalled any.</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2></FONT> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>This would mean that = <EM>location</EM>=20 would be non-zero, 1 to 4, for any input that begun with 't', = 'h', 'e',=20 or 'm'.</FONT></DIV> <BLOCKQUOTE dir=3Dltr=20 style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Das Svendanya</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Thomas</FONT></DIV> <DIV> </DIV> <DIV> </DIV> <DIV><FONT face=3DArial size=3D2>PS. This <EM>should</EM> be = the last=20 one.........</FONT></DIV></BLOCKQUOTE> <DIV dir=3Dltr><FONT face=3DArial size=3D2>Yeah, sure Thomas. = --------I meant=20 the last one on this program, but, you're right </FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>What I'm trying to do = here is get the=20 placement of an individual letter from a word. So if the word is = "moor" and=20 the user types in 'o'.....wait, bad example, there are two = o's....would=20 eusphoria see that as [2..3]?</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>okay, if the user types = in 'r',=20 whatever variable I assigned find() to will be 4.</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>-Hope this clarifies=20 things.....</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D6>-H<FONT = color=3D#ff8000>A</FONT>P<FONT=20 color=3D#ff8000>P</FONT>Y <FONT color=3D#ff8000>H</FONT>A<FONT=20 color=3D#ff8000>L</FONT>L<FONT color=3D#ff8000>O</FONT>W<FONT=20 color=3D#ff8000>E</FONT>E<FONT color=3D#ff8000>N</FONT>!<FONT=20 color=3D#ff8000>!</FONT>!</FONT></DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>-Thomas</FONT></DIV> <DIV dir=3Dltr> </DIV> <DIV dir=3Dltr><FONT face=3DArial size=3D2>PS. How'd you like the = Halloween-esque=20 sound?</FONT><FONT face=3DArial=20 ------=_NextPart_001_001E_01C0438F.256F2840-- ------=_NextPart_000_001D_01C0438F.256F2840 name="Guillotn.wav"
8. Re: Find 3: The Reckoning
- Posted by Kat <gertie at PELL.NET> Oct 31, 2000
- 466 views
- Last edited Nov 01, 2000
Then why did you send it back for the rest of us to download again??? On 31 Oct 2000, at 23:02, Euman wrote: > I dont like it!!!! > > PLEASE dont make us download extra bytes > to play sounds...... > > Thanks: > euman at bellsouth.net > > ----- Original Message ----- > From: Liona Kerslake > To: EUPHORIA at LISTSERV.MUOHIO.EDU > Sent: Tuesday, October 31, 2000 6:49 PM > Subject: Re: Find 3: The Reckoning > > > > ----- Original Message ----- > From: Derek Parnell > To: EUPHORIA at LISTSERV.MUOHIO.EDU > Sent: Sunday, October 29, 2000 10:42 AM > Subject: Re: Find 3: The Reckoning > > > Ok Thomas, I'll bite. > > ------ > Derek Parnell > Melbourne, Australia > (Vote [1] The Cheshire Cat for Internet Mascot) > > > include get.e > sequence names,curname > object input > integer location > atom wn > wn=rand(3) > names ={"bob","them","worms"} > curname=names[wn] > printf(1,"curname: %s\n",{curname}) > > input=gets(0) > ? curname > puts(1,"\n") > ? input > location = find(input[1],names[2]) > This previous line is saying "Find where the first character of input > inside of the second sequence of names". Is this what you are really > trying to find out? I suspect you are trying to find out if "input" is one > of the three possible names. If that is so, try this instead... > if sequence(input) then > -- Strip off the trailing newline char. > input = input[1 .. length(input) - 1] > -- convert to lowercase. > input = lower(input) > -- See if the input sequence is one of the sequences in names. > location = find(input, names) > -- "location" should equal 0, 1, 2, or 3 now. > else > -- End-Of-File (Ctrl-Z) entered. > location = 0 > end if > > > puts(1,"\n") > ? location > > > The "location" variable only gives a correct number if "them" is > used. > And what is the correct number? What were you expecting to see? > Nothing else. I've looked at all the documentation I've got and either I > am quite blind or, I just haven't found my solution. Anywho, if you > could solve this problem, I'd be most grateful.... > > I suspect you are confused by the find() function. It takes two > parameters, the first can be an atom or a sequence but the second must be > a sequence. It then scans each element in the second parameter to see if > it equals the first parameter. If so, it returns the number of the element > in the second parmeter that equalled the first parameter. > > This means that if the first parameter is a sequence, as is your case > here, then each of the elements in the second parmeter should be sequences > too. Also, this is what you have coded for names. However, in your coding > of find() you used input[1] which is not a sequence but the first > character of input. It is a single character - an atom. Also, you coded > the second parameter as names[2] which is a sequence if characters - > namely "them" . Thus, find() went looking through the characters ''t', > 'h', 'e', and 'm' to see if the first character of input equalled any. > > This would mean that location would be non-zero, 1 to 4, for any input > that begun with 't', 'h', 'e', or 'm'. > > Das Svendanya > Thomas > > > PS. This should be the last one......... > Yeah, sure Thomas. --------I meant the last one on this program, but, > you're right > > What I'm trying to do here is get the placement of an individual letter > from a word. So if the word is "moor" and the user types in 'o'.....wait, > bad example, there are two o's....would eusphoria see that as [2..3]? > > okay, if the user types in 'r', whatever variable I assigned find() to > will be 4. > > -Hope this clarifies things..... > -HAPPY HALLOWEEN!!! > -Thomas > > PS. How'd you like the Halloween-esque sound? > >
9. Re: Find 3: The Reckoning
- Posted by simulat <simulat at INTERGATE.CA> Oct 31, 2000
- 448 views
- Last edited Nov 01, 2000
------=_NextPart_000_001B_01C0438A.AEB4B480 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Yikes - that sound gave me a fright - because I don't like things like = that playing on my system without permission. It's a wake-up call. Does = anyone have advice on how to disable that kind of thing? Bye Martin ------=_NextPart_000_001B_01C0438A.AEB4B480 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>Yikes - that sound gave me a fright - because I = don't like=20 things like that playing on my system without permission. It's a wake-up = call.=20 Does anyone have advice on how to disable that kind of = thing?</FONT></DIV> ------=_NextPart_000_001B_01C0438A.AEB4B480--
10. Re: Find 3: The Reckoning
- Posted by Kat <gertie at PELL.NET> Nov 01, 2000
- 471 views
On 31 Oct 2000, at 22:34, simulat wrote: > Yikes - that sound gave me a fright - because I don't like things like that > playing on my system without permission. It's a wake-up call. Does anyone have > advice on how to disable that kind of thing? Bye Martin Yeas, don't use Outlook Express. Kat
11. Re: Find 3: The Reckoning
- Posted by simulat <simulat at INTERGATE.CA> Nov 01, 2000
- 468 views
I was afraid of that. Any recommendations? Bye Martin ----- Original Message ----- From: Kat <gertie at PELL.NET> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Tuesday, October 31, 2000 11:48 PM Subject: Re: Find 3: The Reckoning > On 31 Oct 2000, at 22:34, simulat wrote: > > > Yikes - that sound gave me a fright - because I don't like things like that > > playing on my system without permission. It's a wake-up call. Does anyone have > > advice on how to disable that kind of thing? Bye Martin > > Yeas, don't use Outlook Express. > > Kat >
12. Re: Find 3: The Reckoning
- Posted by Kat <gertie at PELL.NET> Nov 01, 2000
- 463 views
On 1 Nov 2000, at 0:04, simulat wrote: > I was afraid of that. > Any recommendations? I use Pegasus, some here use The Bat. I also use mirc occasionally, but since it seems like i'll be running a listserv soon, as soon as i get a minute, i'll convert the code to Eu asap. Especially since i want a email proxy too. Kat > Bye > Martin > > ----- Original Message ----- > From: Kat <gertie at PELL.NET> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Sent: Tuesday, October 31, 2000 11:48 PM > Subject: Re: Find 3: The Reckoning > > > > On 31 Oct 2000, at 22:34, simulat wrote: > > > > > Yikes - that sound gave me a fright - because I don't like things like > that > > > playing on my system without permission. It's a wake-up call. Does > anyone have > > > advice on how to disable that kind of thing? Bye Martin > > > > Yeas, don't use Outlook Express. > > > > Kat > > >
13. Re: Find 3: The Reckoning
- Posted by gebrandariz <gebrandariz at YAHOO.COM> Nov 01, 2000
- 467 views
Martin, Outlook Express (at least OE5) will let you configure its main window. To avoid automatic playing (and automatic execution of scripts, etc.), the simplest way is to disable the Preview Pane. Go to View Menu -> Layout, then disable preview. Footnote: I wanted to confirm this, and the OE5 help files are not very complete. So I opened my favorite search engine, at www.northernlight.com, and just typed "Outlook Express disable preview". Go on, test it. Gerardo ----- Original Message ----- From: simulat <simulat at INTERGATE.CA> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Wednesday, November 01, 2000 5:04 AM Subject: Re: Find 3: The Reckoning > I was afraid of that. > Any recommendations? > Bye > Martin > > ----- Original Message ----- > From: Kat <gertie at PELL.NET> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Sent: Tuesday, October 31, 2000 11:48 PM > Subject: Re: Find 3: The Reckoning > > > > On 31 Oct 2000, at 22:34, simulat wrote: > > > > > Yikes - that sound gave me a fright - because I don't like things like > that > > > playing on my system without permission. It's a wake-up call. Does > anyone have > > > advice on how to disable that kind of thing? Bye Martin > > > > Yeas, don't use Outlook Express. > > > > Kat > > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
14. Re: Find 3: The Reckoning
- Posted by simulat <simulat at INTERGATE.CA> Nov 01, 2000
- 461 views
Thanks Gerardo But that doesn't work - I disabled the preview pane long ago - so I didn't get the sound until I actually openned the message. The thing that surprised me was that there was no indication from the body of the message that there was even a sound there. I had to go into the message source before I could see it. Until then it hadn't really dawned on me that OE was actually playing html when I opened a message. Though, in hindsight, that should have been obvious. I mean, how else would the nice blue links I like so much work? In this case it was no problem at all, and I actually enjoyed Thomas' sound more and more as I thought about it. The guillotene sound was a perfect wake-up call, and the timing was perfect, and I don't think Thomas is trying to do any harm and I enjoy his continual efforts to express himself. I thought that Jiri was way too grouchy earlier - but that's Jiri too. So now, I clearly understand that OE5 can carry huge amounts of data without it actually showing up in the message at all. I used to use Pegasus, and I may go back to it, but I switched because I didn't like it's interface very much. Bye Martin ----- Original Message ----- From: gebrandariz <gebrandariz at YAHOO.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Wednesday, November 01, 2000 4:53 AM Subject: Re: Find 3: The Reckoning > Martin, > > Outlook Express (at least OE5) will let you configure its main window. To > avoid automatic playing (and automatic execution of scripts, etc.), the > simplest way is to disable the Preview Pane. Go to View Menu -> Layout, then > disable preview. > > Footnote: I wanted to confirm this, and the OE5 help files are not very > complete. So I opened my favorite search engine, at www.northernlight.com, > and just typed "Outlook Express disable preview". Go on, test it. > > Gerardo > > ----- Original Message ----- > From: simulat <simulat at INTERGATE.CA> > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Sent: Wednesday, November 01, 2000 5:04 AM > Subject: Re: Find 3: The Reckoning > > > > I was afraid of that. > > Any recommendations? > > Bye > > Martin > > > > ----- Original Message ----- > > From: Kat <gertie at PELL.NET> > > To: <EUPHORIA at LISTSERV.MUOHIO.EDU> > > Sent: Tuesday, October 31, 2000 11:48 PM > > Subject: Re: Find 3: The Reckoning > > > > > > > On 31 Oct 2000, at 22:34, simulat wrote: > > > > > > > Yikes - that sound gave me a fright - because I don't like things like > > that > > > > playing on my system without permission. It's a wake-up call. Does > > anyone have > > > > advice on how to disable that kind of thing? Bye Martin > > > > > > Yeas, don't use Outlook Express. > > > > > > Kat > > > > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > >
15. Re: Find 3: The Reckoning
- Posted by =?iso-8859-1?B?fgk=?= <mwfch at MWEB.CO.ZA> Nov 01, 2000
- 458 views
------=_NextPart_000_00C3_01C043EB.78817720 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Put of your speaker ( Like I did ). By the way , here is RSA we dont have Haloween . ----- Original Message -----=20 From: simulat=20 To: EUPHORIA at LISTSERV.MUOHIO.EDU=20 Sent: Wednesday, November 01, 2000 8:34 AM Subject: Re: Find 3: The Reckoning Yikes - that sound gave me a fright - because I don't like things like = that playing on my system without permission. It's a wake-up call. Does = anyone have advice on how to disable that kind of thing? Bye Martin ------=_NextPart_000_00C3_01C043EB.78817720 charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial>Put of your speaker ( Like I did ).</FONT></DIV> <DIV>By the way , here is RSA we dont have Haloween .</DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV> <DIV=20 style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20 <A href=3D"mailto:simulat at INTERGATE.CA" = title=3Dsimulat at INTERGATE.CA>simulat</A>=20 </DIV> <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20 href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20 title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> = </DIV> <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, November 01, = 2000 8:34=20 AM</DIV> <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: Find 3: The = Reckoning</DIV> <DIV><BR></DIV> <DIV><FONT size=3D2>Yikes - that sound gave me a fright - because I = don't like=20 things like that playing on my system without permission. It's a = wake-up call.=20 Does anyone have advice on how to disable that kind of = thing?</FONT></DIV> <DIV><FONT = ------=_NextPart_000_00C3_01C043EB.78817720--
16. Re: Find 3: The Reckoning
- Posted by Derek Parnell <derekp at solace.com.au> Nov 03, 2000
- 464 views
Thomas, you really must start reading the manuals. The answer has been given to you, both by me and Al. All you have to do is read and understand. Nobody wants to do all the work for you. You have to put in some effort too! You say that you are trying to find out the position of the character the user typed, in the names. But which name Thomas? Any name? The random name? You haven't expressed your requirement clearly enough. There is still lots of ambiguity. So here's my guess at what you are trying to do. -------------------------------- The user can type in anything but we only use the first character. The program then has to find out if a random name contains whatever character the user entered. -------------------------------- Here is your code with changes by myself. include get.e ----------------------- include wildcard.e -- for the lower() function ----------------------- sequence names,curname object input integer location atom wn wn=rand(3) names ={"bob","them","worms"} curname=names[wn] printf(1,"curname: %s\n",{curname}) input=gets(0) ? curname puts(1,"\n") ? input --------------DEREK's CODE------------- location = find(lower(input[1]), curname) ------------------------------------- puts(1,"\n") ? location ----- cheers, Derek Parnell