Print() Can it print numbers right justified

26 views
Skip to first unread message

Bert Mariani

unread,
Feb 5, 2026, 1:11:56 PMFeb 5
to The Ring Programming Language



Prints Left      Right Justify

Chg:    Pct%     Chg:    Pct%
16.73   6.86      16.73   6.86
-31.12  -7.55    -31.12  -7.55
5.95    1.48       5.95   1.48
-0.76   -2.74     -0.76  -2.74
-19.13  -8.20    -19.13  -8.20
-0.30   -0.66     -0.30  -0.66
2.61    5.73       2.61   5.73
8.49    8.22       8.49   8.22
-11.98  -3.56    -11.98  -3.56
0.34    0.18       0.34   0.18
   

Bert Mariani

unread,
Feb 5, 2026, 1:18:25 PMFeb 5
to The Ring Programming Language
Hello Mahmoud et ALL

Hit the wrong key before i was finished.

When using :      See()   ?   Print() ,
Numbers are always output as Left Justified,  which does not look good.
Can it updated to output the numbers as Right Justified for a proper look.

Jarring look                   Better Look
Regards
Bert Mariani

Mahmoud Fayed

unread,
Feb 5, 2026, 1:36:37 PMFeb 5
to The Ring Programming Language
Hello Bert

See this example that uses FoxRing library by José Rosado

load "foxring.ring"

fox = new frFunctions

nNum = 1000
? nNum

? fox.frPadL(""+nNum,10," ")
? fox.frPadL(""+nNum,10,"=")
? fox.frPadL(""+nNum,10,"_")
? fox.frPadL(""+nNum,10,"*")

Output:
1000
      1000
======1000
______1000
******1000


Greetings,
Mahmoud

Reply all
Reply to author
Forward
0 new messages