Result justified?
06-08-2015, 09:23 PM
Post: #7
 DrD Senior Member Posts: 1,132 Joined: Feb 2014
RE: Result justified?
Perhaps you can use the size() to advantage:
Code:
 EXPORT KorTrans() BEGIN   LOCAL X,Y,φ,Xs,Ys;   local c,d;               // Temps for string converted values   local black:=rgb(0,0,0);      //  Home variable settings   HAngle:=1;  //  Set angle mode to degrees   HDigits:=2; //  Set Digits to 2      RECT_P();      INPUT({{X,[0],{20,15,0}},   {Y,[0],{20,15,1}},   {φ,[0],{20,15,2}}},   "Koordinatentransformation",   {"X [KN]","Y [KN]","φ [°]"},   {"","",""});      Xs:=ROUND((X*COS(φ)-Y*SIN(φ)),2);  //  Angle mode is degrees   Ys:=ROUND((X*SIN(φ)+Y*COS(φ)),2);   c:=string(Xs); d:=string(Ys);    TEXTOUT_P(c,150-4.3*size(c),25);     //  Offset by size of string   TEXTOUT_P(d,150-4.3*size(d),50);         //TEXTOUTR(Xs,150,25);   //TEXTOUTR(Ys,150,50);      FREEZE; END;

Attached File(s) Thumbnail(s)

 « Next Oldest | Next Newest »

 Messages In This Thread Result justified? - Heino - 06-07-2015, 07:54 PM RE: Result justified? - Heino - 06-07-2015, 07:58 PM RE: Result justified? - DrD - 06-07-2015, 11:09 PM RE: Result justified? - Heino - 06-08-2015, 09:07 AM RE: Result justified? - eried - 06-08-2015, 05:46 PM RE: Result justified? - Heino - 06-08-2015, 07:28 PM RE: Result justified? - DrD - 06-08-2015 09:23 PM

User(s) browsing this thread: 1 Guest(s)