
-----------------------------------
naqibaba
Thu Dec 03, 2009 3:50 am

Just made my account here and Its my first question.
-----------------------------------
The outpout should look like this :

"The decimal equilent of 1/2 is 0.500
 The decimal equilent of 1/3 is 0.300
 ..
 ..
 The Decimal equilent of 1/10 is 0.100"


I am having difficulty in calling the variables. Its showing an error here.

"var first:=0.5
var last:=0.1
for count: first..last"

"The error is "for range bound must be both integers, chars or elements of the same enumerated type."
What does that mean?


Once I am able to call these variables, Prog will be done. Its showing an error on both real and integer. I would greatly appreciate any help.

-----------------------------------
Tony
Thu Dec 03, 2009 4:11 am

RE:Just made my account here and Its my first question.
-----------------------------------
it appears that you are trying to have a forloop count from 0.5 to 0.1
[code]
for count: 0.5 .. 0.1
 ...
end for
[/code]
What kind of values would you expect "count" to have, as the loop executes?

-----------------------------------
naqibaba
Thu Dec 03, 2009 9:04 am

Re: RE:Just made my account here and Its my first question.
-----------------------------------
it appears that you are trying to have a forloop count from 0.5 to 0.1





This is not working. I have also tried "for decreasing count:0.5..0.1" but still the error is the same. This is killing me.

-----------------------------------
Draymire
Thu Dec 03, 2009 9:11 am

Re: Just made my account here and Its my first question.
-----------------------------------
try something like this

[code]
for decreasing i: 5 .. 1
count=i/10
...
end for
[/code]

this should work, and it gives you your 0.5-0.1 like you want :)

-----------------------------------
TheGuardian001
Thu Dec 03, 2009 9:12 am

Re: Just made my account here and Its my first question.
-----------------------------------

This is not working. I have also tried "for decreasing count:0.5..0.1" but still the error is the same. This is killing me.


What Tony means is, what values are in between 0.5 and 0.1? If you were to go through every value, what values would you get?

And back to the error message

"The error is "for range bound must be both integers, chars or elements of the same enumerated type." 


Do you know what an integer is? Are either of the bounds on your for loop integers?
