Page 2 of 2

Re: revTalk for Retards

Posted: Sun Jun 27, 2010 10:48 pm
by Equiarch
Thanks Doc
I shoould have just tried that in the first place, but I am finding that this code is sometimes intuitive and sometimes not.

I am currently dealing with another issue. what I am trying to do is create a octave calculator where the user inputs a frquency number that number is analyzed against every octave group starting at the 1st and working upward until its octave gruop is found and displayed. I tried this but, no go, which I expected. please excues my greeness in coding:

Code: Select all

put field "freqField" into f
put 0 into q
put "st" into s
if f >q then
      put(q+1)& s into o
      if last charecter of o=2 then
	put "nd" into s
	end if
      if last charecter of o=3 then
	put "rd" into s
	end if
      if last charecter of o>3 then
	put "th" into s
	end if
      put q+1 into e      
    else
      put e*2 into q
      
end if
 put "The" && o &&  Octave into field "Octave" 
end mouseUp
Can someone please correct my project?

Peace,
Mario

Re: revTalk for Retards

Posted: Sun Jun 27, 2010 11:29 pm
by bn
Mario,

instead of "charecter" try char or character, it seems to be the misspelling that keeps it from working. This way Rev thinks "charecter" is a variable and since it is not filled before it really does not know what to do.

try it like this and if it still does not work come back.

regards
Bernd

Re: revTalk for Retards

Posted: Mon Jun 28, 2010 2:32 am
by Equiarch
Thanks Bernd
for correcting my terrible spelling nevertheless the code does not work so I am trying a new angle:

Code: Select all

put 0 into n
on mouseup
put field "userNum" into f
if f>=1*2^n then
   put "The" && n && Octave into field result
  else
<---- This is where I am stuck------->
end mouseup
what I want to happen is that variable "n" is increased by 1 and then the "if" statement runs again with the new value for "n" until f>= 1*2^n and the result is displayed in field "result" as for example "The 3 Octave"

Peace
Mario

Re: revTalk for Retards

Posted: Mon Jun 28, 2010 10:46 am
by bn
Hi Mario,
put 0 into n
on mouseup
put field "userNum" into f
if f>=1*2^n then
put "The" && n && Octave into field result
else
<---- This is where I am stuck------->
end mouseup
if I see this correctly then in the first round
1*2^n when n is 0 this evaluates to 1
is that what you want?

could you give some example numbers for f? What is the value range of f, are those integers?
And post the whole script for the if-then part?

regards
Bernd

PS. maybe you would want to start a new topic if the problem is different from the original post.

Re: revTalk for Retards

Posted: Wed Jul 07, 2010 12:14 am
by p4tr1ck
Here is a nice little link to the lessons BYU uses to teach RevTalk, and it is what I learned from.
http://revolution.byu.edu/indexgeneric.php