Re: Strange problem
- Posted by Joel Crook <joel at MAIL.K-A.COM> Mar 18, 2000
- 469 views
At 02:05 AM 03/19/2000 +0000, you wrote: >Hello, >Help. I have been working on a program all day today. I'm up >a stump. I get an error about a subscript zero but it isn't. >At least I can't tell what the problem is. Every subscript >evaluates to a positive integer as far as I can tell. I even >did some file output to test it. I isolated the code that >makes the problem. Here it is. Please debug it for me or at >least tell me what might be wrong. I'm beginning to wonder if >it might be a interpreter problem. I hope it's just me. > >TIA, > >Lewis Townsend >keroltarr at hotmail.com >http://geocities.com/keroltarr/ >______________________________________________________ >Get Your Private, Free Email at http://www.hotmail.com > return objects [obj] [floor (att)] [1+((att - floor (att)) * 10)] -->ERROR { {1,0,{},{ 0, 0},{639,479}, 1,1,1}, {1,0,{},{10,10},{459,459},-1,1,1} ^ } | I changed the line to read: return objects [obj] [floor (att)] [1+((att - floor (att)) * 1)] -->ERROR I get the result {10,10} att-floor(att) is .1 which you are trying to turn into a 1 by multiplying by 10 but I suspect that Euphoria is expecting is an integer -- sure enough In the manual I found: "Non-integer subscripts are rounded down to an integer" so Euphoria is seeing that last element number as [0] and not [1]