dirlep Posted April 12, 2005 Share Posted April 12, 2005 Hy there, Is there anyone who can show me how to reduce the numbers after decimals in the results on screen. Thanks. ---The script I use is (partially from the manual): PROCEDURE Vertexbepaling; VAR obj :HANDLE; vertexNum :INTEGER; X, Y :REAL; vertexType :INTEGER; arcRadius :REAL; BEGIN obj := FSActLayer; FOR vertexNum := 1 TO GetVertNum(obj) DO BEGIN GetPolylineVertex(obj, vertexNum, X, Y, vertexType, arcRadius); TextOrigin(X+5, Y+5); CreateText(Concat(' ', vertexNum, ' / X: ', X, ' / Y: ', Y)); END; END; RUN(Vertexbepaling); Quote Link to comment
MullinRJ Posted April 14, 2005 Share Posted April 14, 2005 Hi dirlep, Use the Num2Str() function. Your last line in the loop would look like this, for 1 decimal of display. CreateText(Concat(' ', vertexNum, ' / X: ', Num2Str(1, X), ' / Y: ', Num2Str(1, Y))); Raymond Quote Link to comment
dirlep Posted April 14, 2005 Author Share Posted April 14, 2005 Raymond, Hi I've tried it out and it works just like I want it. So thanks a lot for the help and the quick respons. Dirlep. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.