Is this Curve to the Left or to the Right

Posted by Lionel on April 01, 2006

I ask the user to select which way a curve turns in the code below by letting him/her indicate by typing in L or R in an Edit10.Text box. For some unknown (Unknown to me) reason, I am getting the wrong response?
This might be handled better by using two CheckBoxes (Check Left or Check Right) but I am getting a wrong response with this also.
I don't know if I should stick with a Edit Box entry or to use two CheckBoxes, one for Left and one for Right?

This is another one of those Choice things and I just can't seem to get right with it. I also tried RadioButtons, but when I select Left or Right the other buttons loose their settings.?

X:=StrToInt(Edit10.Text);//Enter L or R in Edit10 box
//Response := UpCase(ReadKey);
IF X = R Then  //R for the Curve Right
  MR:=(Radius - OSR) / Radius;
  ML:=(Radius + OSL) / Radius;
Else             //L for the Curve Left
Begin // Response = L
  MR:=(Radius + OSR) / Radius;
  ML:=(Radius - OSL) / Radius;

Related Articles and Replies