Post Reply 
Terminal Usage
09-01-2015, 06:35 PM (This post was last modified: 09-01-2015 06:36 PM by eried.)
Post: #2
RE: Terminal Usage
Since the font in the terminal for any number has the same width per number, and each number is 2 spaces wide, why don't you pass the first number to that function?

Example:
Code:
spaces (var,len)
BEGIN
local ss:="";
for X from 0 to (len-length(var+""))*2 do ss:=ss+" "; end;
return ss;
END;

EXPORT test1()
BEGIN
local a:=1234, b:=5555;
print(a+spaces(a,20)+b);
END;

You could optimize that but is an idea.

My website: ried.cl
Visit this user's website 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: 2 Guest(s)