1. Why won't this work??!!!
- Posted by Joseph Martin <jam at EXIS.NET> Mar 08, 1997
- 1055 views
- Last edited Mar 09, 1997
-- [ From: Joseph Martin * EMC.Ver #2.5.02 ] -- sd2real.ex:30 character constant is missing a closing ' if compare(real[1], '1') > -1 and compare(real[1], '31'') < 1 then this is from the ex.err file. If anyone could tell me why this doesn't work and how to fix it I would appreciate it. Thanks. -- |**************************************| | Joseph Martin | | http://sailfish.exis.net/~jam/ | |**************************************|
2. Re: Why won't this work??!!!
- Posted by "Lucius L. Hilley III" <luciuslhilleyiii at JUNO.COM> Mar 08, 1997
- 1030 views
- Last edited Mar 09, 1997
On Sat, 8 Mar 1997 19:02:19 -0500 Joseph Martin <jam at EXIS.NET> writes: >sd2real.ex:30 >character constant is missing a closing ' >if compare(real[1], '1') > -1 and compare(real[1], '31'') < 1 then if this is verbatim the you should notice that you have used a double qoute after 31 such as '31" that is a simple syntax error. You must use a single quote.
3. Re: Why won't this work??!!!
- Posted by Joseph Martin <jam at EXIS.NET> Mar 08, 1997
- 1042 views
- Last edited Mar 09, 1997
At 19:51 3/8/97 EST, you wrote: >if this is verbatim the you should notice that you have used a double >qoute after 31 >such as '31" >that is a simple syntax error. You must use a single quote. I had used one quote originally, and then added the second trying to get the thi ng to work. If you could tell me why it wouldn't work with one quote you would m ake my evening. |**************************************| | Joseph Martin | | http://sailfish.exis.net/~jam/ | |**************************************|
4. Re: Why won't this work??!!!
- Posted by "Lucius L. Hilley III" <luciuslhilleyiii at JUNO.COM> Mar 08, 1997
- 1041 views
- Last edited Mar 09, 1997
On Sat, 8 Mar 1997 19:59:53 -0500 Joseph Martin <jam at EXIS.NET> writes: > >At 19:51 3/8/97 EST, you wrote: > >>if this is verbatim the you should notice that you have used a double >>qoute after 31 >>such as '31" >>that is a simple syntax error. You must use a single quote. > >I had used one quote originally, and then added the second trying to >get the thing to work. If you could tell me why it wouldn't work with one quote >you would make my evening. 31 is an atom. You must pass that without single or double quotes. If you are trying to pass 31 inside quotes, then you will have to put it in double quotes. Putting 31 in double quotes causes it to be a 2 byte sequence. So, is this clear as mud now? It's rather confusing to me, too. I don't know if you are trying to pass ASCII character 31 OR sequence "31". In either case, you have done neither. --Lucius Lamar Hilley III -- E-mail at luciuslhilleyiii at juno.com
5. Re: Why won't this work??!!!
- Posted by mike burrell <Mike.Burrell at EARTH.GAIANET.NET> Mar 08, 1997
- 1027 views
- Last edited Mar 09, 1997
> sd2real.ex:30 > character constant is missing a closing ' > if compare(real[1], '1') > -1 and compare(real[1], '31'') < 1 then > > this is from the ex.err file. If anyone could tell me why this doesn't work > and how to fix it I would appreciate it. > > Thanks. the compare() function only does operations on sequences... marking off '1' and '31' with single quotations makes them atoms instead of sequences... if you used: if compare(real[1],"1") > -1 and compare(real[1],"31") < 1 then then it would work... i don't know if this is really what you want to do though... guessing from your code it looks to me like you're trying to compare atoms, in which case you would use: if real[1] > 1 and real[1] < 31 then hope that clears things up y0 . . o o O O Mike Burrell O O o o . . . o O http://www.geocities.com/SoHo/9036 O o . . o o O mikpos at gaianet.net O o o .
6. Re: Why won't this work??!!!
- Posted by "Lucius L. Hilley III" <luciuslhilleyiii at JUNO.COM> Mar 08, 1997
- 1059 views
- Last edited Mar 09, 1997
On Sat, 8 Mar 1997 20:10:51 +0000 mike burrell <Mike.Burrell at EARTH.GAIANET.NET> writes: > >the compare() function only does operations on sequences I haven't read the compare() function inside the include file, but the library.doc states that compare() works on objects. Objects are EITHER atoms or sequences. >if compare(real[1],"1") > -1 and compare(real[1],"31") < 1 then The above forces attempt at sequence comparison. >then it would work... i don't know if this is really what you want >to do though... guessing from your code it looks to me like you're >trying to compare atoms, in which case you would use: >if real[1] > 1 and real[1] < 31 then and above this forces attempt at atom comparison. The reason I say attempt is because a sequenc can contain a sequence. My guess by looking at the code is trying to find or filter in the printer escape codes. These codes fall between ASCII values 0 - 31. value 32 is the space character. to do this he should use the followin if command. if compare(real[1] , 32) = -1 then This makes sure that it is an atom and that it is less than 32. everything less than 32 is the printer codes. --Lucius Lamar Hilley III -- E-mail at luciuslhilleyiii at juno.com -- I support transfering of files less than 64K. -- I can Decode both UU and Base64 format.