Post Reply 
Terminal Usage
09-01-2015, 04:52 PM
Post: #1
Terminal Usage
Is there any way to determine the current column an item is being printed in? I need a TAB function in my programs to align output. Example;

PRINT(A+TAB(20)+B);

Variable B would always print starting in column 20 no matter how large or small A was.

I don't see any way to do something like that. If there was a function such as LLOC() that gave the current position of the cursor, I could do this:

Code:

EXPORT TAB(X);
BEGIN
  LOCAL TEMP:="";
  FOR I FROM LLOC() TO X DO
    TEMP:=TEMP+" ";
  END;
  RETURN TEMP;
END;

If A was two characters long, TAB(20) would return a string of 18 blanks. If A was 5 characters long, TAB(20) would return 15 blanks. You get the idea.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Terminal Usage - toml_12953 - 09-01-2015 04:52 PM
RE: Terminal Usage - eried - 09-01-2015, 06:35 PM
RE: Terminal Usage - toml_12953 - 09-02-2015, 05:57 PM
RE: Terminal Usage - eried - 09-02-2015, 06:47 PM
RE: Terminal Usage - toml_12953 - 09-03-2015, 12:29 PM
RE: Terminal Usage - eried - 09-03-2015, 12:55 PM



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