03-30-2024, 04:52 AM
I swear, I'd posted this on the forums before, but I can't find it anymore on here. (Maybe it's on the old forums from way back when?)
Anywho, with Rho and Eric both posting their functions to format text in a similar manner to Print Using, I thought I'd share this once again:
Anywho, with Rho and Eric both posting their functions to format text in a similar manner to Print Using, I thought I'd share this once again:
Code: (Select All)
Print Format(12345, "###,###")
Print Format(12345, "$###,###")
Print Format(Timer, "###,###.#####")
Function Format$ (num, using$)
Static tempimage
If tempimage = 0 Then tempimage = _NewImage(80, 1, 0)
d = _Dest: s = _Source
_Dest tempimage: _Source tempimage
Cls
Print Using using$; num;
For i = 1 To 80
p = Screen(1, i)
If p = 0 Then Exit For
text$ = text$ + Chr$(p)
Next
_Dest d: _Source s
Format$ = text$
End Function