revTalk for Retards

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Sun Jun 27, 2010 10:48 pm

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: revTalk for Retards

Post by bn » Sun Jun 27, 2010 11:29 pm

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

Equiarch
Posts: 17
Joined: Fri May 28, 2010 8:13 pm

Re: revTalk for Retards

Post by Equiarch » Mon Jun 28, 2010 2:32 am

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: revTalk for Retards

Post by bn » Mon Jun 28, 2010 10:46 am

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.

p4tr1ck
Posts: 36
Joined: Mon Jun 14, 2010 4:58 pm

Re: revTalk for Retards

Post by p4tr1ck » Wed Jul 07, 2010 12:14 am

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

Post Reply