I attached a simple program that uses the stack mechanism.
The code shows a method to generate a string representation of a 32-bit signed value. My version allows you to specify a field width and will right justify the value in a column width that you specify.
The demo code is similar in behavior to the TRI Str$(n,d) function. The TRI version pads the converted value with leading zeros which are not very useful for my purposes.
The demo code is just that. If I really want to right justify a 32-bit integer value in a fixed-width column I use code like this:
a$ = Str$(n) : a$ = mid$(" ",1,d-len(a$)) + a$
I apologize for the fact that this code is 100% unreadable, it's just the best you can do in TBASIC.
Best regards,
Gary Dickinson