Post Reply 
Question about displaying strings
10-21-2019, 04:59 AM (This post was last modified: 10-21-2019 05:07 AM by Wes Loewer.)
Post: #8
RE: Question about displaying strings
(10-21-2019 12:35 AM)Tim Wessman Wrote:  I am pretty sure because we could not think of a possible reason having the length in cartestian would be helpful...

Since the returned value of TEXTOUT is not the length but the X coordinate of where the next character would go, I figured the main purpose of the return value was to indicate where the next TEXTOUT should be placed so that the output would flow.

Code:
#pragma mode( separator(.,;) integer(h32) )
EXPORT TEXTOUT_Px3()
BEGIN
LOCAL a,b,c;
RECT();
a:=TEXTOUT_P("ABC",100,50);
b:=TEXTOUT_P("DEF",a,50);
c:=TEXTOUT_P("GHI",b,50);
WAIT();
RETURN {a,b,c};
END;

If these had been TEXTOUT() instead of TEXTOUT_P(), then the returned values would need to be converted back to Cartesian values for the next call. I suppose subsequent calls could be made with TEXTOUT_P(), but then the Y value would have to be converted.

I don't think I've ever used the TEXTOUT functions in my programming, so I may be way off base here.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Question about displaying strings - Wes Loewer - 10-21-2019 04:59 AM



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